Trying to prime the pump

Developer topics relating to hardware that interfaces PCs to ECUs

Moderator: Freon

Trying to prime the pump

Postby bofh » Thu Dec 30, 2004 2:28 pm

Not a lot to say yet, but I want to get it started! Right now I have a Elm based tool from scantool.net It does not do what we want, but it does a lot, if you know how to access it. At this point, I do not know... :oops: Basicaly the cheap does baud rate, so the computer does not have to, and does basic header stuff. You can also do custom header, set the polling time, custom querries... But it is still an ODB2 system. However, couldn't a small dongle "trigger" the select monitor aspect as well? A very small componant to make a easy to get tool work for us.

Also, if you want to say, "Your wrong!" feel free, but you must offer a better solution if you do! :twisted:
bofh
 
Posts: 50
Joined: Thu Dec 30, 2004 1:59 pm
Location: Houston, TX

Postby cboles » Thu Dec 30, 2004 3:09 pm

I'll be posting my design soon! I need to make sure it will also work with the STi and FXT before I make the boards. I'm trying to put a few extra goodies into it to future proof it a little for new ECU ODB interfaces we have yet to see...
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Postby Nemis » Fri Dec 31, 2004 3:45 am

please try this Qbasic prog with yours interface:

Code: Select all
DEF SEG = 0
REM address of COM port (p)
REM Typical address
REM &H3F8 = COM1
REM &H2F8 = COM2

p = &H3F8

dllb = p + 0
dlhb = p + 1
ier = p + 1
fcr = p + 2
lcr = p + 3
mcr = p + 4
lsr = p + 5
REM clear buffers & enable FIFO
OUT fcr, 7
REM set baud rate 5
OUT lcr, (INP(lcr) OR 128)
OUT dllb, 0
OUT dlhb, 90
OUT lcr, (INP(lcr) AND 127)
lcrbits = INP(lcr)
        REM set 7 data bits xxxxxx10
        lcrbits = lcrbits OR 2
        lcrbits = lcrbits AND (255 - 1)
        REM set Odd parity xx001xxx
        lcrbits = lcrbits OR 8
        lcrbits = lcrbits AND (255 - 16)
        lcrbits = lcrbits AND (255 - 32)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits
REM cancel interupts
OUT ier, 0
REM set MCR  rts low(on logic 1 -v), dtr-high(off logic 0 +V)
OUT mcr, 1
REM clear buffer
PRINT "clear buffer"
DO
        c = INP(lsr) AND 1
        PRINT c
        IF c > 0 THEN PRINT INP(p)
LOOP WHILE c > 0
PRINT "done"
REM wait for buffer to be clear b4 sending byte
DO
LOOP WHILE 0 = (INP(lsr) AND 64)

REM wait for serial buffer to be clear b4 changing baud rate
DO
LOOP WHILE 0 = (INP(lsr) AND 64)
REM set baud rate 9600
PRINT "Changing to 9600 baud"
OUT lcr, (INP(lcr) OR 128)
OUT dllb, &H18
OUT dlhb, 0
OUT lcr, (INP(lcr) AND 127)
REM set 8bit no parity
lcrbits = INP(lcr)
        REM set 8 data bits xxxxxx11
        lcrbits = lcrbits OR 3
        REM set None parity xxxx0xxx
        lcrbits = lcrbits AND (255 - 8)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits
REM read byte if available
OUT &H3F8, &H80
OUT &H3F8, &H10
OUT &H3F8, &HF0
OUT &H3F8, &H1
OUT &H3F8, &HBF
OUT &H3F8, &H40


PRINT "reading response"
DO
    IF (INP(lsr) AND 1) > 0 THEN PRINT HEX$(INP(p))
LOOP UNTIL INKEY$ = CHR$(27) ' wait for Escape key to be pressed
END


so if ecu reply with 80 10 f0 01 bf 40 ..... is very good start point :D
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Postby bofh » Tue Jan 04, 2005 8:36 am

Kinda sad, but I can't find a copy of Qbasic. Will Freebasic work?
bofh
 
Posts: 50
Joined: Thu Dec 30, 2004 1:59 pm
Location: Houston, TX

Postby Visceral » Tue Jan 04, 2005 1:13 pm

I used FirstBASIC and the program worked fine.

FirstBASIC Download Link
Visceral
 
Posts: 23
Joined: Thu Dec 30, 2004 10:21 am

Postby Nemis » Wed Jan 05, 2005 7:15 am

Visceral wrote:I used FirstBASIC and the program worked fine.

FirstBASIC Download Link


have u communicate with your ecu ? :D

what interface do you use ?
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Postby Visceral » Wed Jan 05, 2005 2:16 pm

Yes, I communicated with the ECU. I received the 80 10 f0 01 bf 40 reply.

I am using an adapter from the DeltaDash program. Many of the OBD interfaces seem to be compatible (I've used the same interface with the VAG-COM software on a Volkswagen).
Visceral
 
Posts: 23
Joined: Thu Dec 30, 2004 10:21 am

Postby Synx » Wed Jan 05, 2005 5:59 pm

Shouldn't the ECU be responding with 0x80 0xF0 0x10 ....

Your seeing what you sent. The K line is simplex 1 wire communications, so your just seeing the loopback. Correct?
Synx
 
Posts: 13
Joined: Thu Dec 30, 2004 10:07 am

Postby Visceral » Thu Jan 06, 2005 11:11 am

I played around with this a bit more today, and ended up changing the code a bit. Code is listed below -- basically I had it send the 0x33 at 5 baud and do the logging to a file.

Code: Select all
DEF SEG = 0
REM address of COM port (p)
REM Typical address
REM &H3F8 = COM1
REM &H2F8 = COM2

PRINT "Begin"

OPEN "data.txt" FOR OUTPUT AS #1
PRINT #1, "START OF FILE"

p = &H3F8

dllb = p + 0
dlhb = p + 1
ier = p + 1
fcr = p + 2
lcr = p + 3
mcr = p + 4
lsr = p + 5
REM clear buffers & enable FIFO
OUT fcr, 7
REM set baud rate 5
OUT lcr, (INP(lcr) OR 128)
OUT dllb, 0
OUT dlhb, 90
OUT lcr, (INP(lcr) AND 127)
lcrbits = INP(lcr)
        REM set 7 data bits xxxxxx10
        lcrbits = lcrbits OR 2
        lcrbits = lcrbits AND (255 - 1)
        REM set Odd parity xx001xxx
        lcrbits = lcrbits OR 8
        lcrbits = lcrbits AND (255 - 16)
        lcrbits = lcrbits AND (255 - 32)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits
REM cancel interupts
OUT ier, 0
REM set MCR  rts low(on logic 1 -v), dtr-high(off logic 0 +V)
OUT mcr, 1
REM clear buffer
PRINT "clear buffer"
DO
        c = INP(lsr) AND 1
        PRINT c
        IF c > 0 THEN PRINT INP(p)
LOOP WHILE c > 0
PRINT "done"

REM wait for buffer to be clear b4 sending byte
DO
LOOP WHILE 0 = (INP(lsr) AND 64)

OUT &H3F8, &H33
DELAY 2

REM wait for serial buffer to be clear b4 changing baud rate
PRINT "clear buffer"
DO
       c = INP(lsr) AND 1
       PRINT c
       IF c > 0 THEN PRINT INP(p)
LOOP WHILE c > 0
PRINT "done"

REM set baud rate 9600
PRINT "Changing to 9600 baud"
OUT lcr, (INP(lcr) OR 128)
OUT dllb, &H18
OUT dlhb, 0
OUT lcr, (INP(lcr) AND 127)
REM set 8bit no parity
lcrbits = INP(lcr)
        REM set 8 data bits xxxxxx11
        lcrbits = lcrbits OR 3
        REM set None parity xxxx0xxx
        lcrbits = lcrbits AND (255 - 8)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits
REM read byte if available
OUT &H3F8, &H80
OUT &H3F8, &H10
OUT &H3F8, &HF0
OUT &H3F8, &H01
OUT &H3F8, &HBF
OUT &H3F8, &H40


PRINT "reading response"
DO
    IF (INP(lsr) AND 1) > 0 THEN PRINT #1, HEX$(INP(p))
LOOP UNTIL INKEY$ = CHR$(27) ' wait for Escape key to be pressed

CLOSE #1
END


Here's the output I get in the text file (I've removed the "START OF FILE", and formated it for readability):
80 10 F0 01 BF 40
80 F0 10 39 FF A2 10 11 2E 12 49 51 06 73 FA CB
A6 2B 81 FE A8 00 00 00 60 CE D4 F8 B1 E4 80 00
00 00 00 00 00 00 DC 00 00 45 1E 30 C0 F0 20 00
00 40 FB 00 E1 00 00 00 00 00 00 00 F0 E5

I haven't tried any of the other Subaru Select Monitor Protocol commands yet.[/code]
Visceral
 
Posts: 23
Joined: Thu Dec 30, 2004 10:21 am

Postby Visceral » Thu Jan 06, 2005 11:13 am

One more thing -- The command is sent at 4800 baud, not 9600. I forgot to change the comment/print statement (the initial code was set to 4800 baud as well).
Visceral
 
Posts: 23
Joined: Thu Dec 30, 2004 10:21 am

Postby Nemis » Thu Jan 06, 2005 11:33 am

Visceral wrote:I played around with this a bit more today, and ended up changing the code a bit. Code is listed below -- basically I had it send the 0x33 at 5 baud and do the logging to a file.

Here's the output I get in the text file (I've removed the "START OF FILE", and formated it for readability):
80 10 F0 01 BF 40
80 F0 10 39 FF A2 10 11 2E 12 49 51 06 73 FA CB
A6 2B 81 FE A8 00 00 00 60 CE D4 F8 B1 E4 80 00
00 00 00 00 00 00 DC 00 00 45 1E 30 C0 F0 20 00
00 40 FB 00 E1 00 00 00 00 00 00 00 F0 E5

I haven't tried any of the other Subaru Select Monitor Protocol commands yet.[/code]



"2E 12 49 51 06" is your ecu, what kind of car is/ecu is?


i have remove some part (5 baud initialization unused)

so

Code: Select all
CLS
DEF SEG = 0

REM address of COM port (p)
REM Typical address
REM &H3F8 = COM1
REM &H2F8 = COM2

p = &H3F8

dllb = p + 0
dlhb = p + 1
ier = p + 1
fcr = p + 2
lcr = p + 3
mcr = p + 4
lsr = p + 5

REM set baud rate 4800
OUT lcr, (INP(lcr) OR 128)
OUT dllb, &H18
OUT dlhb, 0
OUT lcr, (INP(lcr) AND 127)

REM set 8bit no parity
lcrbits = INP(lcr)
        REM set 8 data bits xxxxxx11
        lcrbits = lcrbits OR 3
        REM set None parity xxxx0xxx
        lcrbits = lcrbits AND (255 - 8)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits

REM send initialization string
REM 80 10(suby ecu)  f0(diagnostic) 01(1 byte data) bf(euc init) 40(chksum)
OUT p, &H80
OUT p, &H10
OUT p, &HF0
OUT p, &H1
OUT p, &HBF
OUT p, &H40



now i have 9kb of Qbasic programm but i must test it on car

