Discussion: Capture de trame CAN
Afficher un message
Vieux 29/05/2016, 00h33  
PIC16F84
Membre trés attaché
 
Avatar de PIC16F84
 
Date d'inscription: décembre 2008
Localisation: alger centre
Messages: 648
Thanks: 242
Thanked 564 Times in 236 Posts
Pouvoir de réputation: 23
PIC16F84 is a name known to allPIC16F84 is a name known to allPIC16F84 is a name known to allPIC16F84 is a name known to allPIC16F84 is a name known to allPIC16F84 is a name known to all
Par défaut

Citation:
Envoyé par louisbmx11 Voir le message
Salut,
tu peux essayer çà
http://www.peak-system.com/PCAN-View.242.0.html?&L=2
le vrai défi c'est d'avoir une bonne interface! bus CAN vers USB là il tout les prix et toutes les qualitées
un grand merci a louisbmx11 pour le site une library trop riche en quatre langage Pascal/C#/C++/Visual Basic pour le CAN et LIN ,je me commence maintenant d'écris mon premier code pour le Bus LIN par des copier/coller de code source de library a mon premier projet
Code:
// TLINVersion
// Defines a version information.
typedef struct
{
    short Major; // Major part of a version number.
    short Minor; // Minor part of a version number.
    short Revision; // Revision part of a version number.
    short Build; // Build part of a version number.
}TLINVersion;

// TLINMsg
// Defines a LIN Message to be sent.
typedef struct
{
    BYTE FrameId; // Frame ID (6 bit) + Parity (2 bit).
    BYTE Length; // Frame length (1..8).
    TLINDirection Direction; // Frame Direction.
    TLINChecksumType ChecksumType; // Frame Checksum type.
    BYTE Data[8]; // Data bytes (0..7).
    BYTE Checksum; // Frame Checksum.
}TLINMsg;

// TLINRcvMsg
// Defines a received LIN message
typedef struct
{
    TLINMsgType Type; // Frame type.
    BYTE FrameId; // Frame ID (6 bit) + Parity (2 bit).
    BYTE Length; // Frame length (1..8).
    TLINDirection Direction; // Frame Direction.
    TLINChecksumType ChecksumType; // Frame Checksum type
    BYTE Data[8]; // Data bytes (0..7).
    BYTE Checksum; // Frame Checksum.
    TLINMsgErrors ErrorFlags; // Frame error flags.
    unsigned __int64 TimeStamp; // Timestamp in microseconds
    HLINHW hHw; // Handle of the Hardware which received the message.
}TLINRcvMsg;

// TLINFrameEntry
// Defines a LIN frame entry.
typedef struct
{
    BYTE FrameId; // Frame ID (without parity)
    BYTE Length; // Frame length (1..8).
    TLINDirection Direction; // Frame Direction.
    TLINChecksumType ChecksumType; // Frame Checksum type.
    WORD Flags; // Frame flags.
    BYTE InitialData[8]; // Data bytes (0..7).
}TLINFrameEntry;
des copier/coller des define de mes structur et son commentaires de Bus LIN
__________________
programmation apl & micropic12/16/18
communication i2c/spi/microwire/usb/rs232/rs485/jtag/CANbus
PIC16F84 est déconnecté   Réponse avec citation