I want to use UART protcol to to communicate an external working atmega32 and the arduino…I am newbie to UARTs…the basic steps I assume is initialize UART on ATMEGA and ARDUINO both at same baud rate…now how do i do that on arduino…???the serial command can only print …right??? how to send eg. “A” to other u-controller when button is presses or soo…i will have a code on the u-controller to light the led when it receives LED…some tips and suggestions will be greatly appreciated…
Too many … Must recompute:
-
I want to use UART protcol to to communicate an external working atmega32 and the Arduino
-
I assume the basic steps are to initialize the UART on ATMEGA and ARDUINO both at same baud rate
-
How do I do that on Arduino?
-
The serial command can only print; right?
-
How do I send an ASCII “A” to the other u-controller when a button is pressed on the Arduino?
-
How do I make an LED turn on on the u-controller when it gets the “A”?
Answers:
-
Great.
-
Correct
-
Serial.begin(115200); // Where you put the right number for your baud rate.
-
The Serial class has other operators. Google will be your best friend.
-
There are many samples of this on the web. The basics are to use pinMode in the Setup function to define an input pin. Then in the loop function, poll the pin using digitalRead. If that pin is in a condition you want, use Serial.print(“A”) to send the byte.
-
This is much more complicated. We would need way more information that you provided to answer that. What exact chip are you using, what is the development environment, what language are you writing in, how fast a response do you need, …
PS: Good questions can good answers.
hi thanks so much for your info…now m getting started with communication protocols…now i understand your answers…i will update you when i am done with arduino-----atmega32 interfacing and led lighting goal…have nice weekends!!