Scroll down Paul.
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
--
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.