Mike; You are better off flagging the recieved character while you are in the interrupt, then allowing a main line code function find the flag and process the character. Depending on your baud rate and main loop execution period, of course, but many times the main routine is cruising along so fast that you can easily catch all chars. Otherwise, you might buffer them up in the int, and look for a valid complete message there, like 6 characters (remember to consider lost characters), at which point you flag the main routine to do something with it. When you share a buffer, or a flag, or any other variable between main line code and an interrupt, get in the habbit of declaring it volatile. This is especially useful for int types, where accessing a multipart variable simultaneously would cause gross errors. This one is a subtle one, you might read up on it. Try not to share executable code between int and main line code. It is a sure way to fail. Chris~ Michael Shiloh wrote: > Hi Gang, > > Quick question: > > I'm using the C2C compiler with a 16C63. I'm writing some code > around an interrupt driven serial port using the on-board USART. > I use a circular buffer to queue characters for transmission. > > I have a function to remove a character from the buffer, and I > call this from both an ISR and main code, and I get a warning > for doing so: > > Warning: Function '_SerTxBufferRemove' used both in interrupt and main code > > Is it not permitted to call a function from both interrupt code > and main code? > > Thanks, > Michael > > -- > 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 -- 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