Hi,

You have to set clock frequency in simulation with command line option -F! Default is 4MHz! And you will get at least a small difference: simulavr time unit is 1ns and period for 16MHz is 62.5ns!

cu, Thomas


Am 21.03.2016 um 10:08 schrieb Valber:
Attached program send 'A' word an UART(F_CPU=16MHz, Baudrate=9600), delay between Word 50ms.

Start record, launch:
simulavr -c vcd:tracein.txt:trace.vcd -f uart_clear_c_tx.elf -d atmega16

After that, I view file in GTKWave and Pulseview(Sigrok) [attached image]

Decoded Baudrate = 2400 = 9600/4
And delay between Word 'A' ~=200 = 50*4

Dirty Hack solved this problem, change in VCD file
from
$timescale 1ns $end
to
$timescale 250ps $end


_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/simulavr-devel

_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to