Atmel AVR Microcontroller discussion group.
Cannt write to 90S8515 UART - atelierrobin - May 14 14:49:00 2002
Hi all,
I cannot get the 90S8515 UART device to work as specified. I try to
run this code right after
reset and it gets stuck in a loop (waiting for USR bit 5 to be
set?) which never happens.
I added the "out PORTB" instructions in the loop so I can monitor
port B pin 0 with
an oscilloscpe and tell it is looping forever.
Clock rate is 4MHZ and baud rate register is set to 0x19 for 9600 baud
Am I doing something wrong?
writeUart:
push temp
ldi temp2,0b00000001
wu1:
out PORTB,temp2
com temp2
in temp,USR
sbrs temp,5
rjmp wu1
pop temp
out UDR,temp
ret
Thanks!
Patrick

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: Cannt write to 90S8515 UART - mverlinden - May 15 6:52:00 2002
Check this design note...
http://www.avrfreaks.net/Tools/showtools.php?ToolID=237
--- In avrclub@y..., "atelierrobin" <circaeng@h...> wrote:
> Hi all,
>
> I cannot get the 90S8515 UART device to work as specified. I try to
> run this code right after
> reset and it gets stuck in a loop (waiting for USR bit 5 to be
> set?) which never happens.
> I added the "out PORTB" instructions in the loop so I can monitor
> port B pin 0 with
> an oscilloscpe and tell it is looping forever.
>
> Clock rate is 4MHZ and baud rate register is set to 0x19 for 9600
baud
> Am I doing something wrong?
> writeUart:
> push temp
> ldi temp2,0b00000001
> wu1:
> out PORTB,temp2
> com temp2
> in temp,USR
> sbrs temp,5
> rjmp wu1
> pop temp
> out UDR,temp
> ret
>
> Thanks!
>
> Patrick

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )