Hi All,
DynamoBen,thanks to this forum I've started learning to program serial into the PIC !
Here is the code I'm using: (forgot how to do the code quote here)
'12F675
_CONFIG
_INTRC
_NOCLKOUT
_WDT_ON
_PWRTE_ON
_MCLRE_OFF
_BODEN_ON
DEFINE OSCCAL_1K 1
INCLUDE "modedefs.bas"
TX_Pin VAR GPIO.0 'To DB9 RX pin 2
RX_Pin VAR GPIO.1 'To DB9 TX pin 3
TRISIO.0 = 0 'Set GPIO.0 to output.
TRISIO.1 = 1 'Set GPIO.1 to input
ANSEL = 0 'disable ADCs
CMCON = 7 'disable comparator
AChar VAR BYTE
tx_pin = 0 'inverted mode idle state
achar="A"
Pause 100 'OSC settle time...
loop:
SerOut tx_pin,N9600,["AT SH 6A C2 00 ",13,10] 'set header
Pause 2000
SerOut tx_pin,N9600,["85 00",13,10] 'fold mirrors in
Problem is the elm322 and the vehicle does not respond at all. I've tried sending inverted and non inverted but the data light on the elm never activates as it does when I send this same data to the vehicle with the laptop.
Do I need to use a MAX232 for this or maybe modify the elm circuit as talked about in the elm docs ?
I can read it all in hyperterminal fine, any advice and guidance is much appreciated.
Bookmarks