The program seems to hang on the gets instruction.
There must be something in the buffer or the interrupt
wouldnt fire. I have tried Get_String and getc() with similar results.
any help would be greatly appreciated.
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
Posted: Fri Mar 30, 2007 9:33 am
The problem is that the gets() function is hanging because your first printf() statement is taking way too much time and the data, from your scanner, is already gone before the printf() is finished. Never, ever put a printf() in an ISR. ISR's should be short and sweet. If you need to verify which step the ISR is at then I would suggest you use LED's and set outputs along the way. Have your gets() be the first thing. Actually, I would use a getc() and stuff each character into a char bucket and then look at that bucket in the main body.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum