GPIO - what do users want?

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Post by Keithg »

johnc32779 wrote:Some fuel for the fire -- for what it's worth.

http://www.futurlec.com/CANNode.shtml

http://www.futurlec.com/ET-ARM_Stamp.shtml
Atmel CANary
The CANary module used by ATMEL for the T89C51 and CAN-AVR family, like the TouCAN from Motorola, uses three 8-bit registers to set-up the bit timing parameters required by the CAN protocol - CANBT1, CANBT2 und CANBT3. CANBT1 contains BRP, the bit timing prescaler at bits 1-6, value range 0-63. CANBT2 contains the programming time segment PRS = PROP_SEG (Bit 1-3) and CANBT3 contains the values for PHS1 = PHASE_SEG1 (Bit 1-3) and PHS2 = PHASE_SEG2 (Bit 4-6 in CANBT3).

The values for BRP, PRS, PHS1 and PHS2 are calculated.

For 125 kbit/s and 16 tq at 16 (8)Mhz
BRP = 3, PRS = 4, PHS1 = 7, PHS2 = 1

http://www.avrfreaks.net/index.php?modu ... icle&id=23

Looks like the AVR speaks similarly to the Moto chips. With built in CAN... more fuel.

KeithG
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

The DIY options are still very much available, it depends on how DIY you want to be.

There are other MC9S12 family parts out there that could be suitable, but going that way is likely to be a large undertaking for an individual.

Getting the GPIO board, or simply using another MS2 card on your own proto board are far more achievable. The code and knowledge base are there to do your own thing.

I don't see the sequencer board as out of reach, but it wasn't conceived as an entry level product in any case. If you don't need those features then don't buy a cheaper Megasquirt option instead.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
KGB
Experienced MS/Extra'er
Posts: 272
Joined: Mon Oct 03, 2005 11:26 pm
Location: Delta, BC, Canada

Post by KGB »

I think there were only 2 or 3 pin mismatch on the GPIO to prevent it from being made into a base board for MS2/Extra - that's my plan as the MS1/Extra setup + error addon board hasn't worked for me and I have some nasty troubleshooting on my hands that I would rather start new

The other thing is that by not using the AMPseal and use something else, you can probably get away with stacking 2 GPIO boards together with jumper wires in between the board, in one enclosure.

Haven't read the whole thread about all the ideas but if the GPIO does indeed have a flexible jumper block between CPU pins and circuits, there is a lot you can do with it. The other thing is that one of the PWM pins is programmed to be the reset jumper in the bootloader which in my opinion should be moved to some other less flexible pin (like PE1 which can only be used as input)
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

KGB wrote:The other thing is that one of the PWM pins is programmed to be the reset jumper in the bootloader which in my opinion should be moved to some other less flexible pin (like PE1 which can only be used as input)
That can be done quite easily, but only if you have a BDM adapter.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
6040solder
Experienced MS/Extra'er
Posts: 307
Joined: Mon Oct 22, 2007 7:15 am
Location: Auckland, New Zealand

Post by 6040solder »

http://www.msefi.com/viewtopic.php?p=186537#186537

thats pretty cool :-)

i'm guessing it would be a minor set of tweaks to make this work with msextra as one of the two boxs?
RacerStev
MS/Extra Newbie
Posts: 23
Joined: Fri Jun 22, 2007 5:42 am

Post by RacerStev »

From a drag racers point of veiw.

Boost control with at least 3 stages, time based with ramping.

Panic buttons for boost control, one to raise it a set amount and
one to lower it an adjustable amount.

Wheel speed inputs, one front one rear. With traction control

Nitrous control

Several of each, pressure inputs and temp inputs for logging

4 EGT's

input for a Accelerometer Module

Maybe a built in delay box of some type?


One last thing, on board logging. NHRA dosn't allow laptops in the
car for logging purpose's. So it's looking like I'll need to go to a digital
dash for logging...

http://www.powertraincontrolsolutions.com/

Steve
Philip Lochner
Super MS/Extra'er
Posts: 1004
Joined: Thu Feb 16, 2006 6:18 am
Location: George, South Africa

Post by Philip Lochner »

I would use GPIO to run sequential, mainly to cater for different opening times on different injectors* as this causes rather substantial differences in AFRs in a batch fired implementation at lean mixtures and at small PWs.

My hope is further increase the smoothness of the engine.

* I found on my Rover V8 that opening times were between 1.25ms and 1.55ms on "the same" Bosch injectors with the same part no!!
Kind regards
Philip
'74 Jensen Interceptor 440ci (EFI'ed with MS2 and wasted spark + GM 4L60e GPIO controlled - both on Extra FW)
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Although possible, I suppose, the idea of using the GPIO as an ignition board for sequential seems odd. Use the sequencer !

The one missed opportunity here seems to be this: you can use a second MS2 card as an I/O extender right now - TODAY!

So why is nobody doing it?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Post by racingmini_mtl »

Following that, would there be any interest in a board that would take an MS2 daughterboard and would include 8 ADC conditioners and 8 high current devices (possibly a VNP5N07) that could be used for digital or PWM outputs? I wouldn't plan on any connectors other than screw terminals so that cost could be kept low and flexibility kept high.

The goal would be to have a board as flexible and DIY as possible to be used as an I/O extender for the MS2/extra code. I'd like the board to fit in an MS case but I don't think that it would actually be feasible because the MS2 is quite high. Otherwise I'd find a case that would be appropriate.

So if there is an interest, post here and let me know. If I see enough interest, I'll make a board.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

GPIO - what do users want?

Post by Keithg »

This finally sunk in. grab 5V and gnd, put the second MS2 on a card in the top half of the V3. I get it, now, but it seems overkill when all I need is one PWM output and I'm happy. If I can shake a C note loose, I may try it anyway. Do you have a generic version of the trans code and a clear example of passing variables and such? That would be very useful.

KeithG

On Dec 28, 2007 7:58 PM, jsmcortina wrote:
The one missed opportunity here seems to be this: you can use a second MS2 card as an I/O extender right now - TODAY!

So why is nobody doing it?

James
Philip Lochner
Super MS/Extra'er
Posts: 1004
Joined: Thu Feb 16, 2006 6:18 am
Location: George, South Africa

Post by Philip Lochner »

jsmcortina wrote:Although possible, I suppose, the idea of using the GPIO as an ignition board for sequential seems odd. Use the sequencer !
And on the V12?
jsmcortina wrote:The one missed opportunity here seems to be this: you can use a second MS2 card as an I/O extender right now - TODAY!

So why is nobody doing it?
I for one a) somehow, did not know it was possible and b) still don't know exactly how...
Kind regards
Philip
'74 Jensen Interceptor 440ci (EFI'ed with MS2 and wasted spark + GM 4L60e GPIO controlled - both on Extra FW)
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Philip Lochner wrote:
jsmcortina wrote:Although possible, I suppose, the idea of using the GPIO as an ignition board for sequential seems odd. Use the sequencer !
And on the V12?
Yep, that's going to be tricky. You'd need to pretty special code. I'm guessing that the sequencer can be used for semi-sequential and wasted spark. Neither the GPIO nor sequencer have enough outputs for 12 spark and 12 fuel.
jsmcortina wrote:The one missed opportunity here seems to be this: you can use a second MS2 card as an I/O extender right now - TODAY!

So why is nobody doing it?
I for one a) somehow, did not know it was possible and b) still don't know exactly how...
This is really new and I was having a bit of fun with that post.

Since beta 17, two MS2/Extras can talk to each other over CAN and grab the ADCs from the remote one for display in Megatune. You can also use a remote ADC for realtime baro.

The help text from the CAN settings page in Megatune says:

Code: Select all

In a CAN setup each board must have a different CAN ID

For simplicity consider that the serial cable, computer and Megatune are connected to the MS2


