squiggles, you are not wasting my time! I really appreciate your suggestions. They are very helpful.
I ordered the parts today. The boards came to the engineer too. I need to ship 3 programmed AtMega8's to him, but I can't really test them first, since the old control section isn't working any more. I've simulated them, and one problem is that the simulator doesn't seem to really do a good job with the USART. The USART data register never gets empty in the simulator! It acts like an infinite loop.
void PutCharUSART(unsigned char c) {
// wait until UDR ready
while(!(UCSRA & (1 << UDRE))); // wait until the USART data register is empty.
UDR = c; // send character
}
Oh dear. Maybe I should leave that part out?
|