LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN protocol

I am using Labview 7.1 as SW to send LIN command(Identifier+databytes) to an Atmega board which generate the protocol, does anybody know how to calculate in LV the checksum for the identifier and databyte(see the comment below)?

The checksum is the inverted modulo-256 sum

over all data bytes(Identifier+databytes). The sum is calculated by an 'add with carry' operation with the carry bit of

every addition being added to the LSB of the resulting sum.

 

0 Kudos
Message 1 of 5
(3,934 Views)
0 Kudos
Message 2 of 5
(3,918 Views)

Hello unclebump,

Thanks for the reply but i am not looking for any LIN interface i am just looking for a code in Labview which can calculate the checksum of the identifier an all databytes from the LIN protocole, it is in fact an inverted  modulo-256, in assembler we do it as an add with carry.  

 

0 Kudos
Message 3 of 5
(3,908 Views)
See attached VI.
0 Kudos
Message 4 of 5
(3,902 Views)

HI JB,

I have used your via in the following way (see attached pic).

Thanks again

 

0 Kudos
Message 5 of 5
(3,836 Views)