Society of Robots - Robot Forum

Software => Software => Topic started by: raul on March 10, 2013, 06:50:54 AM

Title: communication between atmega16 and atmega162
Post by: raul on March 10, 2013, 06:50:54 AM
can someone plz help me with uart communication between atmega16 and atmega162,,,,,,
Title: Re: communication between atmega16 and atmega162
Post by: waltr on March 10, 2013, 08:12:07 AM
can someone plz help me with uart communication between atmega16 and atmega162,,,,,,

Connect TX to RX, RX to TX and Ground to Ground.
Setup the UART in each Atmega for the same number of Start, Data & Stop bits. and the same Baud rates.

Now send data from one Atmega and receive the data on the other Atmega.
Title: Re: communication between atmega16 and atmega162
Post by: jwatte on March 10, 2013, 04:20:54 PM
If you're talking between two Atmegas, why are you using UART?
I2C and SPI are both better protocols for this purpose IMO. I2C is much more flexible, and SPI can run faster (but uses more pins.)