How to establish UART communication between ATmega8 and Arduino Uno?
Here we are going to establish a communication between an ATmega8 microcontroller and Arduino Uno. The communication established here is UART (Universal Asynchronous Receiver Transmitter) type. It’s serial communication. By this serial communication data can be shared between two controllers, which is a required in various embedded system applications.
In embedded systems we must have basic knowledge about system communications, so for this we are doing this project. In this project we will discuss basic communication system and we will send some data from transmitter to receiver in serial.
[Also check: UART communication between two ATmega controllers]
In this project ATMEGA8 acts as a TRANSMITTER and ARDUINO UNO acts as a RECECIVER. In serial communication we will send data BIT BY BIT, until a BYTE of data is transferred completely. The data can be of 10bit size but we will keep to 8BITS for now.
Hardware: ATMEGA8, ARDUINO UNO, power supply (5v), AVR-ISP PROGRAMMER, 100uF capacitor (connected across power supply), 1KΩ resistor (two pieces), LED , Button.
Software: Atmel studio 6.1, progisp or flash magic, ARDUINO NIGHTLY.
Before we discuss the circuit diagram and programming for transmitter and receiver, we need to understand about the serial communication. The ATMEGA here sends data to the UNO in serial as discussed earlier.
It has other modes of communication like MASTER SLAVE communication, JTAG communication but for easy communication we are choosing RS232. Here we will connect the TXD (Transmitter) PIN of ATMEGA8 to RXD (Receiver) PIN of ARDUINO UNO
The data communication established is programmed to have:
- Eight data bits
- Two stop bits
- No parity check bit
- Baud rate of 9600 BPS(Bits Per Second)
- Asynchronous communication(No clock share between ATMEGA8 and UNO (both have different clock units))
For establishing UART between Arduino Uno and ATMEGA8 we need to program the setting accurately. For this we need to keep the above mentioned parameters same at both ends. In this one acts as TRANSMITTER and other acts as RECEIVER. We will discuss each side settings below.
For more detail: How to establish UART communication between ATmega8 and Arduino Uno?
Leave a Comment
You must be logged in to post a comment.