Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
label instruction instruction cycles instruction cycles putchar0 brcc putchar1 1 2 cbi 1 x rjmp putchar2 2 x putchar1 sbi x 1 nop x 1 putchar2 nop 1 1 nop 1 1 nop 1 1 lsr 1 1 dec 1 1 brne putchar0 2 2 Total 11 Total 11
Yours seems to be 4 instruction cycles per bit which should be 4MBaud @16MHz by my calculations
I would suspect that there may be some additional state saving/restoring being added by the compiler
00000100 <loop>: 100: 5f 9a sbi 0x0b, 7 ; 11 102: 5f 98 cbi 0x0b, 7 ; 11 104: 5f 9a sbi 0x0b, 7 ; 11 106: 5f 98 cbi 0x0b, 7 ; 11 108: 5f 9a sbi 0x0b, 7 ; 11 10a: 5f 98 cbi 0x0b, 7 ; 11 10c: 5f 9a sbi 0x0b, 7 ; 11 10e: 5f 98 cbi 0x0b, 7 ; 11 110: 5f 9a sbi 0x0b, 7 ; 11 112: 5f 98 cbi 0x0b, 7 ; 11 114: 5f 9a sbi 0x0b, 7 ; 11 116: 08 95 ret
completely missed that