View Full Version : MSCAN or MSCAN'T
UofA_Formula
03-30-04, 12:40 AM
SEE NEXT POST, PROBLEM SOLVED.
Tried to run example code for CAN, but doesn’t seem to run. First tried to send the FILTER-0-HIT command off of the CAN.txt file from the Isopod. Matched CANH, CANL, and GND up between Isopod and Minipod which was running XRX.
From what we understand, it is supposed to output “FILTER 0 8 Bytes”, however the Minpod’s terminal displays nothing.
We thought we were have a sync problem, so we hooked up the Isopod to an O’scope to see what kind of outputs we where getting after running FILTER-0-HIT. We then hooked up the Minipod to the scope and had it run FILTER-0-HIT, it produced the same waveform as the Isopod.
We also confirmed that bothe where runnin in HighSpeed mode.
Minipod's jumper on pins 1+2 for J2, also PE3 OFF, which turns the Grn LED off.
ISOPOD normally set to high speed when PE2 OFF.
For some reason we are unable to get the CANRFLG bit to 1. So our receiver is indicating that it hasn’t received a full, correct message.
What are some other things to check for?
UofA_Formula
03-30-04, 01:16 AM
Just read the post on MSCAN and infact putting a 120 Ohm resistor between CANH and CANL and everything seemed to work fine. THANKS
RMDumse
04-02-04, 08:24 AM
Sorry I was off at a conference and couldn't answer your post sooner. Yes, the CAN works great. Yes it does require external resistors. This must mean you are now talking between the MiniPod(TM) in your dash, and the IsoPod(TM) working as the engine ECU, now.
UofA_Formula
04-02-04, 12:28 PM
Randy,
No problem, at least we've got it working now. This Sunday we're taking the car to a SCCA Race with the 'Pods installed. We've got them talking but need to do some more software tweaking before then. Since our engine was out of commission for months because of mechnical problems and we were unable to do testing, we're still concerned about the feasibility of getting the IsoPod to actually run the engine in competition.
Instead, we've got the Minipod doing the display driver work for the dash panel, and the IsoPod in the back, by the engine doing the conversion of all the engine singnal inputs. The IsoPod will be outputting the computed values for RPM, Speed, Temperatures, Gear Position, and possibly a few other items, on the CAN bus where the MiniPod will pick them up. The MiniPod will then determine what display mode the user is in and display the appropriate information on the LCD screen. Additionally, the MiniPod will control a 16 LED Tachometer bar which will indicate the RPMs of the engine and illuminate a "Shift" light when optimal RPMs have been reached.
We've got so many cool ideas, and so little time to get them working because of having to take over the task of fixing the engine ourselves! Next year however, as we mentioned we expect the project to be carried on and a full blown engine controller, possibly a traction control system could be implemented, and an automatic shifting mode!
But I do have a question for you, we're curious what the best way to do the communication on the CAN is, should we have the MiniPod use polled mode to ask the IsoPod for the info depending on what mode it's in or should the IsoPod dump all the info on the network and the MiniPod just use what it needs or does it even matter? I know we've got a lot of bandwidth for such small amounts of data. We're working on creating some UDP style packets where each packet is 8 bytes started with a two byte "ID" of what the last 6 bytes of data represent.
Thanks for the input! - Brandon
RMDumse
04-02-04, 12:52 PM
Well, the automotive systems I've seen have been broadcast in nature.
I think this is a good idea. It means if you plug something else on your CAN bus in the future, it can gather the information it needs without having to add traffic making the request for the information. For instance, on the SMART Car, I was able to passively pick up all the operating parameters I needed without having to add any traffic at all to the system. I knew what gear the system was in, I knew the throttle settings, I knew the water temperature, etc.
Since the hardware of CAN eliminates collisions, just as well to present your data periodically at a rate appropriate to the systems involved. Let whatever other units in the vehicle pick up what they need.
huffman
08-18-04, 02:02 PM
:confused: Your message mentioned example code for MSCAN. Will you post it? I'm having zero luck finding existing code to get started with.
Thanks
nmitech
08-18-04, 02:26 PM
It is on the 'Pod(TM) download page,
http://www.newmicros.com/store/product_details/download.html
Here is the direct link to CAN example provided by blueeyedpop,
http://www.newmicros.com/isopod/appnotes/CAN.txt
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.