ACE1101 FAIRCHILD | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 33
Technical content
Features
I Arithmetic Controller Engine I 1K bytes on-board code EEPROM I 64 bytes data EEPROM I 64 bytes RAM I Watchdog I Multi-input wake-up all I/O pins Block and Connection Diagram PRELIMINARY May 1999 I 16-bit multifunction timer I On-chip oscillator — No external components — 1 µs instruction cycle time I Instruction set geared for block encryption I On-chip power on reset I Programmable read and write disable functions I Memory mapped I/O I Multilevel Low Voltage Detection I Fully static CMOS — Low power HALT mode (100nA @3.3V) — Power saving IDLE mode I Software selectable I/O options — Push-pull outputs with tri-state option — Weak pull-up or high impedance inputs I 40 years data retention I 1,000,000 data changes I 8-pin TSSOP package I In-circuit programmingPower-on Reset VCC GND G0 (CKO) G1 (CKI) G2 (T1) G3(Input only) Internal Oscillator G port general purpose I/O with multi- input wakeup Low Battery/Brown-out Detect * 100nf Decoupling capacitor recommended Watchdog/ 12-Bit Timer 0 ACEx Control Unit 64 bytes of DATA EEPROM Programming Interface 1K bytes of CODE EEPROM 16-Bit Timer 1 HALT/IDLE Power saving Modes RAM block 64 bytes © 1999 Fairchild Semiconductor Corporation
2 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Absolute Maximum Ratings Ambient Storage Temperature -65 °C to +150°C Input Voltage not including G3 -0.3V to V CC+0.3V G3 Input Voltage 0.3V to 13V Lead Temperature (10s max) +300 °C Electrostatic Discharge on all pins 2000V min Operating Conditions Ambient Operating Temperature: ACE1101 0 °C to 70°C ACE1101E -40 °C to +85°C Operating Supply Voltage: From -40°C to 85°C: 2.2V to 5.5V See table for EEPROM write limits Relative Humidity (non-condensing) 95% All measurements valid for ambient operating temperature range unless otherwise stated. Symbol Parameter Conditions MIN TYP MAX Units ICC Supply Current – 2.2V 0.5 1.0 mA no EEPROM write in 3.3V 1.0 1.5 mA progress 5.5V 1.6 2.0 mA ICCH HALT Mode current 3.3V, -40 °C to 25°C 10 100 nA 5.5V, -40°C to 25°C 200 1000 nA 3.3V, 25°C to +85°C 50 1000 nA 5.5V, 25°C to +85°C 400 2500 nA 3.3V, -40°C to +125°C 350 5000 nA 5.5V, -40°C to +125°C 1200 8000 nA ICCI IDLE Mode Current 5.5V 120 250 µA* 3.3V 100 150 µA* VCCW EEPROM Write Voltage Code EEPROM in 4.5 5.0 5.5 V Programming Mode Data EEPROM in 2.4 5.5 V Operating Mode SVCC Power Supply Slope 1us/V 10ms/V Inputs VIH Logic High 0.8V CC V VIL Logic Low 0.2 VCC V IIP Input Pull-up Current V CC=5.5V, VIN=0V 30 65 350 µA ITL TRI-STATE Leakage V CC=5.5V 2 200 nA VOL Output Low Voltage - VOL VCC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 5.0 mA sink 0.2 V CC V G5 10.0 mA sink 0.2 V CC V VCC= 2.2V – 3.3V 3.0 mA sink 0.2 V CC V 5.0 mA sink 0.2 V CC V VOH Output High Voltage - VOH VCC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 0.4 mA source 0.8 V CC V G5 1.0 mA source 0.8 V CC V VCC= 2.2V – 3.3V 0.4 mA source 0.8 V CC V 0.8 mA source 0.8 V CC V * Based on continuous IDLE looping.
3 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Preliminary ACE1101 AC Electrical Characteristics for VCC = 2.2 to 5.5V Parameter Conditions MIN TYP MAX Units Instruction cycle time from 5.0V at 25 °C 0.9 1.00 1.1 µs internal clock - setpoint Internal clock voltage dependent 3.0V to 5.5V, ±5% frequency variation constant temperature Internal clock temperature 3.0V to 5.5V, ±10% dependent frequency variation full temperature range Internal clock frequency 3.0V to 4.5V for ±2% deviation for 0.5V drop ACE1101E, T=constant Crystal oscillator frequency (Note 1) 4 MHz External clock frequency (Note 2) 4 MHz EEPROM write time 3 10 ms Internal clock start up time (Note 2) 2 ms Oscillator start up time (Note 2) 2400 cycles Note 1: The maximum permissible frequency is guaranteed by design but not 100% tested. Note 2: The parameter is guaranteed by design but not 100% tested. All data valid at ambient temperature between 4.5V and 5.5V. See “EEPROM write time” in the AC characteristics for definition of the programming ready time. The following characteristics are guaranteed by design but are not 100% tested. Parameter Description MIN MAX Units tHI CLOCK high time 500 DC ns tLO CLOCK low time 500 DC ns tDIS SHIFT_IN setup time 100 ns tDIH SHIFT_IN hold time 100 ns tDOS SHIFT_OUT setup time 100 ns tDOH SHIFT_OUT hold time 900 ns tSV1, tSV2 LOAD supervoltage timing 50 us tLOAD1, tLOAD2, tLOAD3, tLOAD4 LOAD timing 5 us VSUPERVOLTAGE Supervoltage level 11.5 12.5 V
4 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Absolute Maximum Ratings Ambient Storage Temperature -65 °C to +150°C Input Voltage not including G3 -0.3V to V CC+0.3V G3 Input Voltage 0.3V to 13V Lead Temperature (10s max) +300 °C Electrostatic Discharge on all pins 2000V min Operating Conditions Ambient Operating Temperature: ACE1101B 0 °C to 70°C ACE1101BE -40 °C to +85°C ACE1101BV -40 °C to +125°C Operating Supply Voltage: From -40°C to 125°C: 2.7V to 5.5V See table for EEPROM write limits Relative Humidity (non-condensing) 95% All measurements valid for ambient operating temperature range unless otherwise stated. Symbol Parameter Conditions MIN TYP MAX Units ICC Supply Current – 2.7V 0.7 1.2 mA no EEPROM write in 3.3V 1.0 1.5 mA progress 5.5V 1.6 2.0 mA ICCH HALT Mode current 3.3V, -40 °C to 25°C 10 100 nA 5.5V, -40°C to 25°C 200 1000 nA 3.3V, 25°C to +85°C 50 1000 nA 5.5V, 25°C to +85°C 400 2500 nA 3.3V, -40°C to +125°C 350 5000 nA 5.5V, -40°C to +125°C 1200 8000 nA ICCI IDLE Mode Current 5.5V 120 250 µA* 3.3V 100 150 µA* VCCW EEPROM Write Voltage Code EEPROM in 4.5 5.0 5.5 V Programming Mode Data EEPROM in 2.7 5.5 V Operating Mode SVCC Power Supply Slope 1us/V 10ms/V Inputs VIH Logic High 0.8V CC V VIL Logic Low 0.2 VCC V IIP Input Pull-up Current V CC=5.5V, VIN=0V 30 65 350 µA ITL TRI-STATE Leakage V CC=5.5V 2 200 nA VOL Output Low Voltage - VOL VCC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 5.0 mA sink 0.2 V CC V G5 10.0 mA sink 0.2 V CC V VCC= 2.7V – 3.3V 3.0 mA sink 0.2 V CC V 5.0 mA sink 0.2 V CC V VOH Output High Voltage - VOH VCC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 0.4 mA source 0.8 V CC V G5 1.0 mA source 0.8 V CC V VCC= 2.7V – 3.3V 0.4 mA source 0.8 V CC V 0.8 mA source 0.8 V CC V * Based on continuous IDLE looping.
5 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Preliminary ACE1101B AC Electrical Characteristics for VCC = 2.7 to 5.5V Parameter Conditions MIN TYP MAX Units Instruction cycle time from 5.0V at 25 °C 0.9 1.00 1.1 µs internal clock - setpoint Internal clock voltage dependent 3.0V to 5.5V, ±5% frequency variation constant temperature Internal clock temperature 3.0V to 5.5V, ±10% dependent frequency variation full temperature range Internal clock frequency 3.0V to 4.5V for ±2% deviation for 0.5V drop ACE1101BE, T=constant Crystal oscillator frequency (Note 1) 4 MHz External clock frequency (Note 2) 4 MHz EEPROM write time 3 10 ms Internal clock start up time (Note 2) 2 ms Oscillator start up time (Note 2) 2400 cycles Note 1: The maximum permissible frequency is guaranteed by design but not 100% tested. Note 2: The parameter is guaranteed by design but not 100% tested. All data valid at ambient temperature between 4.5V and 5.5V. See “EEPROM write time” in the AC characteristics for definition of the programming ready time. The following characteristics are guaranteed by design but are not 100% tested. Parameter Description MIN MAX Units tHI CLOCK high time 500 DC ns tLO CLOCK low time 500 DC ns tDIS SHIFT_IN setup time 100 ns tDIH SHIFT_IN hold time 100 ns tDOS SHIFT_OUT setup time 100 ns tDOH SHIFT_OUT hold time 900 ns tSV1, tSV2 LOAD supervoltage timing 50 us tLOAD1, tLOAD2, tLOAD3, tLOAD4 LOAD timing 5 us VSUPERVOLTAGE Supervoltage level 11.5 12.5 V
6 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Absolute Maximum Ratings Ambient Storage Temperature -65 °C to +150°C Input Voltage not including G3 -0.3V to Vcc+0.3V G3 Input Voltage 0.3V to 13V Lead Temperature (10s max) +300 °C Electrostatic Discharge on all pins 2000V min Operating Conditions Operating Supply Voltage excluding EEPROM write: 0°C to +70°C 2.0V to 5.5V (based on preliminary data) Relative Humidity (non-condensing) 95% Preliminary ACE1101L DC Electrical Characteristics for VCC = 2.0 to 5.5V All measurements valid for ambient operating temperature range unless otherwise stated. Symbol Parameter Conditions MIN TYP MAX Units ICC Supply Current – 2.0V 0.4 0.5 mA no EEPROM write in progress ICCH HALT Mode Current 2.0V, 0 °C to 70°C 10 100 nA ICCI IDLE Mode Current 2.0V 30 50 µA VCCW EEPROM Write Voltage Write Not Allowed for V VCC < 2.4V SVCC Power Supply Slope 1us/V 10ms/V Inputs VIH Logic High 0.8 V CC V VIL Logic Low 0.2 VCC V IIP Input Pull-up Current V CC=5.5V, VIN=0V 30 65 350 µA ITL TRI-STATE Leakage V CC=5.5V 2 200 nA VOL Output Low Voltage V CC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 5.0 mA sink 0.2 V CC V G5 10.0 mA sink 0.2 V CC V VCC= 2.0V – 3.3V G0, G1, G2, G4, G6, G7 0.8 mA sink 0.36 V CC V G5 10.0 mA sink 0.36 V CC V VOH Output High Voltage V CC= 3.3V – 5.5V G0, G1, G2, G4, G6, G7 0.4 mA source 0.8 V CC V G5 1.0 mA source 0.8 V CC V VCC= 2.0V – 3.3V G0, G1, G2, G4, G6, G7 0.1 mA source 1.44 V CC V G5 0.2 mA source 1.44 V CC V
7 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Preliminary ACE1101L AC Electrical Characteristics for VCC = 2.0 to 5.5V Parameter Conditions MIN TYP MAX Units Instruction cycle time from 5.0V at 25 °C 0.9 1.00 1.1 µs internal clock - setpoint Internal clock voltage dependent 3.0V to 5.5V, ±5% frequency variation constant temperature Internal clock temperature 3.0V to 5.5V, ±10% dependent frequency variation full temperature range Internal clock frequency 3.0V to 4.5V for ±2% deviation for 0.5V drop ACE1101E, T=constant Crystal oscillator frequency (Note 1) 4 MHz External clock frequency (Note 2) 4 MHz EEPROM write time 5 10 ms Internal clock start up time (Note 2) 2 ms Oscillator start up time (Note 2) 2400 cycles Note 1: The maximum permissible frequency is guaranteed by design but not 100% tested. Note 2: The parameter is guaranteed by design but not 100% tested.
8 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
3.0 ACE1101 AC & DC Characteristic Graphs
The graphs in this section are for design guidance and are based on prelimintest data Figure 2: RC Oscillator Frequency (VCC=5.0V) Figure 3: RC Oscillator Frequency (VCC=2.5V) Figure 4: Internal Oscillator Frequency 1600 1800 2000 2200 -45 -5 25 90 130 Temperature [°C] 5.0V 5.5V 4.5V 4.0V 3.5v 2.2V 1.000 1.200 1.400 1.600 1.800 2.000 2.200 2.400 2.600 3.3k/82pF 5.6k/100pF 6.8K/100pF Resistor & Capacitor Values [k & pF] Avg Min Max 0.600 0.800 1.000 1.200 1.400 1.600 3.3k/82pF 5.6k/100pF 6.8K/100pF Resistor & Capacitor Values [k & pF] Avg Min Max Frequency (MHz) Frequency (MHz) Frequency (KHz)
9 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Name Parameter Unit VCC Supply Voltage [V] VBATT Battery Voltage (Nominal Operating Voltage) [V] tS min Minimum Time for VCC to Rise by 1V [ms] tS actual Actual Time for VCC to Rise by 1V [ms] tS max Maximum Time for VCC to Rise by 1V [ms] SVCC Power Supply Slope [ms/V] tS min tS actual tS max time VCC VBATT Figure 5: Power Supply Rise Time
10 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications 0.380 0.400 0.420 0.440 0.460 0.480 0.500 0.520 130 95 25 -5 -20 -45 Temperature [°C] Vcc=3.0V 1.040 1.050 1.060 1.070 1.080 1.090 1.100 1.110 130 95 25 -5 -20 -45 Temperature [°C] Vcc=4.5V 1.240 1.260 1.280 1.300 1.320 1.340 130 95 25 -5 -20 -45 Temperature [°C] Vcc=5.0V 1.440 1.460 1.480 1.500 1.520 1.540 1.560 1.580 1.600 130 95 25 -5 -20 -45 Temperature [°C] Vcc=5.5V Figure 6: ICC Active Current (mA) Current (mA) Current (mA) Current (mA)
11 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications 100 150 200 250 300 350 130 95 25 -5 Temperature [°C] Vcc=3.3V 200 400 600 800 1000 1200 1400 130 95 25 -5 Temperature [°C] Vcc=5.5V Figure 7: HALT Current HALT Current (nA) HALT Current (nA)
12 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications 100 105 110 85 25 -40 Temperature [°C] Vcc=3.3V 85 25 -40 Temperature [°C] [µ ] Vcc=2.2V 100 105 110 115 120 125 130 85 25 -40 Temperature [°C] µ Vcc=5.5V Figure 8: IDLE Current Current ( µA) Current ( µA) Current ( µA)
14 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
4.0 Arithmetic Controller Core
The ACE1101 core is specifically designed for low cost applica- tions involving bit manipulation, shifting and block encryption. It is based on a modified Harvard architecture meaning peripheral, I/O, and RAM locations are addressed separately from instruction data. The core differs from the traditional Harvard architecture by aligning the data and instruction memory sequentially. This allows the X-pointer (11-bits) to point to any memory location in either Figure 12: Programming Model 8-bit accumulator register 11-bit X pointer register 10-bit program counter 4-bit stack pointer 8-bit status register NEGATIVE flag HALF CARRY flag (from bit 3) CARRY flag (from MSB) ZERO flag GLOBAL Interrupt Mask READY flag (from EEPROM) A X PC SP SR NHCZG00R segment of the memory map. This modification improves the overall code efficiency of the ACE1101 and takes advantage of the flexibility found on Von Neumann style machines.
4.1 CPU Registers
The ACE1101 has five general purpose registers. They are the A, X, PC, SP, and SR. The X, SP and SR are memory mapped registers.
15 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
4.1.1 Accumulator
Accumulator A is general-purpose 8-bit register that holds oper- ands and results of arithmetic calculations or data manipulations.
4.1.2 X Pointer
The X register provides an 11-bit indexing value that can be added to an 8-bit offset provided in an instruction to create an effective address. The X register can also be used as a counter or as a temporary storage register.
4.1.3 Program Counter (PC)
The program counter, a 10-bit register, contains the address of the next instruction to be executed. After reset, the program counter is initialized to 0xC00 in normal mode.
4.1.4 Stack Pointer (SP)
The ACE1101 has an automatic program stack. This stack can be initialized to any location between addresses 0x30-0x3F. By default, the stack is initialized to 0x3F. Normally, the SP is initialized by one of the first instructions in an application program. The stack is configured as a data structure that decrements from high memory to low memory. Each time a new address is pushed onto the stack, the SP is decremented by two. Each time an address is pulled from the stack, the SP is incremented by two. At any given time, the SP points to the next free location in the stack. When a subroutine is called by a jump to subroutine (JSR), the address of the instruction, after the JSR instruction, is automati- cally pushed onto the stack least significant byte first. When the subroutine is finished, a return from subroutine (RET) instruction is executed. The RET pulls the previously stacked return address from the stack, and loads it into the program counter. Execution then continues at this recovered return address.
4.1.5 Status Register (SR)
This 8-bit register contains four condition code indicators (C, H, Z, and N), one interrupt masking bit (G), and an EEPROM write flag (R). In the ACE1101, condition codes are automatically updated by most instructions. Carry/Borrow (C) The C bit is set if the arithmetic logic unit (ALU) performs a carry or borrow during an arithmetic operation. The rotate instruction operates with and through the carry bit to facilitate multiple-word shift operations. The LDC and INVC instructions facilitate direct bit manipulation using the carry flag. Half Carry (H) The half carry flag indicates whether an overflow has taken place on the boundary between the two nibbles in the accumulator. It is primarily used for BCD arithmetic calculation. Zero (Z) The Z bit is set if the result of an arithmetic, logic, or data manipulation operation is zero. Otherwise, the Z bit is cleared. Negative (N) The N bit is set if the result of an arithmetic, logic, or data manipulation operation is negative (MSB = 1). Otherwise, the N bit is cleared. A result is said to be negative if its most significant bit (MSB) is a one. Interrupt Mask (G) The interrupt request mask (G) is a global mask that disables all maskable interrupt sources. Until the G bit is set, interrupts can become pending, but the operation of the CPU continues uninterrupted. After any reset, the G bit is cleared by default and can only be set by a software instruction. When an interrupt is recognized, the G bit is cleared after the PC is stacked and the interrupt vector is fetched. After the interrupt is serviced, a return from interrupt instruction is normally executed to restore the PC to the value that was present before the interrupt occurred. The G bit is set after a return from interrupt is executed. Although the G bit can be set within an interrupt service routine, “nesting” interrupts in this way should only be done when there is a clear understanding of latency and of the arbitration mechanism.
4.2 Interrupt handling
When an interrupt is recognized, the current instruction completes its execution. The return address (the current value in the program counter) is pushed onto the stack and execution continues at the address specified by the unique interrupt vector (see Table 9). This process takes five instruction cycles. At the end of the interrupt service routine, a RETI instruction is executed. The RETI instruction causes the saved address to be pulled off the stack in reverse order. The G bit is set and program execution resumes at the return address. The ACE1101 is capable of supporting four interrupts. Three are maskable through the G bit of the Status register and the fourth (software interrupt) is not inhibited by the G bit (see Figure 13). (See Table 6 for the interrupt priority sequence.) The software interrupt instruction is executed in a manner similar to other maskable interrupts in that the program counter registers are stacked. How- ever, with a software interrupt, the G bit is not effected. This means, when returning from a software interrupt, a RET instruction should be used rather than using the RETI instruction. The RETI instruction will set the G bit.
4.3 Addressing Modes
The ACE1101 has seven addressing modes. Indexed In this addressing mode, a 8-bit unsigned offset value is added to the X-pointer yielding a new effective address. This mode can be used to address any memory location (Instruction or Data). Indirect This is the “normal” addressing mode. The operand is the data memory addressed by the X-pointer.Table 6: Interrupt Priority Sequence Interrupt Priority (4 highest, 1 lowest) MIW 4 Timer0 3 Timer1 2 Software 1
16 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Figure 13: ACE1101 Basic Interrupt Structure SW Int. Pend. Flags Int. Source & Priority Int. Enable Bits Global Int. Enable GIE MiWu
17 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Direct The instruction contains an 8-bit address field that directly points to the data memory for the operand. Immediate The instruction contains an 8-bit immediate field as the operand. Inherent This instruction has no operand associated with it. Absolute This mode is used with the JMP and JSR instructions, with the instruction field replacing the 10-bits in the program counter. This allows jumping to any location in the memory map. Relative This mode is used for the JP and the bit manipulation instructions, where the instruction field being added to the program counter to get the new program location. Table 7: Instruction Addressing Modes Instruction Immediate Direct Indexed Indirect Inherent Relative Absolute ADC A, # A, M A, [X] ADD A, # A, M A, [X] AND A, # A, M A, [X] OR A, # A, M A, [X] SUBC A, # A, M A, [X] XOR A, # A, M A, [X] CLR MA X INC MA X DEC MA X IFEQ A, # X, # M,# A, M A, [X] IFGT A, # X, # A, M A, [X] IFNE A, # A, M A, [X] IFLT X, # SC no-op RC no-op IFC no-op IFNC no-op INVC no-op LDC #, M STC #, M RLC MA RRC MA LD A, # X, # M, # A, M A, [00,X] A, [X] ST A, M A, [00,X] A, [X] LD M, M NOP no-op IFBIT #, A #, M SBIT #, M #, [X] RBIT #, M #, [X] JP Rel JSR M,M+1 JMP M,M+1 RET no-op RETI no-op INTR no-op
18 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Mnemonic Operand Bytes Cycles Flags affected ADC A, [X] 1 1 C,H,Z,N ADC A, M 2 2 C,H,Z,N ADC A, # 2 2 C,H,Z,N ADD A, [X] 1 1 Z,N ADD A, M 2 2 Z,N ADD A, # 2 2 Z,N AND A, [X] 1 1 Z,N AND A, # 2 2 Z,N AND A, M 2 2 Z,N CLR X 1 1 Z CLR A 1 1 Z,N,C CLR M 2 1 Z,N,C DEC A 1 1 Z,N DEC M 2 2 Z,N DEC X 1 1 Z IFBIT #, A 1 1 None IFBIT #, M 2 2 None IFC 1 1 None IFEQ A, [X] 1 1 None IFEQ A, # 2 2 None IFEQ A, M 2 2 None IFEQ M, # 3 3 None IFEQ X, # 3 3 None IFGT A, # 2 2 None IFGT A, [X] 1 1 None IFGT A, M 2 2 None IFGT X, # 3 3 None IFNE A, # 2 2 None IFNE A, [X] 1 1 None IFNE A, M 2 2 None IFLT X, # 3 3 None IFNC 1 1 None INC A 1 1 Z,N INC M 2 2 Z,N INC X 1 1 Z INTR 1 5 None INVC 1 1 C Mnemonic Operand Bytes Cycles Flags affected JMP M, M+1 3 4 None JP 1 1 None JSR M, M+1 3 5 None LD A, # 2 2 None LD A, [00,X] 2 3 None LD A, [X] 1 1 None LD A, M 2 2 None LD M, # 3 3 None LD X, # 3 3 None LDC #, M 2 2 C LD M, M 3 3 None NOP 1 1 None OR A, # 2 2 Z,N OR A, [X] 1 1 Z,N OR A, M 2 2 Z,N RBIT #, [X] 1 2 Z,N RBIT #, M 2 2 Z,N RC 1 1 C RET 1 5 None RETI 1 5 None RLC A 1 1 C,Z,N RLC M 2 2 C,Z,N RRC A 1 1 C,Z,N RRC M 2 2 C,Z,N SBIT #, [X] 1 2 Z,N SBIT #, M 2 2 Z,N SC 1 1 C ST A, [00,X] 2 3 None ST A, [X] 1 1 None ST A, M 2 2 None STC #, M 2 2 Z,N SUBC A, # 2 2 C,H,Z,N SUBC A, [X] 1 1 C,H,Z,N SUBC A, M 2 2 C,H,Z,N XOR A, # 2 2 Z,N XOR A, [X] 1 1 Z,N XOR A, M 2 2 Z,N Table 8: Instruction Cycles and Bytes
19 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
4.4 Memory Map
All I/O ports, peripheral registers and core registers, except the accumulator and the program counter are mapped into memory space. Table 9: Memory Map Address Block Contents 0x00 - 0x3F SRAM Data RAM 0x40 - 0x7F Data EEPROM Non-volatile parameters 0xAA Timer1 T1RALO register 0xAB Timer1 T1RAHI register 0xAC Timer1 TMR1LO register 0xAD Timer1 TMR1HI register 0xAE Timer1 T1CNTRL register 0xAF MIWU WKEDG register 0xB0 MIWU WKPND register 0xB1 MIWU WKEN register 0xB2 I/O PORTGD register 0xB3 I/O PORTGC register 0xB4 I/O PORTGP register 0xB5 Timer0 WDSVR register 0xB6 Timer0 T0CNTRL register 0xB7 Clock HALT mode register 0xB8 - 0xBC Reserved 0xBD LBD LBD register 0xBE Core XHI register 0xBF Core XLO register 0xC0 Core Power mode clear (PMC) register 0xCE Core SP register 0xCF Core Status register 0xC00 - 0xFF5 Code EEPROM/ROM Instruction data 0xFF6 - 0xFF7 Core Timer0 Interrupt vector 0xFF8 - 0xFF9 Core Timer1 Interrupt vector 0xFFA - 0xFFB Core MIWU Interrupt vector 0xFFC - 0xFFD Core Software Interrupt vector 0xFFE - 0xFFF Reserved
20 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
4.5 Memory
The ACE1101 device has 64 bytes of SRAM and 64 bytes of EEPROM available for data storage. The microcontroller also has a 1K byte EEPROM block for program storage. The user can read/ write to RAM and data EEPROM but cannot perform writes to the 1K byte EEPROM array which is protected from writes during normal mode operations. The instruction data in the program EEPROM array can only be rewritten when the device is in program mode and if the initialization register bit WDIS (write disable) is not set. While in normal mode, the user can write to the data EEPROM array by 1) polling the R bit of the status register, then 2) executing the appropriate write instruction. A "1" on the R bit indicates the data EEPROM block is ready to perform the next write. A "0" indicates the data EEPROM is busy. The data EEPROM array will reset the R bit on the completion of a write cycle. Attempts to read, write, or enter HALT while the data EEPROM is busy (R bit = "0") could affect the current data being written.
4.6 Initialization Registers
The ACE1101 has two 8-bit wide initialization registers. These registers are read from memory space on power-up and initializes certain on-chip peripherals. Figure 14 provides a detailed descrip- tion of Initialization Register 1. The Initialization Register 2 is used to trim the internal oscillator. This register is pre-programmed in the factory to yield a 1MHz internal clock. Both Initialization Registers 1 and 2 are read/writable in program- ming mode. However, retrimming the internal oscillator (writing to the Initialization Register 2) is discouraged. Figure 14: Initialization Register 1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 CMODE0 CMODE1 WDEN BOREN LBDEN UBD WDIS RDIS (0) RDIS If set, disables attempts to read any EEPROM contents in programming mode (1) WDIS If set, disables attempts to write any EEPROM contents in programming mode (2) UBD If set, the device will not allow writes to occur in the upper block of data EEPROM (3) LBDEN 1 enables LBD, 0 disables LBD (4) BOREN If set, allows a brown-out reset to occur if Vcc is so low that a reliable EEPROM write cannot take place (5) WDEN If set, enables the on-chip processor watchdog circuit (6) CMODE1 Clock mode select bit one (7) CMODE0 Clock mode select bit zero Note 1: If WDIS and RDIS bits are both set, the device will no longer be able to be placed into program mode. Note 2: If the RDIS or UBD bits are not set while the WDIS bit is not set, then the RDIS and UBD bits could be reset.
21 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
5.0 Timer 1
Timer1 is a versatile 16-bit timer which can operate in one of three modes:
- Pulse Width Modulatio n (PWM) mode, which generates pulses of a specified width and duty cycle
- External Event Counter mode, which counts occurrences of an external event
- Standard Input Capture mode, which measures the elapsed time between occurrences of external events Timer1 contains a 16-bit timer (counter) register, designated TMR1, and one 16-bit autoreload (capture) register, designated T1RA. These 16-bit registers are organized as a pair of 8-bit memory mapped register bytes, TMR1HI and TMR1LO, and T1RAHI and T1RALO. The timer (counter) block uses one I/O pin, designated T1, which is the alternate function of G2. The timer can be started or stopped under program control. When running, the timer counts down (decrements). Depending on the operating mode, the timer counts either instruction clock cycles or transitions on the T1 pin. Occurrences of timer underflows (tran- sitions from 0x0000 to 0xFFFF) can either generate an interrupt and/or toggle the T1 pin, also depending on the operating mode. There is one interrupt associated with the timer, designated the Timer1 interrupt. When timer interrupt is enabled, the source of the interrupt depends on the timer operating mode: either a timer underflow, or a transfer of data to or from the T1RA register. By default, the timer register is reset to FFFF and the reload register is reset to 0000.
5.1 Timer control bits
Timer1 is controlled by reading and writing to the T1CNTRL register. By programming the control bits, the user can enable or disable the timer interrupts, set the operating mode, and start or stop the timer. The control bits operate as described in Tables 10 and 11. Table 10: TIMER1 Control Register Bits T1CNTRL Register Name Function Bit 7 T1C3 Timer TIMER1 control bit 3 (see Table 9) Bit 6 T1C2 Timer TIMER1 control bit 2 (see Table 9) Bit 5 T1C1 Timer TIMER1 control bit 1 (see Table 9) Bit 4 T1C0 Timer TIMER1 run: 1 = Start timer, 0 = Stop timer; or Timer TIMER1 underflow interrupt pending flag in input capture mode Bit 3 T1PND Timer1 interrupt pending flag: 1 = Timer1 interrupt pending, 0 = Timer1 interrupt not pending Bit 2 T1EN Timer1 interrupt enable bit: 1 = Timer1 interrupt enabled, 0 = Timer1 interrupt disabled Table 11: TIMER1 Operating Modes T1 T1 T1 Timer Mode Interrupt A Timer Counts On C3 C2 C1 Source 0 0 0 MODE 2 TIMER1 Underflow T1 Pos. Edge 0 0 1 MODE 2 TIMER1 Underflow T1 Neg. Edge 1 0 1 MODE 1 T1 Toggle Autoreload T1RA Instruction Clock 1 0 0 MODE 1 No T1 Toggle Autoreload T1RA Instruction Clock 0 1 0 MODE 3 Captures: T1 Pos. edge Pos. T1 Edge Instruction Clock 0 1 1 MODE 3 Captures: T1 Neg. Edge Neg. T1 Edge Instruction Clock
22 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
5.2 Mode 1: Pulse Width Modulation Mode
In the Pulse Width Modulation (PWM) mode, the timer counts down at the instruction clock rate. When an underflow occurs, the timer register is reloaded from T1RA, and decrementing proceeds from the loaded value. At every underflow interrupt, software should load the T1RA register with the alternate PWM value. The timer can be configured to toggle the T1 output bit upon underflow. This results in the generation of a clock signal on T1 with the width and duty cycle controlled by the values stored in the T1RA. A block diagram of the timer operating in the PWM mode is shown In Figure 15. There is one interrupt associated with the timer, designated the Timer1 interrupt. The interrupt is maskable by the enable bit T1EN. T1 will generate an interrupt with every timer underflow if the timer interrupt is enabled by T1EN. The interrupt will be simultaneous with every rising and falling edge of the PWM output. Generating interrupts only on rising-, or falling edges of T1 is achievable through appropriate handling of T1EN by the user software. When an underflow occurs that causes a timer reload from T1RA, the interrupt pending flag bit T1PNDA is set. A CPU interrupt occurs if T1EN bit and the G (Global Interrupt enable) bit of the Status register is set. The interrupt service routine must reset the pending bit and perform whatever processing is necessary at the interrupt point. Timer Underflow Interrupts Instruction Clock BUS 16-bit Autoreload Register T1RA 16-bit TimerData Latch Figure 15: Pulse Width Modulation Mode The following steps can be used to operate the timer in the PWM mode. In this example, the T1 output pin is toggled with every timer underflow, and the “high” and “low” times for the T1 output can be set to different values. The T1 output can start out either high or low; the instructions below are for starting with the T1 output high. (Follow the instructions in parentheses to start the T1 output low.) 1. Configure the T1 pin as an output by setting bit 2 of PORTGC. 2. Initialize the T1 pin value to 1 (or 0) by setting (or clearing) bit 2 of PORTGD. 3. Load the PWM “high” or “low” time into the timer register. 4. Load the PWM “low” or “high” time into the T1RA register. 5. Write the appropriate value to the timer control bits T1C3- T1C2- T1C1 to select the PWM mode, and to toggle the T1 output with every timer underflow (see Table 11). 6. Set the T1C0 bit to start the timer. 7. Upon every underflow interrupt load T1RA with alternate values, ON or OFF time. If the user wishes to generate an interrupt on timer output transitions, reset the pending flags and then enable the interrupt using T1EN. The G bit must also be set. The interrupt service routine must reset the pending flag and perform whatever processing is desired.
23 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
5.3 Mode 2: External Event Counter Mode
The external event counter mode is similar to the PWM mode, except that instead of counting instruction clock pulses, the timer counts transitions received on the T1 pin (configured as an input). The T1 pin should be connected to an external device that generates a pulse for each event to be counted. The input signal on T1 must have a pulse width equal to or greater than one instruction cycle. The timer can be configured to sense either positive-going or negative-going transitions on the T1 pin. The maximum frequency at which transitions can be sensed is one-half the frequency of the instruction clock. As with the PWM mode, when an underflow occurs, the timer register is reloaded from the T1RA registers, and counting pro- ceeds downward from the loaded value. A block diagram of the timer operating in the external event counter mode is shown in Figure 16. The following steps can be used to operate the timer in the external event counter mode. 1. Configure the T1 pin as an input by clearing bit 2 of PORTGC. 2. Load the initial count into the timer register and the T1RA Timer Underflow Interrupts Edge Selector Logic BUS 16-bit Autoreload Register T1RA 16-bit Timer (Counter) Figure 16: External Event Counter Mode register. When this number of external events is detected, the counter will reach zero, however, it will not underflow until the next event is detected. To count N pulses, load the value N-1 into the registers. If it is only necessary to count the number of occurrences and no action needs to be taken at a particular count, load the value 0xFFFF into the registers. 3. In order to generate an interrupt each time the timer underflows, clear the T1PND pending flag and then enable the interrupt by setting the T1EN bit. The G bit must also be set. 4. Write the appropriate value to the timer control bits T1C3- T1C2- T1C1 to select the external event counter mode, and to select the type of transition to be sensed on the T1 pin (positive-going or negative-going; see Table 11). 5. Set the T1C0 bit register to start the timer. If interrupts are being used, the Timer1 interrupt service routine must clear the T1PND flag and take whatever action is required when the timer underflows. If the user wishes to merely count the number of occurrences of an event, and anticipates that the number of events may exceed 65,536, the interrupt service routine should record the number of underflows by incrementing a counter in memory. On each underflow, the timer (counter) register is reloaded with the value from the T1RA register.
24 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
5.4 Mode 3: Input Capture Mode
In the input capture mode, the T1 pin is configured as input. The timer counts down at the instruction clock rate. A transition received on the T1 pin causes a transfer of the timer contents to the T1RA register. The input signal on T1 must have a pulse width equal to or greater than one instruction cycle. (Refer to the AC Electrical Specifications for this device.) The values captured in the T1RA register at different times reflect the elapsed time between transitions on the T1 pin. The input pin can be configured to sense either positive-going or negative-going transitions. A block diagram of the timer operating in the input capture mode is shown in Figure 17. There are two interrupt events associated with the input capture mode: input capture in T1RA and timer underflow. If interrupts are enabled, a Timer1 interrupt is triggered by either an input capture in T1RA or a timer underflow. In this operating mode, the T1C0 control bit serves as the timer underflow interrupt pending flag. The Timer1 interrupt service routine can look at this flag and the T1PND flag to determine what caused the interrupt. A set T1C0 flag means that a timer underflow occurred, whereas a set T1PND flag means that an input capture occurred in T1RA. It is possible that both flags will be found set, meaning that both events occurred at the same time. The interrupt routine should take this possibility into consideration. Because the T1C0 bit is used as the underflow interrupt pending flag, it is not available for use as a start/stop bit as in the other modes. The timer register counts down continuously at the instruction clock rate, starting from the time that the input capture mode is selected with bits T1C3-T1C2-T1C1. To stop the timer from running, you must change from the input capture mode to the PWM or external event counter mode and reset the T1C0 bit. The input pins can be independently configured to sense positive- going or negative-going transitions, resulting in two possible input capture mode configurations. The edge sensitivity of pin T1 is controlled by bit T1C1 as indicated in Table 11. The edge sensitivity of a pin can be changed without leaving the input capture mode by setting or clearing the appropriate control bit (T1C1), even while the timer is running. This feature allows you to measure the width of a pulse received on an input pin. For example, the T1 pin can be programmed to be sensitive to a positive-going edge. When the positive edge is sensed, the timer contents are transferred to the T1RA register, and a Timer1 interrupt is generated. The Timer1 INT A INT A Instruction Clock Edge Selector Logic Internal Bus 16-bit Timer 16-bit Input Capture T1RA Figure 17: Input Capture Mode interrupt service routine records the contents of the T1RA register and also reprograms the input capture mode, changing the T1 pin from positive to negative edge sensitivity. When the negative-going edge appears on the T1 pin, another Timer1 interrupt is generated. The interrupt service routine reads the T1RA register again. The difference between the previous reading and the current reading reflects the elapsed time between the positive edge and negative edge on the T1 input pin, i.e., the width of the positive pulse. Remember that the Timer1 interrupt service routine must test the T1C0 and T1PND flags to determine what caused the interrupt. The software that measures elapsed time must take into account the possibility that an underflow occurred between the first and second readings. This can be managed by using the interrupt triggered by each underflow. The Timer1 interrupt service routine, after determining that an underflow caused the interrupt, should record the occurrence of an underflow by incrementing a counter in memory, or by some other means. The software that calculates the elapsed time should check the status of the underflow counter and take it into account in making the calculation. The following steps can be used to operate the timer in the input capture mode. 1. Configure the T1 pin as input by clearing bit 2 of PORTG2. 2. With the timer configured to operate in the PWM or external event counter mode (T1C2 equal to 0), reset the T1C0 bit. This stops the timer register from counting. 3. Load the initial count into the timer register, typically the value 0xFFFF to allow the maximum possible number of counts before underflow. 4. Clear the T1PND interrupt pending flag, then set the T1EN interrupt enable bit. The G bit should also be set. The interrupt is now enabled. 5. Write the appropriate value to the timer control bits T1C3- T1C2- T1C1 to select the input capture mode, and to select the types of transitions to be sensed on the T1 pin (positive- going or negative-going; see Table 11). As soon as the input capture mode is enabled, the timer starts counting. When the programmed type of edge is sensed on the T1 pin, the T1RA register is loaded and a Timer1 interrupt is triggered. A Timer1 interrupt is also triggered when an underflow occurs in the timer register. The interrupt service routine tests both the T1PND and T1C0 flags to determine the cause of the interrupt, resets the pending bit, and performs the required task, such as recording the T1RA register contents or incrementing an underflow counter.
25 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
6.0 Timer 0
Timer 0 is a 12-bit idle timer. Upon power up or any reset, the timer is reset to 0 and then counts up continuously based on the instruction clock of 1MHz (1 µs). Software cannot read from or write to this timer. However, software can monitor the timer's pending (T0PND) bit which is set every 8.192ms. The T0PND is set each time the timer overflows (counts up to FFFh). After an overflow, the timer will reset and restart its count up sequence. Software can either poll the T0PND bit or vector to interrupt routine. In order to interrupt on a T0PND, software will need to make sure the interrupt enable (T0INTEN) bit is set in the T0CNTRL register and also make sure the global interrupt bit (G) is set in the status register. Once the timer interrupt is serviced, software should reset the T0PND bit before exiting the routine. The Timer 0 supports the following functions: 1. Exit from IDLE mode. (See Section 17 for details.) 2. Start up delay from halt mode. 3. Watchdog prescaler. (See Section 7 for details.) The Timer 0 interrupt enable (T0INTEN) bit is a read/write bit. If set to 0, interrupt requests from the Timer 0 are ignored. If set to 1, interrupt requests are accepted. The T0INTEN bit is set to zero at reset. The T0PND (Timer 0 pending) bit is a read/write bit. If set to "1," it indicates that a Timer 0 interrupt is pending. This bit is set by a Timer 0 overflow and is reset by software or reset. The WKINTEN bit is used in the Multi-input wakeup block. (See Section 8 for details.)
7.0 Watchdog timer
The 12-bit Timer 0 is also used to clock the watchdog timer. If the WDEN bit in the initialization register is asserted, the watchdog timer must be updated at least every 65,536 cycles but no sooner than 4096 cycles since the last watchdog update. The watchdog is updated through software by writing the value 0x1bh to the WDSVR register (see Figure 19). The part will be reset automati- cally if the watchdog is updated too frequently, or not frequently enough. The WDEN bit can only be set while the device is in programming mode. Once set, the watchdog will always be powered up enabled. Software cannot disable the watchdog. The watchdog timer can be disabled in programming mode by reset- ting the WDEN bit as long as the global write protect feature is not enabled (WDIS). WARNING Ensure that the Watchdog timer has been updated before entering IDLE mode. Figure 18: Timer 0 Control Register (T0CNTRL) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 WKINTEN x x x x x T0PND T0INTEN Figure 19: Watchdog Service Register (WDSVR) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 00011011
26 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
8.0 Multi-Input Wakeup Block
There are three memory-mapped registers associated with this circuit: WKEDG (Wakeup Edge), WKEN (Wakeup Enable), and WKPND (Wakeup Pending). Each register has eight bits, with the six least significant bits corresponding to one of the input pins shown in Figure 20. All three registers are initialized to zero with a Reset. The WKEDG register establishes the edge sensitivity for each of the port input pins: either positive-going edges (0) or negative- going edges (1). The WKEN register enables (1) or disables (0) each of the port pins for the Wakeup/Interrupt function. Any pin to be used for the Wakeup/Interrupt function must also be configured as an input pin in the PORTGC configuration register. The WKPND register contains the pending flags corresponding to each of the port pins (1 for wakeup/interrupt pending, 0 for wakeup/interrupt not pending). The T0CNTRL register is the Timer0 control register; however, bit 7 (WKINTEN) is used as the wakeup interrupt enable bit (see Figure 18). By setting this bit the device can interrupt in the event of a multi-input wakeup (if the global interrupt bit is set). To use the Multi-Input Wakeup/Interrupt circuit, perform the steps listed below. Performing the steps in the order shown will prevent false triggering of a Wakeup/Interrupt condition. This same proce- dure should be used following a Reset because the Wakeup inputs will be set to high-impedence, resulting in unknown data on the port inputs. 1. Clear the WKEN register. 2. Set the WKEN bit. 3. If necessary, write to the port configuration register to change the desired port pins from outputs to inputs. 4. Write the WKEDG register to select the desired type of edge sensitivity for each of the pins used. 5. Clear the WKPND register to cancel any pending bits. 6. Set the WKEN bits associated with the pins to be used, thus enabling those pins for the Wakeup/Interrupt function. Once the Multi-Input Wakeup/Interrupt function has been set up, a transition sensed on any of the enabled pins will set the corresponding bit in the WKPND register. This brings the device out of the HALT mode (if in that mode), and also triggers a maskable interrupt if that interrupt is enabled. The interrupt service routine can read the WKPND register to determine which pin triggered the interrupt. The interrupt service routine or other software should clear the pending bit. The device will not enter the HALT mode as long as any WKPND pending bit is pending and enabled. The user has the responsibility of clearing the pending flags before attempting to enter the HALT mode. After Reset, the WKEDG register is configured to select positive- going edge sensitivity for all Wakeup inputs. If the user wishes to change the edge sensitivity of a port pin, use the following procedure to avoid false triggering of a Wakeup/Interrupt condi- tion. 1. Disable the pin by clearing the associated bit in the WKEN register. 2. Write to the associated bit of the WKEDG register selecting the new edge sensitivity of the pin. 3. Clear the WKPND bit associated with the pin. 4. Re-enable the pin by setting the associated WKEN bit. PORTG provides the user with eight fully selectable, edge sensi- tive interrupts which are all vectored into the same service subroutine. The interrupt from PORTG shares logic with the wake up circuitry. The WKEN register allows interrupts from PORTG to be individu- ally enabled or disabled. The WKEDG register specifies the trigger condition to be either a positive or a negative edge. The WKPND register latches the pending trigger conditions. Since PORTG is also used for exiting the device from the HALT mode, the user can elect to exit the HALT mode either with or without the interrupt enabled. If the user elects to disable the interrupt, then the device restarts execution from the point at which it was stopped (first instruction cycle of the instruction following the enter HALT mode instruction). In the other case, the device finishes the instruction which was being executed when the part was stopped (the NOP instruction following the enter HALT mode instruction), and then branches to the interrupt service routine. The device then reverts to normal operation. WKOUTINT Internal Data Bus WKEDG WKPND WKEN Figure 20: Multi-input Wakeup (MIWU) Block Diagram
27 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
9.0 I/O Port
The six I/O pins are bi-directional (see Figure 21) with the exception of G3 which is always an input with weak pull-up. The bi-directional I/O pins can be individually configured by software to operate as high-impedance inputs, inputs with weak pull-up, or as push-pull outputs. The operating state is determined by the contents of the corresponding bits in the data and configuration registers. Each bi-directional I/O pin can be used for general purpose I/O, or in some cases, for a specific alternate function determined by the on-chip hardware.
9.1 I/O registers
The I/O pins (G0-G5) have three memory port registers associ- ated with them: a port configuration register (PORTGC), a port data register (PORTGD), and a port input register (PORTGP). PORTGC is used to configure the pins as inputs or outputs. A pin may be configured as an input by writing a ‘0’ or as an output by writing a ‘1’ to its corresponding PORTGC bit. If a pin is configured as an output, its PORTGD bit represents the state of the pin (1 = logic high, 0 = logic low). If the pin is configured as an input, its PORTGD bit selects whether the pin is a weak pull-up or a high- impedence input. Table 12 provides details of the port configura- tion options. The port configuration and data registers are both read/writeable. Reading PORTGP returns the value of the port pins regardless of how the pins are configured. Since this device supports multi-input wakeup/interrupt, PORTG inputs have Schmitt triggers. Table 12: I/O configuration options Configuration Bit Data Bit Port Pin Configuration 0 0 High-impedence input (TRI-STATE output) 0 1 Input with pull-up (weak one output) 1 0 Push-pull zero output 1 1 Push-pull one output Figure 21: PORTG Logic Diagram Weak Pull-up Control PORTGC PORTGD PORTGP PINGX
28 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
10.0 In-circuit Programming Specification for ACE1101
The ACE1101 supports in-circuit programming of the internal data EEPROM, program EEPROM, and the initialization registers. An externally controlled four wire interface consisting of a LOAD control pin (G3), a serial data SHIFT_IN input pin (G4), a serial data SHIFT_OUT output pin (G2), and a CLOCK pin (G1) is used to access the on-chip memory locations. Communication be- tween the ACE1101 and the external programmer is made through a 32-bit command and response word described in Table 13. The serial data timing for the four wire interface is shown in Figure 23. The programming protocol is shown in Figure 22. The external programmer brings the ACE1101 into programming mode by applying a supervoltage level (V SUPERVOLTAGE) to the LOAD pin. The external programmer then needs to set the LOAD pin to 5V before shifting in the 32-bit serial command word using the SHIFT_IN and the CLOCK signals. By definition, bit 31 of the command word is shifted in first. At the same time, the ACE1101 shifts out the 32-bit serial response to the last command on the SHIFT_OUT pin. It is recommended that the external programmer samples this signal t ACCESS (850ns) after the rising edge of the CLOCK signal. The serial response word sent immediately after entering programming mode contains indeterminate data. After 32 bits have been shifted into the ACE1101, the external programmer must set the LOAD signal to 0V, and then apply two clock pulses as shown in Figure 22. When reading the device, the external programmer must set the LOAD signal to 5V before it sends a new command word. When writing to the ACE1101, the SHIFT_OUT signal acts as the READY signal. The ACE1101 sets SHIFT_OUT low by the time the programmer has sent the second rising edge during the LOAD = 0V phase (if the timing specifica- tions in Figure 22 are obeyed). The ACE1101 will set the R bit of the Status register when the write operation has completed. The external programmer must wait for the R bit to go high before bringing the LOAD signal to 5V to initiate a new command cycle. Powering down the device will cause the part to exit programming mode. Writing a series of bytes to the ACE1101 is achieved by sending a series of command words with bit 24 set to 0. Reading a series of bytes from the ACE1101 is achieved by sending a series of command words with the desired addresses in sequence and reading the following response words to verify the correct address and reading the data contents. The addresses for the data EEPROM and code EEPROM spaces are the same as those used in normal operation. Table 13: 32-Bit Command and Response Word Bit number Input command word Output response word bits 31 – 30 Must be set to 0 X bit 29 Set to 1 to read/write data EEPROM, X 0 otherwise bit 28 Set to 1 to read/write code EEPROM, X Initialization registers 0 otherwise bits 27 – 25 Must be set to 0 X bit 24 Set to 1 to read, 0 to write X bits 23 – 18 Must be set to 0 X bits 17 – 8 Address of the byte to be read or written Same as Input command word bits 7 – 0 Data to be programmed or zero if data is to be read Programmed data or data read at specified address NOTE 1: During in-circuit programming, pin 3 (G5) must be either not connected or driven high. NOTE 2: For further information, see Application Note AN-8005.
30 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
11.0 Low battery detect circuit
The Low Battery Detect (LBD) circuit sets the LBD bit in the LBD register (see Figure 24) when V CC drops below the selected threshold voltage. The threshold voltage can be adjusted from 2.4V to 3.0V ±10% using the three most significant bits of the LBD register. The LBDEN (Low Battery Detect enable) bit in the initialization register is used to enable or disable the low battery detection. The LBD bit is read only. If 0, it indicates that the V CC level is higher than the desired threshold. If set to 1, it indicates that the VCC level is below the desired threshold. The LBD circuit is disabled during HALT mode. On exiting HALT mode, the software must wait 10µs before reading the LBD bit to ensure that the circuit has stabilized. Voltage Bat_trim2 Bat_trim1 Bat_trim0 Range 0 0 0 2.9 - 3.0 0 0 1 2.8 - 2.9 0 1 0 2.7 - 2.8 0 1 1 2.6 - 2.7 1 0 0 2.5 - 2.6 1 0 1 2.4 - 2.5
12.0 Brown-out detection circuit
The Brown-out detect circuit is used to reset the device when Vcc falls below a 2.0V threshold. Once V CC rises above the 2.0V threshold, a reset sequence will be generated. The Brown-out Reset enable (BOREN) bit in the initialization register is used to enable or disable the brown-out detection. This bit must be set after the device has been programmed. Brown-out is not supported on 2.2/2.7V devices.
13.0 RESET block
When a RESET sequence is initiated, all I/O registers will be reset, setting all I/Os to high impedence inputs. The system clock is restarted after the required clock start-up delay. A reset is gener- ated by any one of the following three conditions: I Power-on RESET (as described in Section 14) I Brown-out RESET (as described in Section 12) I Watchdog RESET (as described in Section 7)
14.0 Power-on Reset
The Power-on RESET circuit is guaranteed to work if the rate of rise of VDD is no slower than 10ms/1 volt. It is also necessary that VDD starts from 0V.
15.0 CLOCK
The ACE1101 has an on-board oscillator trimmed to a frequency of 2MHz, yielding a 1MHz frequency and a tolerance over tem- perature, voltage, and device of ±10%. Upon power-up, the on- chip oscillator runs continuously unless entering HALT mode. If required, an external oscillator circuit may be used depending on the states of the CMODE bits. (See Table 14.) When the device is driven using an external clock, the clock input to the device (G1/ CKI) can range between DC to 4MHz. For crystal configuration, the output clock (CKO) is on the G0 pin. If an external crystal or external RC is used, it will be internally divided by four (input frequency/4) to yield an instruction clock cycle time of the corre- sponding input frequency. If the device is configured for an external square clock, it will not be divided. See Figure 26. Table 14: CMODEx Bit Definition CMODE1 CMODE0 Clock Type 0 0 Internal 1 MHz clock 0 1 External square clock 1 0 External crystal/resonator 1 1 External RC clock Figure 24: LBD Register Definition Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bat_trim2 Bat_trim1 Bat_trim0 undefined undefined Undefined undefined LBD Figure 25: HALT Register Definition Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 undefined undefined undefined undefined undefined undefined EIDLE EHALT
31 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications 33pF 33pF CKI (G1) CKO (G0) C VCC R CKI (G1) CKO (G0) Figure 26: Crystal (a) and RC (b) Oscillator Diagrams
16.0 HALT Mode
The ACE1101 is placed into HALT by setting bit 0 of the HALT mode register using the LD M, # instruction. The HALT enable bit (Bit 0) is a write only bit and is automatically cleared on exiting halt. Upon entering HALT, the internal oscillator, as well as all on-chip systems, including Low battery detect and Brown out circuits, are shut down. Prior to entering HALT, software should set the appropriate wake-up I/O configuration. The device can only be brought out of HALT by multi-input wake up. After wake up from HALT, a 1ms startup delay is initiated to allow the internal oscillator to stabilize before normal execution resumes. Immediately after exiting HALT, software must clear the Power mode clear register also using a LD M, # instruction. See Figure 27 below.
17.0 IDLE Mode
In addition to HALT, the ACE1101 supports IDLE mode operation. The IDLE mode is similar to HALT, except the internal oscillator, Watchdog, and Timer0 remain active. Figure 28 shows the proper sequence for software to initiate and recover from IDLE. The ACE1101 is forced into IDLE by writing to bit 1 of the HALT mode register using the LD M, # instruction. The idle enable bit (bit 1) is a write only bit and is automatically cleared on exiting IDLE. The microcontroller resumes normal operation from the IDLE mode when the T0PND bit (representing 8.192ms at an internal clock frequency of 1MHz, tc = 1µs) of the IDLE timer is set. The user has the option to interrupt after IDLE. In order to interrupt after idle, software will need to make sure the interrupt enable (T0INTEN) bit is set in the T0CNTRL register and also make sure the global interrupt bit (G) is set in the status register. Once the interrupt is serviced, software should reset the T0PND bit before exiting the routine. Immediately after coming out of IDLE, software must clear the Power mode clear register by also using a LD M, # instruction. Figure 27: Recommended HALT Flow Figure 28: Recommended IDLE Flow Normal Mode Halt Resume Normal Mode LD HALT, #01h LD PMC, #00h Multi-Input Wakeup Normal Mode IDLE Resume Normal Mode LD HALT, #02h LD PMC, #00h
32 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications
Ordering Information
ACE 11 01 X E MT8 X Letter Description X Tape and Reel Temp. Range None 0 to 70 °C E -40 to +85 °C V -40 to +125 °C Operating Voltage Range None 2.2V - 5.5V B 2.7V - 5.5V L 2.0V - 5.5V Density 01 1K Code EEPROM 11 8-bit Microcontroller Core Type ACE Arithmetic Controller Engine
33 www.fairchildsemi.com ACE1101 Rev. C.8 ACE1101 Arithmetic Controller Engine (ACEx™) for Low Power Applications Fairchild does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and Fairchild reserves the right at any time without notice to change said circuitry and specifications. Life Support Policy Fairchild's products are not authorized for use as critical components in life support devices or systems without the express w ritten approval of the President of Fairchild Semiconductor Corporation. As used herein: 1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and whose failure to perform, when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury to the user. 2. A critical component is any component of a life support device or system whose failure to perform can be reasonably ex- pected to cause the failure of the life support device or system, or to affect its safety or effectiveness. Fairchild Semiconductor Fairchild Semiconductor Fairchild Semiconductor Fairchild Semiconductor Americas Europe Hong Kong Japan Ltd. Customer Response Center Fax: +44 (0) 1793-856858 8/F, Room 808, Empire Centre 4F, Natsume Bldg. Tel. 1-888-522-5372 Deutsch Tel: +49 (0) 8141-6102-0 68 Mody Road, Tsimshatsui East 2-18-6, Yushima, Bunkyo-ku English Tel: +44 (0) 1793-856856 Kowloon. Hong Kong Tokyo, 113-0034 Japan Franç ais Tel: +33 (0) 1-6930-3696 Tel; +852-2722-8338 Tel: 81-3-3818-8840 Italiano Tel: +39 (0) 2-249111-1 Fax: +852-2722-8383 Fax: 81-3-3818-8841 8-Pin Molded TSSOP (MT8) Order Number ACE1101MT8/ACE1101EMT8/ACE1101VMT8 0.114 - 0.122 (2.90 - 3.10) 0.123 - 0.128 (3.13 - 3.30) 0.246 - 0.256 (6.25 - 6.5) 0.169 - 0.177 (4.30 - 4.50) (7.72) Typ(4.16) Typ (1.78) Typ (0.42) Typ (0.65) Typ 0.002 - 0.006 (0.05 - 0.15) 0.0256 (0.65) Typ. 0.0433 (1.1) Max 0.0075 - 0.0098 (0.19 - 0.30) Pin #1 IDENT 0.0035 - 0.0079 0°-8° 0.020 - 0.028 (0.50 - 0.70) 0.0075 - 0.0098 (0.19 - 0.25)Seating plane Gage plane See detail A Notes: Unless otherwise specified 1. Reference JEDEC registration MO153. Variation AA. Dated 7/93 Land pattern recommendation DETAIL A Typ. Scale: 40X Physical Dimensions inches (millimeters) unless otherwise noted