Traumflug / simulavr

A fork of SimulAVR (http://www.nongnu.org/simulavr/) for handling contributions. The practical SIMINFO mechanism implemented here wasn't accepted upstream, but is crucial for Teacup Firmware simulations, so this fork will stay ... and follow upstream. Default branch is 'traumflug', master here matches master on nongnu.org.
GNU General Public License v2.0
40 stars 26 forks source link

using arduino libraries, baudrate appear to be wrong #4

Open pat1 opened 10 years ago

pat1 commented 10 years ago

using this patch: https://github.com/pat1/simulavr/commit/1a918c7b3ecdbccde7b991a11813c7677cb4f971

and a standardard build for arduino uno defining a serial device working at 9600 baudrate I have to use this command to get the serial stdin/stout to work well:

simulavr -d atmega328 -z -b 9600 -F 32000000 --file mqtt_ethernet.cpp.elf

but the arduino uno board is a board with 16Mhz clock

using: simulavr -d atmega328 -z -b 9600 -F 16000000 --file mqtt_ethernet.cpp.elf puts wrong character in the stdout serial monitor

Any suggestions ?

Traumflug commented 10 years ago

Looks like Arduino libraries use the U2X flag (double speed serial) even for low speed serial communications. Unfortunately, this flag doesn't work in SimulAVR. With Teacup, I have to limit baud rate to 38400 to avoid this flag.