This is just puzzling. I am using Atmel Studio 7 with an Arduino Uno. I want to display data on the terminal window. It works just fine as long as the STS UDR0, R20 command is in the main line of processing. If I put that command into a called subroutine, the terminal display fills with the first character, repeated over and over. I can code the same thing over and over if needed, but it is irritating. Yes, I am coding in Assembler. I am using lines copied from the Atmega 328p datasheet. I am setting the UBRR0 to 00:67 hex. That is a little bit of Kentucky windage there. The manual had suggested 66 for an mpu running at 11.8 mhz. The Uno has a 12 mhz crystal.
As I say, it works just fine as long as all my writes to terminal happen in the main portion of the program.
Suggestions? Comments? Questions