@russian, pull-requests are still welcome?this file:
https://rusefi.com//docs/html/obd2_8cpp_source.html (pay attention to lines 54, 64, 81, 91)
Simple CAN Bus Prototyping Board
Re: Simple CAN Bus Prototyping Board
- AndreyB
- Site Admin
- Posts: 14381
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: Simple CAN Bus Prototyping Board
We've got a bit off-topic here had we?puff wrote: @russian, pull-requests are still welcome?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Re: Simple CAN Bus Prototyping Board
It's not too far off topic
Either way, I'm still waiting on boards and I'll update when that happens and I get them assembled. The discussion so far has given me some insight into what is wanted from a CAN bus and what to implement as far as protocols, but I'm not much of a programmer so we'll have to see when that time comes.
Either way, I'm still waiting on boards and I'll update when that happens and I get them assembled. The discussion so far has given me some insight into what is wanted from a CAN bus and what to implement as far as protocols, but I'm not much of a programmer so we'll have to see when that time comes.
Re: Simple CAN Bus Prototyping Board
It's certainly been a while since I promised to update. I got the boards a few weeks after I last posted. I assembled them, they didn't work, and then they got put into a bin and shelved while I try and sort through the rest of my unfinished projects (it didn't work).
So here I am at work, thinking about this project again and where I went wrong and I think I might have it, just looking for confirmation while I don't have hardware in front of me. I forgot the capacitors for the crystal
I might have been thinking since I grounded the case that there must be caps inside? I looked up the datasheet some more and there definitely aren't, so I'm going to try and bodge some capacitors on tonight (I should stop making promises I might not keep) and see if I can get SPI communicating.
Gauges are still a low priority because the car is a bare shell at the moment, and will take at least a few months to build back up. Plus it's getting carbs, so I'll either need to make a compatible gauge sender board or to wait until I convert back to EFI.
So here I am at work, thinking about this project again and where I went wrong and I think I might have it, just looking for confirmation while I don't have hardware in front of me. I forgot the capacitors for the crystal
I might have been thinking since I grounded the case that there must be caps inside? I looked up the datasheet some more and there definitely aren't, so I'm going to try and bodge some capacitors on tonight (I should stop making promises I might not keep) and see if I can get SPI communicating.
Gauges are still a low priority because the car is a bare shell at the moment, and will take at least a few months to build back up. Plus it's getting carbs, so I'll either need to make a compatible gauge sender board or to wait until I convert back to EFI.
Re: Simple CAN Bus Prototyping Board
See page 5 of frankenso schematic. We had some troubles with the XTAL caps on the knock chip. There are some handy references there for determining your caps. With out them you probably will not start, and your XTAL freq could be off by a bit. For the knock chip, when it does not start, you simply touch it and your ESD is enough to get it to oscillate.
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
I don't know how much calculating I can do when I'm going to be dead-bugging the caps onto the crystal, but 22uf seems a common choice with this chip so I'll start there and see where it gets me. I'll have to recalculate when I move to a new layout. That tip with touching the chip to start it is helpful. Should make troubleshooting a bit easier.
Re: Simple CAN Bus Prototyping Board
I removed the crystals, laid down a pair of 22pf caps and set the crystal back on top of them. I'm actually pretty proud of how well it fit together, but still no luck with communication. I think I found a problem in the example code I was using, but I still don't have any results, so I think I'll need to take a more methodological approach to troubleshooting now.
Re: Simple CAN Bus Prototyping Board
Do you have a scope? Can you verify it oscillates?
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
Haven't put a scope on it yet, that's next on the list. After that I think I need to finally give in and get a bus pirate or other logic analyzer so I can actually see what's going on.
edit: I did some more reading of the datasheet (almost like I should have done that better when I started) and I have the reset wired up backwards. I should be pulling it high and I'm pulling it low
edit: I did some more reading of the datasheet (almost like I should have done that better when I started) and I have the reset wired up backwards. I should be pulling it high and I'm pulling it low
Re: Simple CAN Bus Prototyping Board
The DS1054 can do analog and digital decoding work for about $350.
https://www.amazon.com/Rigol-DS1054Z-Digital-Oscilloscopes-Bandwidth/dp/B012938E76?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-d-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B012938E76
They make variants of this which can decode more channels. This one can only decode 40 channels, however other model numbers have many more digital inputs for more sophisticated digital stream decoding.
https://www.amazon.com/Rigol-DS1054Z-Digital-Oscilloscopes-Bandwidth/dp/B012938E76?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-d-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B012938E76
They make variants of this which can decode more channels. This one can only decode 40 channels, however other model numbers have many more digital inputs for more sophisticated digital stream decoding.
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
Having a modern scope would probably save me a lot of headache in the future, but I think that's going to be a purchase for another day.
Re: Simple CAN Bus Prototyping Board
SUCCESS! After correcting the reset pullup, it still didn't work. Did some more digging and noticed the MCP2561 (I used because the MCP2562 was on backorder) isn't exactly pin compatible with the MCP2562 (the VREF pin is switched for the SPLIT pin) and applying voltage to the SPLIT pin causes the MCP2561 to be unable to transmit (something about fault tolerance). After swapping the MCP2561 for the correct MCP2562 (I already had them, just hadn't swapped them in), I have send and receive functionality!
Next step is to get around to remote controlling a stepper through the bus.
Next step is to get around to remote controlling a stepper through the bus.
Re: Simple CAN Bus Prototyping Board
That's some good news. Glad to hear your making progress. Keep it up.
Welcome to the friendlier side of internet crazy