Tag Archives: USB to Serial

Serial Communication with PIC16F877A

This article series aims at teaching serial communication between a PIC microcontroller and a PC. We first introduce you with what is serial communication is and how it can used. Then we tell you how to perform serial communication using PIC microcontroller and how we use the USART peripheral for the purpose. We will tell you how our usart library for PIC16F series can be used for easy serial communication, in this part we also discuss how to set up a MPLAB X project for using the USART library. After that we will build a demo project to explore the library. Finally we will burn this demo in a PIC16F877A and establish a serial communication with PC. Serial Communication Their are several serial communication standards like RS232, SPI, I2C etc. Of which RS232 is a asynchronous method. That means it does NOT have a synchronizing clock line. One way data requires only one conductor line. Since it is a two way communication their are two lines between the two device. One for sending data called the Tx and one for receiving data called the Rx. The communication is full duplex, that means data can be sent at the same time data is being received. generally other serial communication like SPI and I2C are used for short range communication like between […]

Digital Humidity Sensor

Digital Humidity sensors are of great help in maintaining suitable environmental condition in places such as ware houses, green houses, factories, smart homes etc. They are also very easy to interface with MCU and PC. When coupled with a PC or Microcontroller they can be used in wide variety of smart automation. One such sensor I will present today is a serial humidity sensor. The interface is very simple. The communication is done over a standard asynchronous serial line. The interface parameters are as follows. UART 9600 bps. Start bit: 1 Stop bit: 1 Parity Bit : 0 (No parity bit) No Flow Control. Fig.: Serial Humidity Sensor.   Command Set All commands are begin by "$sure" followed by space (ascii 32) All UART Command are in ASCII Commands are NOT case sensitive. All commands ends with a CR LF pair (ascii \r\n in C language). Get Current Temperature in Degree Centigrade Command : $sure temp -c Returns: XXXCentigrade Where XXX is current temperature. Example in C UWriteString("$sure temp -c\r\n"); Get Current Temperature in Degree Fahrenheit Command : $sure temp -f Returns: XXXFahrenheit Where XXX is current temperature. Example in C UWriteString("$sure temp -f\r\n"); Get Current Humidity Command : $sure humidity Returns: XXX%RH Where XXX is current relative humidity. Example in C UWriteString("$sure humidity\r\n"); Get Current Status Command : $sure […]

Getting Started with Serial RFID Reader

This pictorial step by step guide you show you how you can connect a serial RFID Reader to your PC using USB Port. Before you begin please read the following tutorial on RFID Technology and its application to make yourself familiar with it. Interfacing RFID Reader with AVR Also you will need the following modules, they can be purchased from our online store. Fig.: Serial RFID Reader.   Fig.: USB to TTL Converter.   Fig.: RFID Tags (Comes with the Reader). The RFID Reader is used to read the tags. The tags can be used to identify peoples. For example in a electronic door lock, the user just need to bring a tag (which can be a card or keychain) near the antenna. The system identify the user and present a welcome message (like "Welcome Mr. Steve"), then it prompts for password. Its like your ATM card but the advantage is that you don’t need to bring it out from your wallet. Just touch the wallet to the antenna, and that’s it! The USB to TTL Module is used to connect the RFID reader to PC. Connect the RFID reader to USB/TTL Converter as show in in the image below. Fig.: Connections. The connection is simple. All the PIN names are written on the PCBs itself so no confusion while […]