Scroll down Matt.
This is the best site by far I have ever found on the subject by a factor
of 10.
Many examples are given both in asm and C for different micro computers
including the
AVR PJRC Teensy that I am using on the ignition board as well as the
FreeScale
processor used in the megasquirt.
http://www.scriptoriumdesigns.com/embedded/interrupt_examples.php
Somebody put a lot a man hours into this site.
Paul Lamar
For the past couple of weeks I have been working real hard on a solution
for using
LS1 and RX8 smart coils with megasquirt 1 V2.2 and carbs. What I am
discovering is a
clear division in micro computer chips. Those that are simple with
assigned I/O pins
and those that are complex with un-assigned I/O pins. It is up to the human
programmer to assign the pins.
The simple ones are easy to program in asm the others are not. Asm is
essential when
dealing with 10,000 RPM engines like the rotary. Especially when it comes
to real
world hardware random interrupts. Periodic interrupts can be a problem
also when two
come in at the same time despite a difference in frequencies. I solved
that proplem
back in 1976 but apparently microprocessor designer did not catch on.
http://www.rotaryeng.net/IEEE-road-test-sys.pdf "Besides, interrupts are
just very
cool, and you deserve to get to the cool stuff ASAP."
Most AVR chips fall into the second group as does the MC9S12. The first
group is the
6502, 8051 and the MC68HC908 used in the megasquirt 1. The megasquirt 2
and above use
the MC9S12 and C. The development software for the AVR studio 6 stunned
me when I
saw the size of the file. The install IDE exe was 750 megabytes and
installed it
required several gig. One of my XP computers told me I did not have enough
space on
the C: drive to install the IDE :) After several hours installing the
extremely
complex IDE it told me the AVR chip I wanted to use was unsupported in
asm. See the
attached jpg.
I am now considering going back to the 8051 or the MC68HC908. The low cost
8051 has
excellent world wide support. Even AVR makes a version.
http://tinyurl.com/bt9bdw8
The exception to the rule is the high end Silicon Labs
C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D With human programmer assigned pin
outs and 48
million instructions per second. I can order these from china for $30
bucks each
including 32 MB of on board flash memory no less. Great for storing a
bunch of RPM
history data and timing data.
I have a SL development board and all the SL assembler software. Also
makes a great
data ack board with on board 10 bit A to D's.
Henry Nee is over there as we speak and he can check out the company and
see if it is legit.
Paul Lamar
I'm actually in Taiwan today. Not sure what I can contribute at the moment
but I think division. Of labor on a few Low cost, simple uP may be easier
to make right. My thought has been on taking a page from your 555 system,
and use one such chip every rotor. (6 for the 6b if needed). This can be
done easily with ATtiny. Use a mother processor with analog input to
calculate the variable outputs without too much real time restrictions, the
use simple serial interface to transfer the resulting values to those
ATtiny and you have a very scale able solution. The ATtiny can be stacked
such that a hard wire ID corresponding to a rotor can be established
automatically. What do you think?
Henry
Sounds like a good plan but I would not use a AVR Tiny when you can get a 40 Mhz, 32
bit, 512K flash memory PIC with built in USB for $12. :) Even I can afford $12 a
rotor. The 512K memory could store a whole flight's worth of engine data if not a
years worth. This chip is more powerful than a PC from a few years ago. With GPS Rx
you can have real MPG on the panel.
Not only that, PIC have an excellent BASIC compiler. I am of the opinion that
computers should do more to help you program now a days. You should be able to speak
and say what you want the program to do and the computer should record and write the
program. System 7 Windows does an excellent job of speech recognition built in.
My wife tells her Android phone whom to call. Just like the computers in Silent
Running and Star Trek. Plain language BASIC is a step in the right direction unlike
cryptic C with curly brackets and inane commands all over the place :) With this much
speed and power why not.
MikroElectronika have a 32 bit PIC big board with touch graphics screen and built in
Mikro PIC BASIC support for $250. It even has a SD card reader/writer. It would be
nice to have a touch screen on the panel for calling up engine parameters.
Paul Lamar
Was this in reply to my question about what you disliked about existing rotary
solutions? Too many interrupt pins? If so, you could simply use a 36-1 trigger on the
eccentric shaft snout so you'd be using one interrupt pin instead of two. Although
the factory sensor setup has the two sensors positioned far enough apart that the
interrupts don't happen at the same time.
Thanks,
Matt Cramer
DIYAutoTune.com
No... it had nothing to do with interrupts.
Which year rotary are you referring too?
http://foxed.ca/index.php?page=rx7manual
http://www.rotaryeng.net/ignition.html
What model?
Early rotaries had a two distributors..... one for each rotor.
About the time of early 1984 RX7.... one distributer with a two level rotor and two
sets of points.
The 2nd gen RX7 around 1989 no rotor in the distributor but with two mag pickups.
Igniter's in the coil pack triggered by a computer.
The 3rd gen around 1993 had two mag pickups on the rotating trigger wheel on the nose
of the e-shaft. Same type of igniter's and coils as the 2nd gen.
The RX8 starting in 2004 was about the same except there was only one pickup.
Smart coils with the igniter in the coil triggered by the computer. Coil on plug.
Paul Lamar
The Rotary Engine News Letter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
You Tube key word PaulLamar2
Copyright 1998-2012 All world wide rights reserved.