??? 02/14/07 15:25 Read: times |
#132916 - Get a 1X Chip Responding to: ???'s previous message |
If you use a derivative chip (such as one of the SiLabs parts) with a 1X crystal to the the machine cycle rate then you should be able to find time for processing at the 115.2K baud rate. At a somewhat standard 8N1 type serial port format there are 10 clocks per character which computes 11520 bytes per second flowing on the RS485 line. My calculation indicates that this is 86.8 microseconds per byte. Now at the 1X clock divide ratio and using a 22.1184MHz crystal you will realize a total of 1920 machine cycles per byte on the serial port.
SiLabs parts have a good average of instructions at 2 machine cycles each and so this gives you some 1000 assembler level instructions ot work with. Should be possible to make work!! If I were you, in this application, I would definately use the 1X SiLabs part. I would also write the serial port interrupt logic in as tight of assembler as possible. If you have the Keil tool set it is no problem mixing C and Assembler code together in one program. One other thing I would do is in the serial port interrupt routine I would loop back to check if another character has arrived and if so process it before leaving the interrupt service routine. This way you can save the interrupt latency time overhead on some of the bytes received. One last suggestion I would recommend is to carefully design your RS485 interface to make it so that you do not end up receiving the bytes you send duuring an outgong packet. This is a common error in some designs where the receiver part of the RS485 chip remains enabled during transmit and you end up potentially doubling the interrupt load while sending. - Michael Karas |