I am trying to communicate between an Arduino and a non-Arduino AVR microcontroller. The problem is that when I send a character from the AVR, it comes through all mangled.
Mismatched baud rates is a likely cause.
Aside from the usual sort of typos in the code that sets the baud rate, if the other AVR is running on its internal oscillator (instead of a crystal or resonator), there's a chance that it's generating a baud rate that's too far out of tolerance.
It is using an external 16MGz crystal. I believe I have the fuze bits set correctly but I don't know how I would confirm this. Also the characters are coming across the same each time they are just the wrong characters.
Again… sounds like baud rate mismatch.
An AVR will usually mostly work with incorrect fuses… but the timing will be way off unless you are lucky. See what happens if you remove the crystal… if it behaves the same then you KNOW the fuse is set for internal clock. I know because this has happened to me.
Thanks! I have been using the internal crystal this whole time and I didn’t even know it. Works perfectly now.