> > Hi, I wonder what is the fastest reliable speed for RS232 com. > > that is common for pic projects? > > > > I need to 'talk' to a PIC18F458 (@20MHz) as fast as possible and > > reliable. Hoping to avoid handshake lines. Much of the data will be > > sent/recived to the canbus at the same time. > > > > Would be greateful for serial com. code examples in Microchip C18 > I've done 115,200 baud reliably on a 18F452 with a 18.43Mhz crystal > using HiTech PICC, all interrupt driven. > > One thing to check is the accuracy of the frequency division for the > UART generator. I figured I could do 115K baud reliable with a 20Mhz > crystal (about 3% error), but the EE in charge wanted to have an "exact" > frequency division for baud rate accuracy. > > Also, is your data "bursty" or continuous? If it's continuous, your limitation > may be processing speed and not the reliability of the RS232 link. > > A checksum byte and an ACK byte are very useful in your comm protocol, > to make sure you receive valid data and the sender knows it. Hi The data is 3 to 5 bytes max in a 'burst' and very little has to be done to the data. Basically just send/read from the CANbus or write/read Port A-E. So 115200 baud would be approx max. - that speed is most likely okey for my purpose. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist