Hi, I am trying to use the UART on the PIC18C452 to read serial output from the computer. I have successfully been able to send serial output and view it on the computer, but I want to go the other way. I am using the MPLAB C18 C compiler, sofware UART, interfacing to the computer through a MAX233 chip. What I want to do is have a place in the program where the PIC checks for data from the computer, or it waits there for a certain character to be sent from the computer. For example: ... char SerialIn; //character to hold data from UART ... SerialIn=ReadUART(); //reads a character in through the Software UART while(SerialIn != 0x30){ //wait while SerialIn is not 0x30 ('0') SerialIn=ReadUART(); //read a character from the Software UART } ... The program will pause at this point and wait, but this code does not seem to work. Perhaps it is a timing problem? What i'd really like to do is use some kind of interrupt, but i'm not sure how to go about that. Is there a buffer that could hold this serial information that I could just periodically check instead of continuously polling the UART input pin? I appreciate any help that you can offer. Thanks! James Hyslop ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately. This footnote also confirms that this email message has been swept by MIMEsweeper and Symantec Norton AntiVirus for the presence of computer viruses. ********************************************************************** -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics