Giter Club home page Giter Club logo

arduino_tss463_van's People

Contributors

doiiido avatar morcibacsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arduino_tss463_van's Issues

Read DATA from the VAN BUS with the TSS463C and arduino NANO

Salut,

  • I am trying to test a Arduino NANO + (TSS463C + MCP2551 CAN transceiver)
  • I use your library for the TSS463C
  • I connected the Arduino to the TSS463C according to your diagram (SPI)
  • I use the following code (from your example tss46x_van_reader)
  • I would like to read the IDEN 0xE24 which corresponds to the VIN of the vehicle
//tss46x_van_reader.ino
#include <SPI.h>
#include <itss46x.h>
#include <tss46x_van.h>

#include <tss463.h>
#include <tss461_intel.h>
#include <tss46x_with_serial.h>

uint8_t VAN_PIN = 7;

TSSPinSetup* pinSetup;

SPIClass* spi;
ITss46x* vanSender;
TSS46X_VAN* VANInterface;

uint8_t vanMessageLength;
uint8_t vanMessage[32];

uint8_t headerByte = 0x80;
uint8_t check = 0x00;

char incomingByte;


int a = 0;
int  *b = &a;
void InitTss463()
{
    // initialize SPI
    spi = new SPIClass();//*spi

#ifdef ARDUINO_ARCH_AVR
    // start spi on Arduino boards
    spi->begin();
#endif
#ifdef ARDUINO_SAM_DUE
    // start spi on Arduino boards
    spi->begin();
#endif

#ifdef ARDUINO_ARCH_ESP32
    // You can select which pins to use as SPI on ESP32 boards by passing the SCK, MISO, MOSI, SS as arguments (in this order) to the spi->begin() method
    const uint8_t SCK_PIN = 25;
    const uint8_t MISO_PIN = 5;
    const uint8_t MOSI_PIN = 33;
    VAN_PIN = 32;

    spi->begin(SCK_PIN, MISO_PIN, MOSI_PIN, VAN_PIN);
#endif

    // instantiate the VAN message sender for a TSS463
    vanSender = new Tss463(VAN_PIN, spi);
}



void setup()
{
    Serial.begin(500000);
    delay(3000);
    Serial.println("Arduino VAN bus monitor using TSS463C");

    InitTss463();
    //InitTss461();
    //InitTssSerial();

    VANInterface = new TSS46X_VAN(vanSender, VAN_125KBPS);
    VANInterface->begin();

    // Data read *VIN CAR* Exemple
    // IDENTIFIER = 0XE24 
    /*
    SOF: 0x0E
    IDEN: 0xE24
    COM: 0x08
    DATA(0): 0x56
    DATA(1): 0x45
    DATA(2): 0x33
    DATA(3): 0x38
    DATA(4): 0x43
    DATA(5): 0x52
    DATA(6): 0x46
    DATA(7): 0x52
    DATA(8): 0x45
    DATA(9): 0x38
    DATA(10): 0x30
    DATA(11): 0x30
    DATA(12): 0x30
    DATA(13): 0x30
    DATA(14): 0x35
    DATA(15): 0x34
    DATA(16): 0x34
    DATA(17): 0x69
    DATA(18): 0xE6
    EOF: 0xFF
    */

    VANInterface->set_channel_for_receive_message(1, 0xE2, 23, 0); // It's Good ?
}

void loop() {
    MessageLengthAndStatusRegister messageAvailable = VANInterface->message_available(1);
    if (messageAvailable.data.CHRx || messageAvailable.data.CHTx || messageAvailable.data.CHER)
    {
        VANInterface->read_message(1, &vanMessageLength, vanMessage);

        Serial.print("Channel: ");
        Serial.print(1, DEC);
        Serial.print(": ");

        char tmp[3];

        for (size_t i = 0; i < vanMessageLength; i++)
        {
            snprintf(tmp, 3, "%02X", vanMessage[i]);
            Serial.print(" ");
            Serial.print(tmp);
        }
        Serial.println();

        VANInterface->reactivate_channel(1);
    }
}

roma6868_breadboard_monting

  • The data is sent to the TSS463C according to the oscilloscope, but there is no answer from the TSS463C.
  • In the serial monitor i read this Channel: 1: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 21

roma6868_TSS463C + MCP2551

Arduino UNO keeps restarting

Hi, thanks for your awesome work on this library.

I am using the Arduino UNO, TSS463C + MCP2551. Read & Write works fine, but my Arduino Uno keeps restarting or hanging randomly. Can be a problem that my Arduino is not genuine? Or maybe memory issues?

Question related to the schematic

Hi Peter,

I have been following your project for a while now. And was interested in recreating the circuit. I have opened up an old replacement Sagem PP-T40 clock (the one the can be found in Peugeot 206 from 2003). In it I found the TSS461C and the Alcatel 2840 (mine is designated as: 0217 REMQ. Is it possible to use these chips together? Or do I have to look for a TJA1040?

PS: Is Y1 a resonator or a oscillator?

Kind regards,

Rik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.