I figured something like that, but since my serial port wasn't spitting out anything, I had to question it. I wrote a small test program in assembler to send out a char repetitively and it still doesn't work. I am using an atmega16 on stk500 using their rs232 spare port. I don't have a scope with me, but I did hook the serial port to a known good port on my computer with a decent terminal program (realterm). This is my first try with an avr so I am not not sure if it's a fault in what I am doing in code or if there is a hardware problem. Here is my code:
.include "m16def.inc"
.cseg
.org 0
jmp RESET
.org 0x100
RESET:
ldi r16,0x02 ; not sure if this is needed
out DDRD,r16 ; setting up the tx pin as output
ldi r16,0xFF ; and
out PORTD,r16 ; enable pullups
clr r17
ldi r16,5
out UBRRH, r17 ; 5 = 115200 baud
out UBRRL, r16
; Enable receiver and transmitter
ldi r16, (1<<RXEN)|(1<<TXEN)
out UCSRB,r16
; Set frame format: 8data, 2stop bit
ldi r16, (1<<URSEL)|(1<<USBS)|(3<<UCSZ0)
out UCSRC,r16
ldi r16,'A' ; char to send
;**** Test input/output
LOOP:
; Wait for empty transmit buffer
USART_Transmit:
sbis UCSRA,UDRE
rjmp USART_Transmit
; Put data (r16) into buffer, sends the data
out UDR,r16
rjmp LOOP