A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
Hey all. I have a PIC18F452 doing serial comm with my PC via one of it's UARTs. I wrote a simple test program that outputs a char every second, and echos serial input. I open up a terminal, chars are coming in every second, key strokes are echoed, all is well. Until I try to send a bunch of chars quickly, like pressing keys very fast. The first 5-8 chars get through (are echoed) and the rest are ignored, they simple do not arrive at the PIC, nor does any other key pressed after that. It's like I chocked the UART and killed it. Only a reset fixes the problem. Any ideas why this is happening ? |
|
|
|
> It's like I chocked > the UART and killed it. Only a reset fixes the problem. > Any ideas why this is happening ? - are you sure the problem in't on the PC side? - when sending fast, do you wait for the UART buffer to be empty? Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products |
|
|
|
--- In , "Wouter van Ooijen" <wouter@v...> wrote: > > It's like I chocked > > the UART and killed it. Only a reset fixes the problem. > > Any ideas why this is happening ? > > - are you sure the problem in't on the PC side? > - when sending fast, do you wait for the UART buffer to be empty? > > Wouter van Ooijen > Aha ! Good point, no, no waiting on the PC side. Tommorow's headlines, "buffer overflow kills UART" Thanks. |