Board type should be MS2 (this isn't actually used by the code)
The master board is CAN ID 0
Poll remote determines whether we should get data from a remote board or not.
Supported boards at this time are GPIO (1.041 doesn't return any data by default) or MS2/Extra in slave mode

The first remote board is typically CAN ID 1, but you MUST set this on the remote board

To set an MS2 running MS2/Extra to be in slave mode and transmit data to a master MS2
Connect the serial cable to the slave board and set its CAN ID to 1.
(Due to the way the serial comms work, you can only change it once - after that it will not be accessible and will
require a re-flash or special Megatune config to return to normal - so be careful.)
Connect the serial cable to the master board, set its CAN ID to 0 and 'poll remote' to 'MS2/Extra slave'
Make the physical CAN connection between the boards

After a reset you can then see the ADC ports from the slave MS2 displayed in Megatune connected to the master MS2 via the gauges GPIOADCgauge etc.

Presently this can be used to log 8 additional ADC channels and/or to support realtime baro, knock and dual wideband.
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
devojet
Experienced MS/Extra'er
Posts: 309
Joined: Sat Dec 30, 2006 6:00 am
Location: Gold Coast, Australia

Post by devojet »

The one missed opportunity here seems to be this: you can use a second MS2 card as an I/O extender right now - TODAY!
Thats exactly what I have been planning to do using your trans code to control my toyota A341E.
would there be any interest in a board that would take an MS2 daughterboard
I would if you added a couple of "high side" high current drivers and use a DB connector instead of screw terminals and find a case to house it and the MS. My gearbox needs switched 12V to drive the solenoids not switched ground.

Cheers

Daniel
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: GPIO - what do users want?

Post by jsmcortina »

Keithg wrote:This finally sunk in. grab 5V and gnd, put the second MS2 on a card in the top half of the V3. I get it, now, but it seems overkill when all I need is one PWM output and I'm happy. If I can shake a C note loose, I may try it anyway. Do you have a generic version of the trans code and a clear example of passing variables and such? That would be very useful.
Although 'overkill' at the same time it should simply work. There's already example code in beta17. Drop me an email and I'll send you the incomplete CAN enabled trans code.

Note that I plan to merge in the latest MS2 2.88x CAN changes which move a variable block.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
eliotmansfield
Experienced MS/Extra'er
Posts: 249
Joined: Sat Apr 03, 2004 1:39 am
Location: Milton Keynes - UK
Contact:

Post by eliotmansfield »

With the exception of using an existing MS2/V3.0 PCB, I dont understand why people are talking about making IO extender cards, using say an MS2 chip in some new board, when thats exaclty what the GPIO is?
What am i missing?
Eliot Mansfield
5.7L Twin Turbo Dakar 4x4.
www.mez.co.uk
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: GPIO - what do users want?

Post by jsmcortina »

eliotmansfield wrote:With the exception of using an existing MS2/V3.0 PCB, I don’t understand why people are talking about making IO extender cards, using say an MS2 chip in some new board, when thats exactly what the GPIO is?
What am i missing?
More DIY ? Available today?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
eliotmansfield
Experienced MS/Extra'er
Posts: 249
Joined: Sat Apr 03, 2004 1:39 am
Location: Milton Keynes - UK
Contact:

Re: GPIO - what do users want?

Post by eliotmansfield »

jsmcortina wrote: More DIY ? Available today?

James
But isn't the GPIO just about to be released? Any new board would take at least a few months to agree and develop?
Eliot Mansfield
5.7L Twin Turbo Dakar 4x4.
www.mez.co.uk
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Re: GPIO - what do users want?

Post by Keithg »

eliotmansfield wrote:
jsmcortina wrote: More DIY ? Available today?

James
But isn't the GPIO just about to be released? Any new board would take at least a few months to agree and develop?
But that is the deal, IMO. DIY. An MS2 chip on a perf board and solder up whatever number of inputs and outputs we need. Keeps cost down and keeps development spread out among others than just James and Ken. If James releases a basic MS2_extender code which can be flashed to a 2nd MS2 chip and we can add inputs and outputs as needed, that would be really useful and pretty similar to how the MS1 development went in that others added code and hardware to control things they needed to control. The bigger deal is how, exactly, that would work from a software perspective, but however that works, it would probably be similar to how a MS2 would work with a GPIO. I, personally, am excited about this development.

KeithG
esv
MS/Extra Newbie
Posts: 27
Joined: Thu Feb 10, 2005 11:21 am

Post by esv »

Following that, would there be any interest in a board that would take an MS2 daughterboard and would include 8 ADC conditioners and 8 high current devices (possibly a VNP5N07) that could be used for digital or PWM outputs? I wouldn't plan on any connectors other than screw terminals so that cost could be kept low and flexibility kept high.

The goal would be to have a board as flexible and DIY as possible to be used as an I/O extender for the MS2/extra code. I'd like the board to fit in an MS case but I don't think that it would actually be feasible because the MS2 is quite high. Otherwise I'd find a case that would be appropriate.

So if there is an interest, post here and let me know. If I see enough interest, I'll make a board.
If such a board becomes available (please, make that happen James and Jean :D ), will it be able to be used with the forthcoming Sequencer?

esv
bstruble
MS/Extra Newbie
Posts: 30
Joined: Wed Apr 05, 2006 4:58 am
Location: Benton, AR

Post by bstruble »

I would love to have smething like to play with. Here's one vote.
Post Reply