Bs2 and elm327
clamb
Posts: 7
I am trying to get my basic stamp to talk with an elm 327 chip. I can't even get the L.E.Ds on the Elm 327 to light up to at least show that they both have some form of communication. I have double checked my wiring and at this point I'm pretty confident It's ok. Has anyone attempted and been successful at this by any chance? Thank you.
Comments
Keep in mind that the ELM327 communicates at either 9600 Baud or 38400 Baud. None of the Stamps can handle 38400 Baud and 9600 Baud is dicey with the slower Stamps like the BS2. It can work, but you have to be very careful about how you write your SERIN statements.
Your turn.
The only difference is that: my pin 1 on basic stamp is going to pin 18 on the elm. Pin 2 on my stamp is going to pin 16 on elm. Here is my code:
' {$STAMP BS2}
' {$PBASIC 2.5}
elm_busy PIN 2
speed_array VAR Byte(10)
DO WHILE elm_busy = 1'wait until elm is not busy
LOOP
SEROUT 1,240,["atz"]'reset command. leds on elm should light up
END
@mike: If pin 6 on the elm is set high, the default is 38.4k but you can set it to whatever value you like. if pin 6 is low then it can't be changed from 9.6k (pages 3 &56)
Thank you.
I knew there was supposed to be a 4mhz oscillator the but didn't think omitting that will affect things. I will oreder one and see if that solves the problem. In the mean time is there any chance you (or anyone) could shed some light on what this oscillator contributes to the circuit and why not having it in there would make the elm communicating with the bs2 impossible? Thank you
but didn't think omitting that will affect things."
Rather?
Without the xtal, the device has no timebase.
It works as well as you would without your heart.
The datasheet also talks about how to connect unused pins. Don't ignore that. It's there for a reason (mentioned in the datasheet description).