View previous topic :: View next topic |
Author |
Message |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
CAN multi packet ( >8 byte data) anyone have any ideas ? |
Posted: Mon Nov 30, 2009 8:21 am |
|
|
I am planning a project using CAN for the first time.
I dont want to use a complicated protocol like J1939, or CANOpen etc.
At this stage I want to send say 64 bytes of data as a transaction.
I am well aware that CAN is 8 bytes per xfer.
I have the CCS dev kit, and it works fine.
I envisage sending text strings to an LCD , so 8 bytes is not enough
does anyone have any code to split the data into multi-packets, and then reassemble them at the other end ?
Mike |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1909
|
|
Posted: Mon Nov 30, 2009 10:19 am |
|
|
It's not hard to figure out a workaround. You have 31 bits of address in a CAN transaction, so use that to come up with a solution. In that 31 bits, somehow specify a message source, message destination, message purpose and other things necessary for the purpose. The transmitter assembles the message with the proper source/destination/purpose/transaction 0 of x all incorporated into the address. The receiver only responds to messages directed at it (set up by the message filters), and uses the data in the address to reconstruct the 64 byte payload. If necessary, add ACK replies from RX -> TX to avoid the TX from overwhelming the RX. |
|
|
|