|
|
| Author |
Message |
pdubinsky
Joined: 25 Nov 2005
Posts: 66
Location: South Carolina
|
|
Posted: 16 November 2008, 22:07 PM Post subject: ELM 327 |
|
|
Has anyone used the ELM327 chip from Elm Electronics? It's a PIC micro and I've communicated with PIC chips before but this one is giving me fits.
I'm using COM1 and when I issue a reset command to the 327, the device appears to reset but the sign on message that the 327 sends appears to be gibberish.
Has anyone seen this before?
TIA,
Paul |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 16 November 2008, 22:31 PM Post subject: Re: ELM 327 |
|
|
| pdubinsky wrote: | | Has anyone used the ELM327 chip from Elm Electronics?l | I haven't used it but I have some questions. When you refer to resetting the device, are you referring to a hardware reset (asserting MCLR/) or a software reset via command?
One thing you might do is make a Y connector for the serial connection between the ZX and the ELM327 and connect a PC serial port RxD line to the ELM's TxD line (with the appropriate level converter). Then, you can run TeraTerm or some other terminal emulator configured with different baud rates until you can see the the sign on message correctly.
Alternately, if you have a logic analyzer, you can capture the data being sent and, if you know what the message is supposed to be, you can calculate the baud rate by observing the bit timing. |
|
| Back to top |
|
 |
pdubinsky
Joined: 25 Nov 2005
Posts: 66
Location: South Carolina
|
|
Posted: 20 November 2008, 14:36 PM Post subject: ELM 327 |
|
|
Don,
I had read in the chip documentation ( http://www.elmelectronics.com/DSheets/ELM327DS.pdf , page 51) that all that was necessary to connect my micro processor (the ZX-24) to their chip was to connect the ZX-24 Tx line to the ELM327 Rx line and connect the ZX-24 Rx line to the ELM327 Tx line, set the baudrate, databits, stop bits and parity and everything would be good to go. Well, after connecting and checking, things were definitely not goog to go.
THe next attempt was to use the their recommended interface RS-232 circuitry (same doc, page 56). I bread-boarded the interface and connected it to an old IBM ThinkPad with a serial port and everything worked. I used HyperTerminal to send commands to the ELM327 and receive data back from the 327.
The last step was to replace the ThinkPad with the ZX-24, ie. use the ZX-24 with the ELM RS-232 circuitry to communicate with the 327. That works fine, too.
What I don't understand, is why the RS-232 circuitry is necessary for a TTL device (the ZX-24) to communicate with a CMOS device (the ELM327). I'm asssuming that the idle states for both devices are not at the same logic level but I haven't had a chance to check that yet.
Thx,
Paul |
|
| Back to top |
|
 |
dlh
Joined: 15 Dec 2006
Posts: 266
Location: ~Cincinnati
|
|
Posted: 20 November 2008, 14:49 PM Post subject: |
|
|
| COM1 on the ZX-24 uses inverted logic. Most TTL devices expect non-inverted logic. The RS232 circuitry inverts the signal. |
|
| Back to top |
|
 |
pdubinsky
Joined: 25 Nov 2005
Posts: 66
Location: South Carolina
|
|
Posted: 20 November 2008, 15:09 PM Post subject: ELM 327 |
|
|
| Quote: | | COM1 on the ZX-24 uses inverted logic. Most TTL devices expect non-inverted logic. The RS232 circuitry inverts the signal. | That was the conclusion that I had come to. The ZX-24 has the DefineCom command that controls databits, stopbits, parity and normal vs inverted logic on COMM ports 3-6 software UART. Can the same be done for the hardware UART on COMM ports 1 and 2?
Thx,
Paul |
|
| Back to top |
|
 |
dlh
Joined: 15 Dec 2006
Posts: 266
Location: ~Cincinnati
|
|
Posted: 20 November 2008, 15:22 PM Post subject: |
|
|
| No - that's only possible with software UARTs like COM3-COM6. |
|
| Back to top |
|
 |
|