c-code

An area to discuss AVR and Arduino specific problems and examples

Moderator: Benj

Post Reply
Dutch
Posts: 102
Joined: Mon Aug 19, 2013 8:38 am
Location: Netherlands
Has thanked: 24 times
Been thanked: 5 times
Contact:

c-code

Post by Dutch »

Hi, Help.... after many attempts im lost..

I am trying to make me a simple display showing real time J1850 VPW bus data from my engine. it maybe already exist, but that is not the fun.
i just want to get this working. After reading into what I could find online about this old OBD data bus and measuring the signal better with my scope I started making a code from scratch. it basically consists of a 200uS Start-of-file signal and then 7bites of 8bit data (so containing 56 high and low levels in a row) containing a header/data/CDC check. there is no Macro for this old data bus :wink: or is there? Looks a litlle bit like the one wire data stream macro for temp sensors. I tried writing a flowcode but to no luck. A member here helped me on my way some time ago, but the project got in the corner and the on-line link with a c code he found is not working anymore. :cry:

But, fortunate I found a way on-line to decode the signal with a small program and be able to do much more with it using a simple telnet terminal. old school but works. I found an old free C code I could try to imbed in a flowcode icon!. There is a .c file but also a .h file and a main.c file. Can, or how do I combine that in one Flowcode C icon, or isn't that possible? If a Flowcode guru can tell me if this is remotely possible and maybe help me a little bit what to do or change in it I would be stoked!

I'l post the found codes below. i can also paste the links if needed so everybody can see this is free offered to use.
It was written about 15 years ago for AVRstudio4 and using an Atmega8 with a 7,2328Mhz cristal.
If flowcode 8 helps debugging the re-worked C-code I might consider upgrading.

Thanks for your time, Angelo.
Last edited by Dutch on Mon Oct 21, 2019 7:21 pm, edited 5 times in total.

Dutch
Posts: 102
Joined: Mon Aug 19, 2013 8:38 am
Location: Netherlands
Has thanked: 24 times
Been thanked: 5 times
Contact:

Re: c-code

Post by Dutch »

The free on-line C code I found. I have a working very similar ELM322 pic with the program on it and it shows the data on my pc screen. Hope this code can be put anyhow in an Flowcode C icon so i can make my own digital display. Any thoughts welcome! i looked over these texts for hours and see familiar things but most i don't get :( .
Attachments
main.c
(21.06 KiB) Downloaded 188 times
j1850.h
(4.16 KiB) Downloaded 193 times
j1850.c
(6.35 KiB) Downloaded 188 times

Post Reply