Programming/hardware question
Moderators: jsmcortina, muythaibxr
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Programming/hardware question
I need 3 general outputs for something I'm working on, I already have js11, iac1, and iac2 tied up... now there are ad6 and ad7 but the code says they "can't be spark e/f", is that just the code that wont use them, or is it the hardware?
I have completely read the I/O section of the programmers manual, I was hoping to get a faster answer here.
I have completely read the I/O section of the programmers manual, I was hoping to get a faster answer here.
-
- Site Admin
- Posts: 39615
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Programming/hardware question
Where does it say "can't be spark e/f" ?seishuku wrote:I need 3 general outputs for something I'm working on, I already have js11, iac1, and iac2 tied up... now there are ad6 and ad7 but the code says they "can't be spark e/f", is that just the code that wont use them, or is it the hardware?
I have completely read the I/O section of the programmers manual, I was hoping to get a faster answer here.
Which programmers manual?
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".
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".
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Oh, sorry.... the manual for the micro controller (m9s12c64), I recall the comment is in the misc c source where it sets up all the pins (I'm on my phone, so I couldn't say where exactly).
Or am I being dumb and it says that they can be spark e/f? I'm kinda doubting myself now.
Or am I being dumb and it says that they can be spark e/f? I'm kinda doubting myself now.
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Programming/hardware question
I don't know what you saw but have a look at this: http://www.msextra.com/doc/ms2extra/MS2 ... ms2options.
Jean
Jean
Re: Programming/hardware question
ADC6 & 7 are in fact usable as sparks E & F, but only on the MS2. The uS and uSM have filter components that (I think) would interfere with the timing of spark pulses.
This ability to act as spark outputs is why I've started muttering that perhaps these pins should be made programmable outputs, as well!
This ability to act as spark outputs is why I've started muttering that perhaps these pins should be made programmable outputs, as well!
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Ok, that's what I was looking for, and yeah if that's the case, they should be allowed as MS conditional outputs (as per "programmable I/O").
Though that's not exactly why I need them, I need them for my own code to "steal", for my own devices.
And above when I said "I have completely read the I/O section of the programmers manual...", I meant "haven't"... Stupid phone.
What I was mainly wondering if those ADC pins can indeed be GPIO as well, as most microcontrollers allow pins like that to be a peripheral (in this case an ADC), or I/O with pull-ups/pull-downs, etc.
Now that I've looked through the source again, I can't find that comment... I thought it was in ms2_extra_init.c where it's setting the pins, but looking through it again I do see it says AD6/AD7 can be spark 5/6, so I must have mis-read it.
Though that's not exactly why I need them, I need them for my own code to "steal", for my own devices.
And above when I said "I have completely read the I/O section of the programmers manual...", I meant "haven't"... Stupid phone.
What I was mainly wondering if those ADC pins can indeed be GPIO as well, as most microcontrollers allow pins like that to be a peripheral (in this case an ADC), or I/O with pull-ups/pull-downs, etc.
Now that I've looked through the source again, I can't find that comment... I thought it was in ms2_extra_init.c where it's setting the pins, but looking through it again I do see it says AD6/AD7 can be spark 5/6, so I must have mis-read it.
Re: Programming/hardware question
Yeah, about that - you do realize, the MS firmware and source code is a copyrighted commercial IP? Announcing your intent to misappropriate that IP in a forum paid for and administered by the copyright holders is pretty d*** arrogant, and bloody rude besides.seishuku wrote:Though that's not exactly why I need them, I need them for my own code to "steal", for my own devices.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Huh? I'm not doing anything with their IP, I'm adding my own code on top of MSExtra (that's what the user code C source is for, right???)
I meant "stealing" as in I'm stealing the IO pin away from the MS control code, not as in physically stealing something. That's why I put it in "quotes".
Besides that, I own a genuine B&G v2.2 board, as well as an MS1 processor AND an MS2 daughterboard.
I meant "stealing" as in I'm stealing the IO pin away from the MS control code, not as in physically stealing something. That's why I put it in "quotes".
Besides that, I own a genuine B&G v2.2 board, as well as an MS1 processor AND an MS2 daughterboard.
-
- Site Admin
- Posts: 39615
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Programming/hardware question
Yes, the ADC pins can be configured as digital inputs of outputs.
e.g.
then PTAD is used for the output itself.
James
e.g.
Code: Select all
DDRAD |= 0x40; // enable pin AD06 as digital output
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".
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".
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Awesome, looks like it works exactly like my MSP430 microcontroller then...
Thanks!
Thanks!
Re: Programming/hardware question
Seishuku - I withdraw my comments, and will sit back down and drink my coffee. I would ask that you re-read the bit I quoted in my post, and decide for yourself if my reaction was unreasonable.
James - any chance of that making its way into the standard code, for those without compilers?
James - any chance of that making its way into the standard code, for those without compilers?
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Just a misunderstanding.dontz125 wrote:Seishuku - I withdraw my comments, and will sit back down and drink my coffee. I would ask that you re-read the bit I quoted in my post, and decide for yourself if my reaction was unreasonable.
When I said "that's not exactly why I need them" was referring to not needing the pins as conditional outputs as per the MegaSquirt control (ie. if RPM > 5000 then output1 "on"), I need the I/O pins for my own code for direct interface to my own devices. My code is going to steal control (control of the pins) away from the main MegaSquirt control program.
Just FYI, copyright/IP infringement, as far as I understand it, is only illegal if I'm redistributing it for profit and claiming it as my own (or cloning it and passing it off as real, etc, etc)... What I'm doing is for my own project, and is for my configuration, it's not intended for anyone else.
I can share what I'm working on, if anyone is interested, I don't mind sharing mods, but the chances are no one will really be that interested. (assuming it works in the first place!)
-
- Super MS/Extra'er
- Posts: 9130
- Joined: Sun May 02, 2004 6:51 am
- Location: Quebec, Canada
- Contact:
Re: Programming/hardware question
That's not what the license says. Please read the text file included in the source directory. I'm not saying you can't do what you want here but you still need to know what is in the license and respect it.seishuku wrote:Just FYI, copyright/IP infringement, as far as I understand it, is only illegal if I'm redistributing it for profit and claiming it as my own (or cloning it and passing it off as real, etc, etc)... What I'm doing is for my own project, and is for my configuration, it's not intended for anyone else.
Jean
-
- Experienced MS/Extra'er
- Posts: 209
- Joined: Tue Dec 01, 2009 5:38 pm
- Location: Wisconsin, USA
Re: Programming/hardware question
Well that was a little easier than I thought...
https://www.youtube.com/watch?v=BdG7Q3NL6Ss
And before anyone says "why not just use a CAN based display?"
Well, that's because I don't have any, I already have this display and I'm cheap...
I have it set up so I can change the displayed value is RPM, MAP, MAT, CLT, AFR (shown), BAT, or ignition advance.
Originally I intended to use the display with my MSP430 LaunchPad and interface it directly to my Innovate LC1 (no analog loss), but this is the next best thing and less extra devices.
https://www.youtube.com/watch?v=BdG7Q3NL6Ss
And before anyone says "why not just use a CAN based display?"
Well, that's because I don't have any, I already have this display and I'm cheap...
I have it set up so I can change the displayed value is RPM, MAP, MAT, CLT, AFR (shown), BAT, or ignition advance.
Originally I intended to use the display with my MSP430 LaunchPad and interface it directly to my Innovate LC1 (no analog loss), but this is the next best thing and less extra devices.
-
- Helpful MS/Extra'er
- Posts: 142
- Joined: Thu Oct 18, 2012 6:20 pm
Re: Programming/hardware question
So is it looking likely to have these as cofig i/o in a future release????