USART problem on m88

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

USART problem on m88

georg chambert
Hi, I have been struggling with a strange problem with uart; I  have  a small program that worked well (and derivates of)
on my atmega8, however, wanted to gear-up to a atmega88 (for sleep mode among other).
 
Now after having catered to some (unecessary incompatibility) issues, changing names,  i..e adding 0  to a number of symbols (like UDR0 instead of UDR)
the program runs on the 88.  (exactly the  same code running on both, except for the symbolic names changed)
 
However the data coming out on the UART is random characters, though with the same count (I  think) as the number of  characters sent.
 
Any clues would be good.
 
georg

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

blu88.lst (14K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USART problem on m88

Parthasaradhi Nayani
Hi,
Did you check fuse bits? Are you using external crystal/resonator or internal?
 
Regards,
Parthasaradhi
Hyderabad


On Monday, January 16, 2017 11:59 PM, georg chambert <[hidden email]> wrote:


Hi, I have been struggling with a strange problem with uart; I  have  a small program that worked well (and derivates of)
on my atmega8, however, wanted to gear-up to a atmega88 (for sleep mode among other).
 
Now after having catered to some (unecessary incompatibility) issues, changing names,  i..e adding 0  to a number of symbols (like UDR0 instead of UDR)
the program runs on the 88.  (exactly the  same code running on both, except for the symbolic names changed)
 
However the data coming out on the UART is random characters, though with the same count (I  think) as the number of  characters sent.
 
Any clues would be good.
 
georg

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: USART problem on m88

Erik Christiansen-2
In reply to this post by georg chambert
On 16.01.17 19:28, georg chambert wrote:
>
> However the data coming out on the UART is random characters, though
> with the same count (I  think) as the number of  characters sent.
>
> Any clues would be good.

Based on available info, it's only possible to guess. In my experience,
random characters have usually been due to a baudrate mismatch between
sender and receiver. If you have an oscilloscope, then looking at a
bunch of 0x55 or 0xAA characters on TXD will check that. If not, then an
m88 timer could measure the interval between successive tx-buffer-empty
interrupts, perhaps.

First, however, triple checking the baudrate prescaler config at both
ends, preferably after a good night's sleep - and a strong coffee, could
be beneficial. The thing with such small porting edits is that they are
as unforgiving as they are trivial in scope. (Remember; the silicon
works. ;-)

Silly question - there isn't a forgotten data stream inversion in the
serial link, is there?

Erik

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Loading...