hexagon5un / AVR-Programming

Code examples for the book "Make: AVR Programming"
http://littlehacks.org/AVR-Programming
MIT License
725 stars 340 forks source link

Issue with Serial Connection on Arduino #49

Open willie-shen opened 3 years ago

willie-shen commented 3 years ago

I am currently on Chapter 5. So the thing is I am using an Arduino (meaning using the m328p). I flash my arduino with the SerialLoopback code. I hook up a USB to TTL from my computer onto my Arduino.

It is strange, because when I set the bit rate on the serial monitor to 9600, the LED lights are not lighting up. In addition to that, the serial monitor is printing out unreadable code.

The only way the LED lights are lighting up is if I set the BAUD rate to 115200. However, I am still getting gibberish data printed out on the serial monitor. Why is it that when I set the BAUD rate to 9600, I don't get any LED lights lighting up (the RX and TX lights on the USB to TTL do happen to flash)

willie-shen commented 3 years ago

To add onto that, if I connect the RX and TX together on the USB to TTL, I am able to loopback the data

willie-shen commented 3 years ago

I also noticed that the rated speed, using CoolTerm, was 115200, so I changed the BAUD to that value on the makefile. In addition, I changed USB to TTL serial adapters, but was still getting gibberish output on my laptop, anyway to fix this