??? 09/22/05 09:40 Read: times |
#101358 - CRC? Responding to: ???'s previous message |
Russell Bull said: Great point!
The FTDI FT232 USB-> serial chip has a handy feature in that it has an output that can be used to control a RS485 driver - no software needed. Russell Bull said:
As for actual delay times for bus turnaround, I find it is the code that takes time to process the incoming packet and send a response that creates the delay - especially if it has a CRC attached. Do you mean the slave in '51? My routine calculates CRC-16 or 1 byte in around 40 cycles, and it's nothing spectacular (if it would be table-driven it could be probably faster). Of course I calculate CRC on the fly as I recieve the bytes, so after the last byte it takes only those 40 cycles for the CRC. Altogether the whole protocol checking, answer preparation etc. took me around 200 cycles which means on a standard 12-clocker at 22.1184MHz around 1 bit time for 9600baud (cca 100us)... (as I mentioned, to be on the absolutely safe side I insert several characters' delay, typically around the 3-5ms). Of course the protocol might be more complex and the speed higher, but also there are now faster '51s around - so I think the CRC should not be a real limitation of the turnaround time. Jan Waclawek |
Topic | Author | Date |
Delay times for switching RS485 lines? | 01/01/70 00:00 | |
MODBUS | 01/01/70 00:00 | |
Driver enable and disable time | 01/01/70 00:00 | |
caution | 01/01/70 00:00 | |
delay time | 01/01/70 00:00 | |
make a master | 01/01/70 00:00 | |
I don't think it is the problem | 01/01/70 00:00 | |
not the PC, not the windows | 01/01/70 00:00 | |
Thank you all | 01/01/70 00:00 | |
non-pc master | 01/01/70 00:00 | |
Check out the FTDI serial chip | 01/01/70 00:00 | |
CRC? | 01/01/70 00:00 | |
CRC? | 01/01/70 00:00 | |
I see![]() | 01/01/70 00:00 | |
Another happy FTDI user | 01/01/70 00:00 | |
USB as mentioned below sounds good, but | 01/01/70 00:00 |