Will my BS2 Stamp work for prototyping an automotive ignition circuit?
Dan M
Posts: 4
Hello, I'm new to microcontrollers and I just picked up a Basic Stamp kit from radioshack. I bought it to interface with a GM 7 pin HEI module (actually 2 of them).
I know the stamp can send and recieve the signals I need, but I don't know if it can do it fast enough. Here's what has to happen:
sense trigger signal from pickup coil one (this is already a TTL logic level)
sense trigger signal from pickup coil two
calculate miliseconds between them
do a table lookup to determine how long to delay the next event
send TTL low to HEI module one (based on table lookup)
sense trigger signal from pickup coil one and calculate miliseconds between the previous signal
calculate miliseconds between them
do a table lookup to determine how long to delay the next event
send ttl low to HEI module two
lather, rinse, repeat
I have maybe 2-6 milliseconds to work with at maximum RPM (I think, I haven't measured this out yet)
Eventually there will be a third input, a vaccum (MAP) sensor that gets included in the table lookup portion.
Can my basic stamp handle prototyping something like this?
Thanks,
Dan
I know the stamp can send and recieve the signals I need, but I don't know if it can do it fast enough. Here's what has to happen:
sense trigger signal from pickup coil one (this is already a TTL logic level)
sense trigger signal from pickup coil two
calculate miliseconds between them
do a table lookup to determine how long to delay the next event
send TTL low to HEI module one (based on table lookup)
sense trigger signal from pickup coil one and calculate miliseconds between the previous signal
calculate miliseconds between them
do a table lookup to determine how long to delay the next event
send ttl low to HEI module two
lather, rinse, repeat
I have maybe 2-6 milliseconds to work with at maximum RPM (I think, I haven't measured this out yet)
Eventually there will be a third input, a vaccum (MAP) sensor that gets included in the table lookup portion.
Can my basic stamp handle prototyping something like this?
Thanks,
Dan
Comments
This particular application has a 'hard' real-time goal. The BS2 takes about 500 uSec per instruction executed. So you could execute MAYBE 12 instructions in your 6 millisecond time window.
If you were really-really lucky, this application MIGHT be do-able. But you're operating on the hairy edge of what the BS2 is capable of.
On the other hand, an SX based solution should work fine.
Dan
Yes?· No?
How hard would it be to move my code to the SX chip?
Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
19,000 -- OK, that's 53 usec / instruction, that's almost 19 in 1msec.
Is that enough for Dan M's project?· Over to you, Dan M.
So basically at my highest rpm point with the table lookup I'll be doing this:
time pulse 2 relative to pulse 1
determine that it is within range to do the needed table lookup
read in from map sensor
do table lookup
begin the ouput pulse and hold it until x amount of time passes (the time I looked up in the table)
Now I don't know what the definition of an instruction is for the stamp - is it something like a table lookup or a math function? sounds like with 1/2 mSec per instruction I probably can't do this. It'll still give me something to play with for a while.
I was also wondering if this is the type of application that would benefit from interrupts?
Dan