Charles Linquist
Member
I have a demanding RS-232 application for Teensy (3.2). I am fluent with Microchip PICs but very few have 3 H/W serial ports. I thought I would try to use a TEENSY for this application and learn Arduino at the same time.
The application needs 3 interrupt-driven H/W serial ports to process packetized data. That is why TEENSY seems like a good fit.
All packets are 8-256 bytes and come in at a rate of about once per second. The second byte in each packet contains the (variable) packet length.
Port #1 RECEIVES RS-232 packetized data at 115200 baud and puts it in BUFFER 1.
Port #2 TRANSMITS the data in BUFFER 1 out at 115200 baud (unchanged).
Port #3 TRANSMITS the data in BUFFER 1 out at 57600 baud (unchanged - except for baud rate)
Port #2 RECEIVES data at 115200 baud and puts it in BUFFER 2
Port #3 RECEIVES data at 57600 baud and puts it in BUFFER 3
A CRC algorithm is run against BUFFER 2 and BUFFER 3
If the CRC of BUFFER 3 is correct, BUFFER 3 is sent out PORT #1 at 115200 baud (unchanged - except for baud rate)
If the CRC of BUFFER 3 is is not correct, and the CRC of BUFFER 2 is correct , then the contents of BUFFER 2 is sent out PORT #1 at 115200 baud (unchanged).
If the CRC of both BUFFER 2 and BUFFER 3 are correct, the contents of BUFFER 3 is sent out of PORT #1 at 115200 baud (unchanged - except for baud rate).
So I have some questions:
Would a TEENSY 3.2 be capable of this?
Are all the H/W serial ports interrupt-driven?
What libraries should I try to use?
Any other "words of wisdom"?
Alternately, would someone write this routine for me for less than $300?
The application needs 3 interrupt-driven H/W serial ports to process packetized data. That is why TEENSY seems like a good fit.
All packets are 8-256 bytes and come in at a rate of about once per second. The second byte in each packet contains the (variable) packet length.
Port #1 RECEIVES RS-232 packetized data at 115200 baud and puts it in BUFFER 1.
Port #2 TRANSMITS the data in BUFFER 1 out at 115200 baud (unchanged).
Port #3 TRANSMITS the data in BUFFER 1 out at 57600 baud (unchanged - except for baud rate)
Port #2 RECEIVES data at 115200 baud and puts it in BUFFER 2
Port #3 RECEIVES data at 57600 baud and puts it in BUFFER 3
A CRC algorithm is run against BUFFER 2 and BUFFER 3
If the CRC of BUFFER 3 is correct, BUFFER 3 is sent out PORT #1 at 115200 baud (unchanged - except for baud rate)
If the CRC of BUFFER 3 is is not correct, and the CRC of BUFFER 2 is correct , then the contents of BUFFER 2 is sent out PORT #1 at 115200 baud (unchanged).
If the CRC of both BUFFER 2 and BUFFER 3 are correct, the contents of BUFFER 3 is sent out of PORT #1 at 115200 baud (unchanged - except for baud rate).
So I have some questions:
Would a TEENSY 3.2 be capable of this?
Are all the H/W serial ports interrupt-driven?
What libraries should I try to use?
Any other "words of wisdom"?
Alternately, would someone write this routine for me for less than $300?