Selfmade Pocket MUTLogger/Dash first alpha release
When you combine some of the technology some of us are working on from the standalone loggers, to the real-time tuning roms, use your imagination...
A pocket reflasher might not be totally feasable but its definitely possible with the technology we have.
A pocket reflasher might not be totally feasable but its definitely possible with the technology we have.
I don't see it would not be feasible, are the costs prohibitive?
I would think lots of ppl would like to be able to switch between pump and gas maps while at a gas station without any laptop. I know I would love it.
I would think lots of ppl would like to be able to switch between pump and gas maps while at a gas station without any laptop. I know I would love it.
Hi hi, one of the most used programs for nearly all programming tools and languages.
The “Hello World” Program.
Yesterday I found a gas station nearby which sells E85 since 2 weeks.
The first one inside 200 km range.
But now I also need some kind of map switching. Hope John can helm me there.
One idea: Is it possible to change the injector scaling at runtime? This could be a simple way to enrich the whole map with a potentiometer.
The “Hello World” Program.
Yesterday I found a gas station nearby which sells E85 since 2 weeks.
The first one inside 200 km range.
But now I also need some kind of map switching. Hope John can helm me there.
One idea: Is it possible to change the injector scaling at runtime? This could be a simple way to enrich the whole map with a potentiometer.
We have code to do map switching through the MUT protocol.
Injector scaling could be diverted to RAM also if you switch to the RAM maps, then you could alter it live. Needs a bit more code as the way it is as standard most 1d values like injector scaling don't go through a lookup (vector) table.
Injector scaling could be diverted to RAM also if you switch to the RAM maps, then you could alter it live. Needs a bit more code as the way it is as standard most 1d values like injector scaling don't go through a lookup (vector) table.
I have my Butterfly board to which I've added a DB9 plug to go into the PC's RS232 socket and it works for programming. The Tx/Rx lines are crossed in this arrangement.
I have my new VAG COM KKL cable and opened it up and it has a MAX232 and an op amp in it. Since this is also designed to plug into a PC, the Tx/Rx lines will also be effectively crossed between the ECU and the PC. However, it is also terminated with a DB9 plug.
So unless I chop up cables (which is a shame, because it would be nice to be able to program and log with the butterfly through the same plug), I need a DB9 cable with two sockets which crosses the Tx/Rx.
Anyone confirm my logic?
Do most RS232 cables have the crossover then?
I have my new VAG COM KKL cable and opened it up and it has a MAX232 and an op amp in it. Since this is also designed to plug into a PC, the Tx/Rx lines will also be effectively crossed between the ECU and the PC. However, it is also terminated with a DB9 plug.
So unless I chop up cables (which is a shame, because it would be nice to be able to program and log with the butterfly through the same plug), I need a DB9 cable with two sockets which crosses the Tx/Rx.
Anyone confirm my logic?
Do most RS232 cables have the crossover then?
Another option would be for me to fit a DB9 socket on the microcontroller, then I can plug the VAG COM cable straight in, or I can use a DB9 plug-plug crossover cable to connect the Butterfly to the PC for programming!
LOL.
LOL.
I think I have it all worked out now I've read about DTE and DCE.
I'm going to make the Butterfly DTE with a DB9 male connector so that the DCE Vag Com cable with a female connector will plug straight in.
Then I'll use a null modem cable or adaptor (DB9 female to DB9 female with crossover) to link the Butterfly to the PC (both DTE).
I'm going to make the Butterfly DTE with a DB9 male connector so that the DCE Vag Com cable with a female connector will plug straight in.
Then I'll use a null modem cable or adaptor (DB9 female to DB9 female with crossover) to link the Butterfly to the PC (both DTE).
Last edited by jcsbanks; Jun 1, 2007 at 12:37 PM.
As thread on Aktivematrix, I have it working (just showing TPS for now) using BASCOM-AVR (the free version would do this even within its 4k limit).
Parts list:
1. VAG COM KKL RS232 cable off Ebay
2. Male to male null modem adapter or cable
3. AVR board with serial port, LCD and buttons - I used an old board I had, but if doing from scratch I would try this one: http://www.dontronics-shop.com/produ...cat=353&page=1 - you'll need a suitable programming cable - parallel, serial or USB to put your code onto the chip.
Plug them all together (NO SOLDERING
), set the right pins for the LCD connections in BASCOM dialog box and program the microcontroller.
It could be done cheaper, but I wanted to do it with off the shelf parts.
Thanks to JoeBee for the ideas.
Parts list:
1. VAG COM KKL RS232 cable off Ebay
2. Male to male null modem adapter or cable
3. AVR board with serial port, LCD and buttons - I used an old board I had, but if doing from scratch I would try this one: http://www.dontronics-shop.com/produ...cat=353&page=1 - you'll need a suitable programming cable - parallel, serial or USB to put your code onto the chip.
Plug them all together (NO SOLDERING
), set the right pins for the LCD connections in BASCOM dialog box and program the microcontroller.It could be done cheaper, but I wanted to do it with off the shelf parts.
Thanks to JoeBee for the ideas.
Octane value%, knock sum, ignition timing, manifold pressure (kPa)
Air inlet temperature(C), manifold temperature(C), O2 sensor(V), injector pulse width(ms)
The spacing is as neat as I could get it all to fit on a 16*2 LCD display.
http://john824.fotopic.net/p42063827.html
Compiles from BASCOM-AVR to just over 2k of code, so fits in the free version.
Code is as below with the LCD pins set in a dialog box, 15625 8N1 serial comms using MUT protocol.
Declare Function Send(byval Request As Byte) As Byte
Dim Uartstatusstore As Byte
Dim Result As Byte
Dim Octane As Word
Dim Knock As Byte
Dim Timing As Integer
Dim Map As Word
Dim Iat As Integer
Dim Mat As Integer
Dim Oxygen As Word
Dim Ipw As Word
Dim Temp As Integer
Dim Temp1 As Byte
Dim Temp2 As Byte
Dim Sresult As String * 5
Dim Sout As String * 20
Dim I As Byte
Config Serialin = Buffered , Size = 5 'buffered serial in 10 bytes
Enable Interrupts 'using interrupts
Config Pind.1 = Output 'set Tx pin as manual output pin
Set Portd.1 'set high (RS232 rest state)
Cls 'clear the LCD display
Lcd "Init @ 5 baud" 'display this at the top line
Uartstatusstore = Ucsrb 'save UART settings
Ucsrb = 0 'stop UART
Reset Portd.1
Waitms 1800 'break 1800ms = 1 start, 8 zero bits
Set Portd.1
Waitms 200 '200ms = 1 stop
Ucsrb = Uartstatusstore 'restore UART
Lowerline 'select the lower line
Lcd "Send FEFFFEFF" 'display this at the lower line
Result = Send(&Hfe)
Result = Send(&Hff)
Result = Send(&Hfe)
Result = Send(&Hff)
Cls
Do
Result = Send(&H27)
Octane = Result * 100
Octane = Octane / 255
Sresult = Str(octane)
Sout = Format(sresult , " 0")
Sout = Sout + "%"
Result = Send(&H26)
Knock = Result
Sresult = Str(knock)
Sout = Sout + Format(sresult , " 0")
Result = Send(&H06)
Timing = Result - 20
Sresult = Str(timing)
Sout = Sout + Format(sresult , "+ 0")
Result = Send(&H38)
Map = Result * 4
Map = Map / 3
Sresult = Str(map)
Sout = Sout + Format(sresult , " 0")
Sout = Sout + "k"
Upperline
Lcd Sout
Result = Send(&H3a)
Gosub Atconvert
Iat = Temp
Sresult = Str(iat)
Sout = Format(sresult , "+00")
Sout = Sout + "C"
Result = Send(&Hbd)
Gosub Atconvert
Mat = Temp
Sresult = Str(mat)
Sout = Sout + Format(sresult , "+00")
Sout = Sout + "C"
Result = Send(&H13)
Oxygen = Result * 49
Oxygen = Oxygen / 25
Sresult = Str(oxygen)
Sout = Sout + Format(sresult , ".00")
Result = Send(&H29)
Ipw = Result * 64
Ipw = Ipw / 25
Sresult = Str(ipw)
Sout = Sout + Format(sresult , " 0.0")
Lowerline
Lcd Sout
Loop
End
Function Send(byval Request As Byte) As Byte
Local Temporary As Byte
Printbin Request 'send request
Inputbin Temporary , Temporary 'receive echo and result
Send = Temporary
End Function
Atconvert:
Temp = Result \ 16
Temp1 = Lookup(temp , Airtemp)
Incr Temp
Temp2 = Lookup(temp , Airtemp)
Temp = Temp2 - Temp1
Temp2 = Result Mod 16
Temp = Temp2 * Temp
Temp = Temp \ 16
Temp = Temp1 + Temp
Temp = Temp - 60
Return
Airtemp:
Data &HF4 , &HB0 , &H91 , &H80 , &H74 , &H6A , &H62 , &H5A
Data &H53 , &H4C , &H45 , &H3E , &H35 , &H2B , &H1D , &H01 , &H01
Air inlet temperature(C), manifold temperature(C), O2 sensor(V), injector pulse width(ms)
The spacing is as neat as I could get it all to fit on a 16*2 LCD display.
http://john824.fotopic.net/p42063827.html
Compiles from BASCOM-AVR to just over 2k of code, so fits in the free version.
Code is as below with the LCD pins set in a dialog box, 15625 8N1 serial comms using MUT protocol.
Declare Function Send(byval Request As Byte) As Byte
Dim Uartstatusstore As Byte
Dim Result As Byte
Dim Octane As Word
Dim Knock As Byte
Dim Timing As Integer
Dim Map As Word
Dim Iat As Integer
Dim Mat As Integer
Dim Oxygen As Word
Dim Ipw As Word
Dim Temp As Integer
Dim Temp1 As Byte
Dim Temp2 As Byte
Dim Sresult As String * 5
Dim Sout As String * 20
Dim I As Byte
Config Serialin = Buffered , Size = 5 'buffered serial in 10 bytes
Enable Interrupts 'using interrupts
Config Pind.1 = Output 'set Tx pin as manual output pin
Set Portd.1 'set high (RS232 rest state)
Cls 'clear the LCD display
Lcd "Init @ 5 baud" 'display this at the top line
Uartstatusstore = Ucsrb 'save UART settings
Ucsrb = 0 'stop UART
Reset Portd.1
Waitms 1800 'break 1800ms = 1 start, 8 zero bits
Set Portd.1
Waitms 200 '200ms = 1 stop
Ucsrb = Uartstatusstore 'restore UART
Lowerline 'select the lower line
Lcd "Send FEFFFEFF" 'display this at the lower line
Result = Send(&Hfe)
Result = Send(&Hff)
Result = Send(&Hfe)
Result = Send(&Hff)
Cls
Do
Result = Send(&H27)
Octane = Result * 100
Octane = Octane / 255
Sresult = Str(octane)
Sout = Format(sresult , " 0")
Sout = Sout + "%"
Result = Send(&H26)
Knock = Result
Sresult = Str(knock)
Sout = Sout + Format(sresult , " 0")
Result = Send(&H06)
Timing = Result - 20
Sresult = Str(timing)
Sout = Sout + Format(sresult , "+ 0")
Result = Send(&H38)
Map = Result * 4
Map = Map / 3
Sresult = Str(map)
Sout = Sout + Format(sresult , " 0")
Sout = Sout + "k"
Upperline
Lcd Sout
Result = Send(&H3a)
Gosub Atconvert
Iat = Temp
Sresult = Str(iat)
Sout = Format(sresult , "+00")
Sout = Sout + "C"
Result = Send(&Hbd)
Gosub Atconvert
Mat = Temp
Sresult = Str(mat)
Sout = Sout + Format(sresult , "+00")
Sout = Sout + "C"
Result = Send(&H13)
Oxygen = Result * 49
Oxygen = Oxygen / 25
Sresult = Str(oxygen)
Sout = Sout + Format(sresult , ".00")
Result = Send(&H29)
Ipw = Result * 64
Ipw = Ipw / 25
Sresult = Str(ipw)
Sout = Sout + Format(sresult , " 0.0")
Lowerline
Lcd Sout
Loop
End
Function Send(byval Request As Byte) As Byte
Local Temporary As Byte
Printbin Request 'send request
Inputbin Temporary , Temporary 'receive echo and result
Send = Temporary
End Function
Atconvert:
Temp = Result \ 16
Temp1 = Lookup(temp , Airtemp)
Incr Temp
Temp2 = Lookup(temp , Airtemp)
Temp = Temp2 - Temp1
Temp2 = Result Mod 16
Temp = Temp2 * Temp
Temp = Temp \ 16
Temp = Temp1 + Temp
Temp = Temp - 60
Return
Airtemp:
Data &HF4 , &HB0 , &H91 , &H80 , &H74 , &H6A , &H62 , &H5A
Data &H53 , &H4C , &H45 , &H3E , &H35 , &H2B , &H1D , &H01 , &H01
Octane value%, knock sum, ignition timing, manifold pressure (kPa)
Air inlet temperature(C), manifold temperature(C), O2 sensor(V), injector pulse width(ms)
The spacing is as neat as I could get it all to fit on a 16*2 LCD display.
http://john824.fotopic.net/p42063827.html
Air inlet temperature(C), manifold temperature(C), O2 sensor(V), injector pulse width(ms)
The spacing is as neat as I could get it all to fit on a 16*2 LCD display.
http://john824.fotopic.net/p42063827.html
Well my latest plan is to make the ECU switch to 19200 baud from a command sent from the usual loggers (instead of 15625 baud that MUT uses but doesn't work with Pocket PC) to directly connect a VAG COM RS232 cable to a Pocket PC.
The Pocket PC could then send a command to revert to 15625, or you could just power down the ECU to reset it to allow compatibility with MUT tools.
Other options would be to look at TPS whilst the Pocket PC is connecting - to allow baud rate selection.
The Pocket PC could then send a command to revert to 15625, or you could just power down the ECU to reset it to allow compatibility with MUT tools.
Other options would be to look at TPS whilst the Pocket PC is connecting - to allow baud rate selection.






