Hi Bob, At work they use serial LCD's I personally do not like them at all but It wasn't my choice. 6 serial LCD's I used pic18F4550 with CCS c compiler Software UART it did it by just adding 1 line of code per uart. CCS has built in function. In fact with software uart I could invert the data but using hardware uart can't be done only externally can be inverted. Andre -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Bob Blick Sent: Thursday, June 12, 2008 8:56 AM To: Microcontroller discussion list - Public. Subject: Re: [PIC]: Multiple serial (RS232) interfaces on a PIC18Fxxxx On Thu, 12 Jun 2008 15:46:22 +0200, "tinu b" said: > i need to handle multiple serial interfaces on a pic18fxxxx (28pin pic). > > i need at least 2 bidirectional rs232 interfaces, running at 9600bps. > > there is no 28 pin pic with 2 hardware usart interfaces, so i think i > need a > software solution. > > i tried to design a 2 channel full duplex software uart, running with 8x > oversampling, polling the rx lines, detecting startbit and sampling rx > lines > in the middle of the bit of each rx line. > unfortunately, this seems to use the full power of the pic, not leaving > any > performance left to do other things. > is there a good solution for a pic18 multi-uart around? Hi Tinu, I have done one 9600 bps uart using timer0 interrupt in software with a circular buffer at 14MHz on a 16F84A. In "C". So you should be able to do it on an 18F with two software uarts. You can sample at 2x the baud rate. Setting your timer interrupt to some exact multiple of the baud rate is important. So in this case interrupt 19200 times per second. If you have a 40MHz clock you should have plenty of cycles left over even with two software channels. Cheerful regards, Bob -- http://www.fastmail.fm - Access all of your messages and folders wherever you are -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist