We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am quite new with both C and the 80C166, and would like to make a program that receives data from P3 via RS-232, and places it into a buffer. I have seen the HELLO program that comes with the evaluation kit, but I would like to make an interrupt instead, so my program may keep processing until data arrives on the port. Any code examples..? Thank You..!
I don't know the C166 processor, but the principles of serial data processing are always the same. You need a transmit and a receive buffer and for each buffer an input and output "pointer". An interrupt routine will react on the interrupts from the serial IO by determining the reason for the interrupt, like character received or send register empty and then put the received character into the receive buffer and advancing the recived input pointer or check if there are more characters to send in the send buffer and if so send it or set a transmit ready flag. You can find code samples in most code libraries for the C51, so I think, if you read that code carfully and understand what happens, you should eb able to modify it for the C166. Take care. Sven