Forum: µC & Digital Electronics UART in AtmelStudio6

von menimeniyong (Guest)

Attached files:

Rate this post
0 useful
not useful
Greetings to all readers!

I have a nice problem and I am happy for all your answers.


I tried to send data from my atmega8 to HTerm 0.8.1 beta but it received 
only \0\0\0...
Hence, I concentrated on the simulation in AtmelStudio6: The code I used 
is visible on http://www.mikrocontroller.net/articles/AVR-Tutorial:_UART 
under "Senden von Zeichen" and in the attachment.

Symptoms in the Simulator of AtmelStudio6:

When debugging I observed some effects that are hopefully interrelated:
- URSEL stays at 0.
- No changes can be observed in UDR.
- UDRE wont come back to 1...not after 1200 steps.
- TXC stays at 0, too.
- Only two loop-cycles ('T' and 'e') are run through, then UDRE is set 
to 0...and the program wont exit the serout-sub-routine.

I read the fantastic mannual and browsed the forum but couldn´t find a 
hint to make the uart work.

Thank you for your comments and ideas!

Best regards


von menimeniyong (Guest)

Rate this post
0 useful
not useful
I found an answer to the UDR and the TXC "problem" and probably also for 
the URSEL "problem" in the Atmel Studio6 Manual:

"In some cases, read and write access go to different hardware 
locations. The effect ot this may be that attempting to change a 
register/bitfield has no visible effect even if the register is actually 
written (like the USART UDR register in many devices), or that the 
effect is delayed by one or more cycles (like registers with double 

...to be continued...


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.