ATtiny 841 Serial comms baud rate


hi guys

was wondering if tell me frequency crystal should use attiny841 in order use 1 or both serial ports @ 57.6k baud?  or internal oscillator @ 8mhz accurate enough without need external oscillator?

bernie

tattoo site on of eyelids http://wormfood.net/avrbaudcalc.php?u2xmode=1 (or bookmark - that's too) - incredibly useful when figuring out whether baud rate , frequency combo "should" work. use u2x column.

as can see, @ 8mhz, 57600 couple % off, it'll work (like on 8-bit avr).

the internal oscillator enough serial @ 57600 baud @ 3.3v. above 4v, speed of internal oscillator swerves skyward, , closer 8.1mhz, far enough off doesn't work. know i sell attiny841 boards on tindie; after bootloading them, test programming blink on serial - far i've yet find 1 wouldn't work @ 57600 baud internal 8mhz @ 3.3v. @ 5v, though, never work on internal oscillator - though of course crystal.

for reason, use crystal myself, typically 8 or 16mhz (for 3.3 , 5v operation, respectively - of course, crystal, everything's fine 8mhz @ 5v)

if you're picky uart clock speed being 0.0% off instead of 1-2% off, can use uart clocked crystal, , latest versions of cores support common ones (7.37, 9.216, 11.056, 14.7..., 18.whatever), though microseconds() takes longer return on weird clock speeds core (it gives wrong answers arduino cores). don't need use exotic crystal though, said - plain old 8mhz , 16mhz crystals work fine.



Arduino Forum > Using Arduino > Microcontrollers > ATtiny 841 Serial comms baud rate


arduino

Comments