arduino - Matched pair of Atmega168 running at slightly different clock speeds -
i have 4 rfbees seeedstudio.
i've been able reprogram them identical code. 1 of them seems running @ different speed.
i first noticed when establishing serial connection change baud rate. regardless of me using 9600, 19200 or 38400 end of each response 1 of devices scrambled, instead of "1 ok" getting "1 o€" or something.
each device has heartbeat led , i've noticed malfunctioning 1 running @ different speed, appears losing aproximately 1 second in every ten.
does have ideas problem is? i've disconnected rfbees except 3v3 gnd tx , rx pins. i'm communicating them using arduino mega.
is possible fuses might set differently 1 of devices?
the results calling serial.println(f_cpu) in loop() are:
for functioning device
8000000 8000000 8000000 8000000 8000000
for malfunctioning one
80000cá800cá8000j 80000 á800 á800cá80j 800cá80j 800j 800 á80000cá800 á8000j 80000 á80j 8000cá80000 á8000j
the first thing check whether malfunctioning arduino using internal rc oscillator or external crystal. internal rc slower , considerably less accurate crystal, , lead kinds of timing errors you're seeing.
you can check oscillator being used reading fuse bits of chip.
if external crystal being used, there may hardware issue malfunctioning device.
Comments
Post a Comment