I am using AVRSTUDIO4 togheter with ATMEGA16 device, include "m16def.inc"
When debugging following code with STUDIO4 i see that UCSRC & UBRRH are
always BOTH updated when one of them is changed.
ldi R17,$47 ;9600Baud
@ ldi R17,(1<<RXEN)+(1<<TXEN)+(1<<RXCIE)
* out UCSRC,R17
@ Receiver, Transmiter and Receive complete interrupt are enabled
* R17 contains 10000110
Most significant bit is 1, URSEL, so with should select UCSRC.
I See value 86H being filled in UCSRC and in UBRRH ??
Also, when i change the first line into ldi R17,$0A iso clr R17
Then also, on the out UBRRH,R17 instruction the UBRRH and the UCSRC are
Both updated with value 0A ??
Can anyone tell me what i am doing wrong
Remark: USART is NOT transmitting any data when program is loaded.
Thanks in advance,