Use SPI or MMC block for CAN buffer?
Posted: Mon Sep 14, 2009 4:10 pm
Hello,
I have written a flowcode program to receive CAN messages, convert them and transmit over RS232. The ultimate goal is to transmit over a phone line then convert back into the original CAN messages. The challenge I'm having is the relatively slow baud rate of RS232 (especially over a phone line) compared to CAN (most of the systems I deal with are 250k baud). This is causing me to miss many of the messages as the CAN Tx is effectively sending out "bursts" (probably close to the 250k baud rate) of messages (note: the CAN messages are being generated by a separate system, I am using E-blocks strictly to receive them and Tx over RS232).
I was thinking of using either the SPI or MMC E-Blocks to use as a buffer for the CAN messages prior to sending out over RS232. Would either one of these work? Any recommendations? Using the SPI block with 8k memory would allow over 500 messages to be stored which would be plenty for my purposes.
Thanks for any help!
Best Regards,
Phil
I have written a flowcode program to receive CAN messages, convert them and transmit over RS232. The ultimate goal is to transmit over a phone line then convert back into the original CAN messages. The challenge I'm having is the relatively slow baud rate of RS232 (especially over a phone line) compared to CAN (most of the systems I deal with are 250k baud). This is causing me to miss many of the messages as the CAN Tx is effectively sending out "bursts" (probably close to the 250k baud rate) of messages (note: the CAN messages are being generated by a separate system, I am using E-blocks strictly to receive them and Tx over RS232).
I was thinking of using either the SPI or MMC E-Blocks to use as a buffer for the CAN messages prior to sending out over RS232. Would either one of these work? Any recommendations? Using the SPI block with 8k memory would allow over 500 messages to be stored which would be plenty for my purposes.
Thanks for any help!
Best Regards,
Phil