The resources available are based on the Atmel 8535 MCU. This chip is an 8-bit RISC MPU with 8-channel ADC, 32 digital I/O, RTC capability, UART, 2x8-bit timer/counters, one 16-bit timer/counter, a watchdog counter, in-built PWM on the 16-bit and one of the 8-bit counters. There's 8K bytes of flash for program memory, 512 bytes of EEPROM and 512 bytes of SRAM. Flash and EEPROM are in-system-programmable via a slave processor interface (SPI). Various power-saving modes are supported; keeping SRAM alive with only a few micro-amps.
Required base functionality is defined by existing Digifant II architecture. The Digifant architecture utilises much of the L-Jetronic hardware such as air-flow meter, air and coolant temperature sensors, O2 sensor (except those without a cat-convertor never had it), an idle-stabiliser valve to bypass air past the throttle and of course pulsed injectors, all wired as one group. Timing is based on a Hall-sensor in a static distributor, providing only timing pulses at 6° and 78° before TDC. A knock sensor is also used by Digifant.
Pin Name | Definition | Dir | Allocation |
---|---|---|---|
VCC | Digital supply voltage | N | Regulated Power |
GND | Digital ground | N | Regulated power rail ground |
PA0 ADC0 | Analog in; Digital In/Out | I | Air flow |
PA1 ADC1 | Analog in; Digital In/Out | I | Air temp |
PA2 ADC2 | Analog in; Digital In/Out | I | Coolant temp |
PA3 ADC3 | Analog in; Digital In/Out | I | Battery volts |
PA4 ADC4 | Analog in; Digital In/Out | I | Knock Detection |
PA5 ADC5 | Analog in; Digital In/Out | I | O2 Sensor |
PA6 ADC6 | Analog in; Digital In/Out | - | |
PA7 ADC7 | Analog in; Digital In/Out | - | |
PB0 T0 | Digital In/Out | I | Hall Sensor 6/78° BTDC Same as PD6 == ICP |
PB1 T1 | Digital In/Out | - | |
PB2 AIN0 | Digital In/Out | I | Backup battery voltage |
PB3 AIN1 | Digital In/Out | I | Backup battery ref level |
PB4 SS | Digital In/Out | N | Communications Bus |
PB5 MOSI | Digital In/Out | N | Communications Bus |
PB6 MISO | Digital In/Out | N | Communications Bus |
PB7 SCK | Digital In/Out | N | Communications Bus |
PC0 | Digital In/Out | I | WOT/Idle switches (common) |
PC1 | Digital In/Out | I | Starter turning |
PC2 | Digital In/Out | I | Airconditioner running |
PC3 | Digital In/Out | O | Fuel pump relay |
PC4 | Digital In/Out | O | Head-unit (chip) select |
PC5 | Digital In/Out | O | Knock chip select |
PC6 TOSC1 | Digital In/Out | IO | Knock chip integration start/finish |
PC7 TOSC2 | Digital In/Out | - | |
PD0 RXD | Digital In/Out | I | Serial port RXD |
PD1 TXD | Digital In/Out | O | Serial port TXD |
PD2 INT0 | Digital In/Out | - | |
PD3 INT1 | Digital In/Out | I | Restart interrupt to wake from SLEEP |
PD4 OC1B | Digital In/Out | O | Fuel Injector Group 0 |
PD5 OC1A | Digital In/Out | I | Ignition |
PD6 ICP | Digital In/Out | I | Hall Sensor in distributor 6 and 78° BTDC |
PD7 OC2 | Digital In/Out | O | Idle Stabiliser Valve |
RESET | Reset input. Low for two cycles resets device | N | As per data sheet |
XTAL1 | Input to inverting osc. amp and internal clock | N | for 8 MHz |
XTAL2 | Output from inverting osc. amp | N | for 8 MHz |
AVCC | Supply for ADC | N | VCC with low-pass filtering |
AREF | Reference voltage for ADC | N | Regulated ref - 3V |
AGND | Analog ground. | N | Shielded ground common for analog signals |
Timer | Resolution | Clock Rate | Allocation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TC0 | 8-bit | T0 | Half-Rev Counter.
Used for
| ||||||||||||
TC1 | 16-bit | CK/64 | Engine Base Timing -
All the operations for injection and ignition have their
timing based on this counter.
| ||||||||||||
TC2 | 8-bit | TCK2/1024 | PWM used for idle stabiliser
| ||||||||||||
Watchdog | 16 to 2048ms | 1MHz | 256K cycles (approx 256ms) used as pre-scaler to avoid handling more than one watchdog interrupt per half-crank when starting. It may be desirable to decrease the prescale to something like 64K cycles (depending on idle speed) once the engine is idling. |
Vector | Source | Definition | Allocation |
---|---|---|---|
1 | RESET | Pin and Watchdog Reset | |
2 | INT0 | External Interrupt Request 0 | |
3 | INT1 | External Interrupt Request 1 | Low-power save and sleep / power-on restart |
4 | TIMER2 COMP | Timer/Counter 2 compare match | not used - PWM |
5 | TIMER2 OVF | Timer/Counter 2 overflow | not used - PWM |
6 | TIMER1 CAPT | Timer/Counter 1 capture event | TDC/BDC marker |
7 | TIMER1 COMPA | Timer/Counter 1 compare match A | Fuel injection timing and housekeeping |
8 | TIMER1 COMPB | Timer/Counter 1 compare match B | Ignition dwell/timing and knock sense integration trigger |
9 | TIMER1 OVF | Timer/Counter 1 overflow | Fuel pump control |
10 | TIMER0 OVF | Timer/Counter 0 overflow | Engine revolutions counter |
11 | SPI, STC | Serial transfer complete | Host bus transmissions; in-system-programming |
12 | UART, RX | UART Rx complete | Raw diagnostic |
13 | UART, UDRE | UART Data register empty | Raw diagnostic |
14 | UART, TX | UART Tx complete | Raw diagnostic |
15 | ADC | ADC Complete | Conversions of quantities |
16 | EE_RDY | EEPROM Ready | Save adapted/trimmed parameters |
17 | ANA_COMP | Analog comparator | Power-off |