avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] more detailed UART Problems


From: Karsten Becker
Subject: [avr-gcc-list] more detailed UART Problems
Date: Thu, 04 Apr 2002 18:17:38 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311

Hi everybody,
I found this very interesting piece of code that makes problems.
#include <progmem.h>
#include "uart.h"
u08 newval=0xFF,oldval=0xFF;
int main(void) {
   UART_Init();
   outp(0x00,DDRA);
   for (;;) {
       newval=inp(PINA);
       if (newval!=oldval) {
           oldval=newval;
           PRINT("Dumping memory");
           EOL();
       }
   }
}

SIGNAL(SIG_UART_RECV) {
   UART_RxChar = inp(UDR);
}

The symtom is, when you reset the 8535 and press a switch, the Text Dumping memory is send normally. But when you send a char to the ┬ÁC and then press the switch just the big D is written to the terminal.
Maybe someone has an idea.
Thanks,
Karsten

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]