Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

UART serial communication problem

Status
Not open for further replies.

nafri

New Member
Hi all,

I have a trouble with UART. I want tom make AVR programing to get UART communication via USB. I also use terminal. exe to sent data, firstly my plan is that I sent to Arduino a char and receive integer like '1'. it can be quite simple but I can not make this. Also every documents make echo which is sent a char and come back same char I also make this and also I have problem with this because when I write terminal ' a ' it can sent it back but when I write 'c' it sent another char such as 'b ' how can I tackle this problem. thanks for your attention....
 
Baud rate is wrong. # Start bits wrong. #of Stop bits wrong, Wrong data length, Parity (odd, even or none are options), wrong handshake signals.

Some of my older techniques is to loop back the data, that at least tells you you can send.

Did a lot with RS232 since 1975 or so, You always needed an expensive little box that could re-route any signal and you had lights for every signal. Then IBM went 9 Pin any really messed stuff up.
 
ok.. thanks for your reply now I solve the problem but when I write 'a' it always send "1" it enters the infinite loop I think Icansolve this problem with udr0. if I can clear inside the UDR0 after send.I beleive it can exit the infinite loop. how can I clear inside of the udr0.
 
The way I setup UART is that I keep sending a character or string in a loop within the microcontroller, and then I try setting up the baud rate so that the computer can receive it. Also you might wanna look at it on an oscilloscope.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top