Coder Social home page Coder Social logo

laszlodaniel / ccdlibrary Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 3.0 129 KB

Arduino library for interfacing Chrysler's legacy CCD-bus using the CCDBusTransceiver development board.

Home Page: https://chryslerccdsci.wordpress.com/

License: GNU General Public License v3.0

C++ 100.00%
chrysler dodge jeep ccd-bus obd1 obd2 arduino arduino-mega arduino-library

ccdlibrary's Introduction

Hi there ๐Ÿ‘‹

ccdlibrary's People

Contributors

laszlodaniel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ccdlibrary's Issues

CCD-bus idle-flag is not cleared after a start bit is seen on the bus.

Bus-idle flag is cleared after the UART receive complete interrupt fires, that is after the first byte of the message is received. This is far too late. This flag should be cleared as soon as the first start bit (0) appears on the CCD-bus.

Possible solution 1:
The RX-pin can't be used as an external interrupt source because it is controlled by the hardware UART. So first disable UART receiver and use RX-pin as an external interrupt source. Once the falling edge is sensed it's probably not too late to re-enable the UART receiver, clear the bus-idle flag and still be able to sense the start bit.

Possible solution 2:
Connect RX-pin to another external interrupt capable pin and let it handle clearing the bus-idle flag while UART receiver is always enabled.

CCD-bus idle condition is not recognized properly by the timer.

Something is wrong with the timer setup or how the timer is used, because every byte on the CCD-bus is interpreted as a new message. The timer thinks that more than 10-bit time (1280 microseconds) elapses between the received bytes.

Temporary solution is to increase bus-idle time to 14-bit in the begin() function. In this case every message appears to be good.

This issue doesn't affect the CDP68HC68S1 chip because bus-idle condition is recognized by the chip itself and signaled to the microcontroller via an interrupt.

Implementing CCD-bus state calculation in the background.

Four bus-states need to be determined on-the-fly:

  • busy,
  • busy / idle transition,
  • idle / tx possible and
  • arbitration detector result.

Right now the first two states are established by an interrupt / timer task.
The third state is a simple 256 us delay right before writing data to the CCD-bus.
The fourth arbitration state is determined during the transmission of the first ID byte.
It would be much better if the same idle-timer would determine the first 3 states in the background.
The third state is especially sensitive to blocking delays.
An enumerated variable could store all 4 states in one place.

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.