and i dont have a lot of time :-(

thank you for "print on file",now a can read rom ecu block by blok i think (if some area are not protected)
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Postby Visceral » Thu Jan 06, 2005 12:33 pm

My ECU is from a 2004 USDM WRX STi.

I couldn't get the ECU to respond to the command without sending the 0x33 at 5 baud. Let me know if you are sucessful with your changes.
Visceral
 
Posts: 23
Joined: Thu Dec 30, 2004 10:21 am

Postby Synx » Thu Jan 06, 2005 12:38 pm

Ahh so it was infact just loopback...

0x33 at 5baud is OBDII not subaru select. The response from the ecu will be in 10.4Kbaud after a sync byte is sent.

Although are you saying you did OBDII init at 5baud and then jumped into the subaru select protocol? Im confused.
Synx
 
Posts: 13
Joined: Thu Dec 30, 2004 10:07 am

Postby Nemis » Thu Jan 06, 2005 1:22 pm

emh i cut&paste from an programm that communicate with audi ecu

but for my work witout 5baud part

so this work (some time don'work, sometime work. i think because my prog is too simply and dont control the flow of data (must be syncronized?)

try this

(for people that don't know what this do: dont try this at home :D)

Code: Select all
REM thank you colby for start tread on nasioc
REM thank you Visceral for help in programming
REM thank you numbles for find file subaruecu.htm




CLS
DEF SEG = 0

REM address of COM port (p)
REM Typical address
REM &H3F8 = COM1
REM &H2F8 = COM2

OPEN "temp.txt" FOR OUTPUT AS #1
PRINT #1, "START OF FILE"




p = &H3F8

dllb = p + 0
dlhb = p + 1
ier = p + 1
fcr = p + 2
lcr = p + 3
mcr = p + 4
lsr = p + 5

REM clear buffers & enable FIFO
OUT fcr, 7
REM cancel interupts
OUT ier, 0
REM set MCR  rts low(on logic 1 -v), dtr-high(off logic 0 +V)
OUT mcr, 1
REM clear buffer
PRINT "clear buffer"
DO
        c = INP(lsr) AND 1
        PRINT c
        IF c > 0 THEN PRINT INP(p)
LOOP WHILE c > 0
PRINT "done"


REM set baud rate 4800
OUT lcr, (INP(lcr) OR 128)
OUT dllb, &H18
OUT dlhb, 0
OUT lcr, (INP(lcr) AND 127)

REM set 8bit no parity
lcrbits = INP(lcr)
        REM set 8 data bits xxxxxx11
        lcrbits = lcrbits OR 3
        REM set None parity xxxx0xxx
        lcrbits = lcrbits AND (255 - 8)
        REM set 1 Stop bit xxxxx0xx
        lcrbits = lcrbits AND (255 - 4)
        REM set 0 (off) Break Enable x0xxxxxx
        lcrbits = lcrbits AND (255 - 64)
OUT lcr, lcrbits







REM send initialization string
REM 80 10(suby ecu)  f0(diagnostic) 01(1 byte data) bf(euc init) 40(chksum)
OUT p, &H80
OUT p, &H10
OUT p, &HF0
OUT p, &H1
OUT p, &HBF
OUT p, &H40

PRINT "Hand shake and reading Ecu info (bf)"
PRINT "send 80 10 f0 01 bf 40"
PRINT "ecu reply:"
PRINT

l = &H44
i = l
pippo$ = ""
dato$ = ""

DO
IF (INP(lsr) AND 1) > 0 THEN
 dato = (INP(p))


 COLOR (7)

 REM colore x tipo centralina
  IF (i < (l - 13) AND i > (l - 19)) THEN
  COLOR (9)
  pippo$ = pippo$ + " " + HEX$(dato)
 END IF

 REM colore xgli int
  IF (i < (l - 46) AND i > (l - 50)) THEN
  COLOR (5)
 END IF

PRINT HEX$(dato); " ";


 REM Byte 9--> to determinate parameter support
 IF i = (l - 19) THEN byte9 = dato
 IF i = (l - 20) THEN byte10 = dato
 IF i = (l - 21) THEN byte11 = dato
 IF i = (l - 22) THEN byte12 = dato
 IF i = (l - 23) THEN byte13 = dato
 IF i = (l - 24) THEN byte14 = dato
 IF i = (l - 25) THEN byte15 = dato
 IF i = (l - 26) THEN byte16 = dato
 IF i = (l - 27) THEN byte17 = dato
 IF i = (l - 28) THEN byte18 = dato
 IF i = (l - 29) THEN byte19 = dato
 IF i = (l - 30) THEN byte20 = dato
 IF i = (l - 31) THEN byte21 = dato
 IF i = (l - 32) THEN byte22 = dato
                                   
 IF i = (l - 33) THEN byte23 = dato
 IF i = (l - 34) THEN byte24 = dato
 IF i = (l - 35) THEN byte25 = dato
 IF i = (l - 36) THEN byte26 = dato
 IF i = (l - 37) THEN byte27 = dato
 IF i = (l - 38) THEN byte28 = dato
 IF i = (l - 39) THEN byte29 = dato
 IF i = (l - 40) THEN byte30 = dato
 IF i = (l - 41) THEN byte31 = dato



REM a capo dopo 6 byte
  IF i = (l - 5) THEN PRINT
REM a capo dopo altri 9
 IF i = (l - (5 + 16)) THEN PRINT
 IF i = (l - (5 + 16 + 16)) THEN PRINT
 IF i = (l - (5 + 16 + 16 + 16)) THEN PRINT

 i = i - 1
END IF

LOOP UNTIL INKEY$ = CHR$(27) OR i = 0' o fine stringa o Esc


PRINT
PRINT
PRINT "   press esc to continue with other info"
DO
REM
LOOP UNTIL INKEY$ = CHR$(27)






PRINT
PRINT
PRINT " You have Subby and Ecu:"
PRINT pippo$
COLOR (9)
IF pippo$ = " 54 53 52 51 50" THEN PRINT " OlŠ (r) by Nemis"

IF pippo$ = " 16 44 50 3 5" THEN PRINT " turbo/wrx/gt 99/00 ae800/780"
IF pippo$ = " 16 4 69 4 5" THEN PRINT " STI5/6 99/00 af040"
IF pippo$ = " 16 4 96 6 5" THEN PRINT " P1ag340"
IF pippo$ = " 1b 44 58 5 5" THEN PRINT " wrx 01/02 af531 7555"
IF pippo$ = " 29 44 59 41 5" THEN PRINT " sti uk 01/02 ag820 2591"
IF pippo$ = " 18 42 10 7 5" THEN PRINT " legacy 2.5gx 02"
IF pippo$ = " 18 44 10 8 5" THEN PRINT " legacy 2.0gl 02"
IF pippo$ = " d 4 68 8 5" THEN PRINT " legacy b4 tt"
IF pippo$ = " 19 44 58 5 5" THEN PRINT " forester turbo S/gt00 ag050"
IF pippo$ = " 23 44 10 8 5" THEN PRINT " forester 2.0 gls 02"
IF pippo$ = " 1b 14 40 5 5" THEN PRINT " US wrx 01/02 af423"
IF pippo$ = " 1e 12 0 7 5" THEN PRINT " 2,5 rs af581"
IF pippo$ = " 26 54 78 61 5" THEN PRINT " libetry b4 tt ag850 3382"
IF pippo$ = " 36 14 48 61 5" THEN PRINT " us wrx manual 03 aj030 5692"
IF pippo$ = " 29 44 59 61 5" THEN PRINT " STI uk 01/02   ag820/ag821"
IF pippo$ = " 2e 44 59 41 5" THEN PRINT " STI uk 03 ah990 5512"
IF pippo$ = " 23 12 49 51 6" THEN PRINT " us 2,5 sti 04 aj241"
IF pippo$ = " 2f 4 78 52 6" THEN PRINT " leg jap twins ah111 5646"

COLOR (7)




PRINT
PRINT "   press esc to continue with other info"
DO
REM
LOOP UNTIL INKEY$ = CHR$(27)
CLS

PRINT " Parameter allowed:"
PRINT

IF INT(byte9 / 2) <> (byte9 / 2) THEN
 PRINT "Engine speed"
 byte9 = byte9 - 1
END IF

IF INT(byte9 / 4) <> (byte9 / 4) THEN
 PRINT "Manifold Absolute Pressure"
 byte9 = byte9 - 2
END IF

IF INT(byte9 / 8) <> (byte9 / 8) THEN
 PRINT "Air/Fuel Learning #2"
 byte9 = byte9 - 4
END IF

IF INT(byte9 / 16) <> (byte9 / 16) THEN
 PRINT "Air/Fuel Correction #2"
 byte9 = byte9 - 8
END IF

IF INT(byte9 / 32) <> (byte9 / 32) THEN
 PRINT "Air/fuel Learning #1"
 byte9 = byte9 - 16
END IF

IF INT(byte9 / 64) <> (byte9 / 64) THEN
 PRINT "Air Fuel Correction #1"
 byte9 = byte9 - 32
END IF

IF INT(byte9 / 128) <> (byte9 / 128) THEN
 PRINT "Coolant Temperature"
 byte9 = byte9 - 64
END IF

IF INT(byte9 / 256) <> (byte9 / 256) THEN
 PRINT "Engine load"

END IF


REM print parameter allowed by byte10
PRINT

IF INT(byte10 / 2) <> (byte10 / 2) THEN
 PRINT "Front O2 Sensor #2"
 byte10 = byte10 - 1
END IF

IF INT(byte10 / 4) <> (byte10 / 4) THEN
 PRINT "Rear O2 Sensor"
 byte10 = byte10 - 2
END IF

IF INT(byte10 / 8) <> (byte10 / 8) THEN
 PRINT "Front O2 Sensor #1"
 byte10 = byte10 - 4
END IF

IF INT(byte10 / 16) <> (byte10 / 16) THEN
 PRINT "Throttle Opening Angle"
 byte10 = byte10 - 8
END IF

IF INT(byte10 / 32) <> (byte10 / 32) THEN
 PRINT "Mass Air Flow"
 byte10 = byte10 - 16
END IF

IF INT(byte10 / 64) <> (byte10 / 64) THEN
 PRINT "Intake Air Temperature"
 byte10 = byte10 - 32
END IF

IF INT(byte10 / 128) <> (byte10 / 128) THEN
 PRINT "Ignition Timing"
 byte10 = byte10 - 64
END IF

IF INT(byte10 / 256) <> (byte10 / 256) THEN
 PRINT "Vehicle Speed"

END IF

REM print parameter allowed by byte11
PRINT

IF INT(byte11 / 2) <> (byte11 / 2) THEN
 PRINT "Atmospheric Pressure"
 byte11 = byte11 - 1
END IF

IF INT(byte11 / 4) <> (byte11 / 4) THEN
 PRINT "Knock Correction"
 byte11 = byte11 - 2
END IF

IF INT(byte11 / 8) <> (byte11 / 8) THEN
 PRINT "Fuel Injection #2 Pulse Width"
 byte11 = byte11 - 4
END IF

IF INT(byte11 / 16) <> (byte11 / 16) THEN
 PRINT "Fuel Injection #1 Pulse Width"
 byte11 = byte11 - 8
END IF

IF INT(byte11 / 32) <> (byte11 / 32) THEN
 PRINT "Differential Pressure Sensor Voltage"
 byte11 = byte11 - 16
END IF

IF INT(byte11 / 64) <> (byte11 / 64) THEN
 PRINT "Throttle Sensor Voltage"
 byte11 = byte11 - 32
END IF

IF INT(byte11 / 128) <> (byte11 / 128) THEN
 PRINT "Air Flow Sensor Voltage"
 byte11 = byte11 - 64
END IF

IF INT(byte11 / 256) <> (byte11 / 256) THEN
 PRINT "Battery Voltage"
 
END IF







PRINT
PRINT " ....a lot of cut and paste to do :-( sorry no time"

PRINT
PRINT "   press esc to continue with other info"
DO
REM
LOOP UNTIL INKEY$ = CHR$(27) ' o fine stringa o Esc
CLS




PRINT "Block Read: Read 128 bytes from address 0x200:000 (ecu returned all zeros)"
PRINT "80 10 f0 6 a0 0 20 0 0 7f c5"
REM Sent:
OUT p, &H80
OUT p, &H10
OUT p, &HF0
OUT p, &H6
OUT p, &HA0
OUT p, &H0
OUT p, &H20
OUT p, &H0
OUT p, &H0
OUT p, &H7F
OUT p, &HC5

l = 135
i = l

DO

 IF (INP(lsr) AND 1) > 0 THEN

 PRINT HEX$(INP(p)); " ";

 REM a capo dopo 5 byte di conferma
 IF i = (l - 4) THEN PRINT

 i = i - 1
END IF
LOOP UNTIL INKEY$ = CHR$(27) OR i = 0' o fine stringa o Esc

PRINT
PRINT
PRINT " ....a lot of cut and paste to do :-( sorry no time"

PRINT
PRINT "   press esc to continue with other info"
DO
REM
LOOP UNTIL INKEY$ = CHR$(27) ' o fine stringa o Esc
CLS






PRINT "live data read, engine speed 0f0e ignition 11 :"
PRINT " knock 12, dig63 knock sig,dig 64 crak,cam etc"
PRINT
REM 80 10 F0 14 A8 00 00 00 0F 00 00 0E 00 00 11 00 00 22 00 00 63 00 00 64 53
REM Sent:

OUT p, &H80
OUT p, &H10
OUT p, &HF0
OUT p, &H14
OUT p, &HA8
OUT p, &H0
OUT p, &H0
OUT p, &H0
OUT p, &HF
OUT p, &H0
OUT p, &H0
OUT p, &HE
OUT p, &H0
OUT p, &H0
OUT p, &H11
OUT p, &H0
OUT p, &H0
OUT p, &H22
OUT p, &H0
OUT p, &H0
OUT p, &H63
OUT p, &H0
OUT p, &H0
OUT p, &H64
OUT p, &H53

l = 12
i = l
dati$ = ""
dato = 0
COLOR (7)
DO
 IF (INP(lsr) AND 1) > 0 THEN

 PRINT HEX$(INP(p)); " ";


 REM colore x dati
  IF (i < (l - 4) AND i > 1) THEN
  COLOR (9)
  dati$ = dati$ + CHR$(i)
 END IF


 REM

 i = i - 1
END IF
LOOP UNTIL INKEY$ = CHR$(27) OR i = 0' o fine stringa o Esc
COLOR (7)

PRINT
PRINT
PRINT " ....a lot of cut and paste to do :-( sorry no time"

PRINT
PRINT "   press esc to continue with other info"
DO
REM
LOOP UNTIL INKEY$ = CHR$(27) ' o fine stringa o Esc
CLS



END



:D :D

it's incomplete but sometime work
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Postby Nemis » Thu Jan 06, 2005 1:30 pm

ops i write this only for test , some REM are non in english :-(

"IF INT(byte9 / 2) <> (byte9 / 2) THEN "

i don't know how to convert hex byte in binary and test an bit (flag) so i use this strange system :-) it's work :D



i forget to add

IF pippo$ = " 2E 12 49 51 6" THEN PRINT " 2004 USDM WRX STi same as Visceral car :-)"
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Next

Return to Interface Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron