cop8fg National Semiconductor Corporation, cop8fg Datasheet

no-image

cop8fg

Manufacturer Part Number
cop8fg
Description
8-bit Cmos Rom Based And Otp Microcontrollers With 8k To 32k Memory, Two Comparators And Usart
Manufacturer
National Semiconductor Corporation
Datasheet
© 1999 National Semiconductor Corporation
COP8FG Family
8-Bit CMOS ROM Based and OTP Microcontrollers with
8k to 32k Memory, Two Comparators and USART
General Description
Note: COP8FG devices are 15 MHz versions of the
COP8SG devices.
The COP8FGx5 Family ROM based microcontrollers are
highly integrated COP8
32k memory and advanced features including Analog com-
parators, and zero external components. These single-chip
CMOS devices are suited for more complex applications re-
quiring a full featured controller with larger memory, low EMI,
two comparators, and a full-duplex USART. COP8FGx7 de-
vices are 100% form-fit-function compatible 8k or 32k OTP
(One Time Programmable) versions for use in production or
development.
Key Features
n Low cost 8-bit microcontroller
n Quiet Design (low radiated emissions)
n Multi-Input Wakeup pins with optional interrupts (8 pins)
n Mask selectable clock options
n Internal Power-On-Reset — user selectable
n WATCHDOG and Clock Monitor Logic — user selectable
n Eight high current outputs
n 256 or 512 bytes on-board RAM
n 8k to 32k ROM or OTP EPROM with security feature
CPU Features
n Versatile easy to use instruction set
n 0.67 µs instruction cycle time
n Fourteen multi-source vectored interrupts servicing
COP8
TRI-STATE
iceMASTER
COP8FGR7-Q3
— Crystal oscillator
— Crystal oscillator option with on-chip bias resistor
— External oscillator
— Internal R/C oscillator
— External interrupt / Timers T0 — T3
— MICROWIRE/PLUS Serial Interface
— Multi-Input Wake Up
COP8FGE5
COP8FGG5
COP8FGH5
COP8FGK5
COP8FGR5
COP8FGE7
COP8FGR7
Device
, MICROWIRE/PLUS
®
®
is a registered trademark of National Semiconductor Corporation.
is a registered trademark of MetaLink Corporation.
32k OTP EPROM
Memory (bytes)
8k OTP EPROM
, and WATCHDOG
32k EPROM
16k ROM
20k ROM
24k ROM
32k ROM
8k ROM
Feature core devices with 8k to
are trademarks of National Semiconductor Corporation.
DS101116
(bytes)
RAM
256
512
512
512
512
256
512
512
24/36/40
24/36/40
24/36/40
24/36/40
24/36/40
24/36/40
24/36/40
24/36/40
I/O Pins
Erasable windowed versions are available for use with a
range of COP8 software and hardware development tools.
Family features include an 8-bit memory mapped architec-
ture, 15 MHz CKI with 0.67 µs instruction cycle, 14 inter-
rupts, three multi-function 16-bit timer/counters with PWM,
full duplex USART, MICROWIRE/PLUS
parators, two power saving HALT/IDLE modes, MIWU, idle
timer, on-chip R/C oscillator, high current outputs, user se-
lectable options (WATCHDOG
power-on-reset), 4.5V to 5.5V operation, program code se-
curity, and 28/40/44 pin packages.
Devices included in this datasheet are:
n 8-bit Stack Pointer SP (stack in RAM)
n Two 8-bit Register Indirect Data Memory Pointers
n True bit manipulation
n BCD arithmetic instructions
Peripheral Features
n Multi-Input Wakeup Logic
n Three 16-bit timers (T1 — T3), each with two 16-bit
n Idle Timer (T0)
n MICROWIRE/PLUS Serial Interface (SPI Compatible)
n Full Duplex USART
n Two Analog Comparators
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
28 DIP/SOIC, 40 DIP, 44 PLCC/QFP
— Software Trap
— USART (2; 1 receive and 1 transmit)
— Default VIS (default interrupt)
registers supporting:
— Processor Independent PWM mode
— External Event Counter mode
— Input Capture mode
Packages
, 4 clock/oscillator modes,
, two analog com-
Temperature
Room Temp.
-40 to +85˚C
-40 to +85˚C
-40 to +85˚C
-40 to +85˚C
-40 to +85˚C
-40 to +85˚C
-40 to +85˚C
www.national.com
July 1999

Related parts for cop8fg

cop8fg Summary of contents

Page 1

... COP8FG Family 8-Bit CMOS ROM Based and OTP Microcontrollers with 8k to 32k Memory, Two Comparators and USART General Description Note: COP8FG devices are 15 MHz versions of the COP8SG devices. The COP8FGx5 Family ROM based microcontrollers are highly integrated COP8 Feature core devices with 8k to ™ ...

Page 2

... Low current drain (typically ® n Two power saving modes: HALT and IDLE Temperature Range n −40˚C to +85˚C Development Support n Windowed packages for DIP and PLCC n Real time emulation and full program debug offered by MetaLink Development System FIGURE 1. COP8FGx Block Diagram 2 < 4 µA) DS101116-44 ...

Page 3

... EXCHANGE). And 15 memory-maped registers allow de- signers to optimize the precise implementation of certain specific instructions. 1.3 EMI REDUCTION The COP8FGx5 family of devices incorporates circuitry that guards against electromagnetic interference — an increasing problem in today’s microcontroller board designs. National’s patented EMI reduction technology offers low EMI clock cir- ...

Page 4

... Top View Order Number COP8FGXY44V8 See NS Package Number V44A Order Number COP8FGR744J3 See NS Package Number EL44C www.national.com Top View Order Number COP8FGXY40N8 See NS Package Number N40A Order Number COP8FGR540Q3 See NS Package Number D40KQ DS101116-6 Top View Order Number COP8FGXYVEJ8 See NS Package Number VEJ44A FIGURE 2 ...

Page 5

Connection Diagrams (Continued) Pinouts for 28 -, 40- and 44-Pin Packages Port Type Alt. Fun L0 I/O MIWU L1 I/O MIWU or CKX L2 I/O MIWU or TDX L3 I/O MIWU or RDX L4 I/O MIWU or T2A L5 I/O ...

Page 6

Ordering Information www.national.com FIGURE 3. Part Numbering Scheme 6 DS101116-8 ...

Page 7

Electrical Characteristics Absolute Maximum Ratings If Military/Aerospace specified devices are required, please contact the National Semiconductor Sales Office/ Distributors for availability and specifications. Supply Voltage ( Voltage at Any Pin −0. Total Current into V ...

Page 8

DC Electrical Characteristics −40˚C T +85˚C unless otherwise specified. A Parameter Maximum Input Current without Latchup (Note 7) RAM Retention Voltage Rise Time from Input Capacitance Load Capacitance Electrical Characteristics ...

Page 9

Comparators AC and DC Characteristics V = 5V, −40˚C T +85˚ Parameter Input Offset Voltage (Note 12) Input Common Mode Voltage Range Voltage Gain Low Level Output Current High Level Output Current DC Supply Current per Comparator (When ...

Page 10

Typical Performance Characteristics www.national.com = 25˚C (unless otherwise specified DS101116-49 DS101116-51 10 DS101116-50 DS101116-52 ...

Page 11

... Pin Descriptions The COP8FGx I/O structure enables designers to reconfig- ure the microcontroller’s I/O functions with a single instruc- tion. Each individual I/O pin can be independently configured as output pin low, output high, input with high impedance or input with weak pull-up device. A typical example is the use of I/O pins as the keyboard matrix input lines ...

Page 12

... Port F input pins (address xx96 recommended new applications which will go to production with the COP8FGx use the Port F addresses. Note that compatible ROM devices contains the input only Port I instead of the bi-directional Port F ...

Page 13

Functional Description memory mapped; therefore, I/O bits and register bits can be directly and individually set, reset and tested. The accumula- tor (A) bits can also be directly and individually tested. Note: RAM contents are undefined upon power-up. 5.4 ...

Page 14

... Functional Description Memory address ranges 0200 to 027F and 0300 to 037F are unavailable on the COP8FGx5 and, if read, will return under- fined data. 5.5 ECON (CONFIGURATION) REGISTER For compatibility with COP8FGx7 devices, mask options are defined by an ECON Configuration Register which is pro- grammed at the same time as the program code. Therefore, the register is programmed at the same time as the program memory ...

Page 15

Functional Description RAM: UNAFFECTED after RESET with power already applied RANDOM after RESET at power-on USART: PSR, ENU, ENUR, ENUI: Cleared except the TBMT bit which is set to one. COMPARATORS: CMPSL; CLEARED WATCHDOG (if enabled): The device comes ...

Page 16

Functional Description 5.8 OSCILLATOR CIRCUITS There are four clock oscillator options available: Crystal Os- cillator with or without on-chip bias resistor, R/C Oscillator with on-chip resistor and capacitor, and External Oscillator. The oscillator feature is selected by programming the ...

Page 17

Functional Description DS101116-20 For operation at lower than maximum R/C oscillator frequency. (Continued) DS101116-19 FIGURE 14. External Oscillator For operation at maximum R/C oscillator frequency. FIGURE 15. R/C Oscillator 17 DS101116-21 www.national.com ...

Page 18

Functional Description 5.9 CONTROL REGISTERS CNTRL Register (Address X'00EE) T1C3 T1C2 T1C1 T1C0 MSEL IEDG Bit 7 The Timer1 (T1) and MICROWIRE/PLUS control register contains the following bits: T1C3 Timer T1 mode control bit T1C2 Timer T1 mode control ...

Page 19

Timers (Continued) • Timing the width of the internal power-on-reset The IDLE Timer T0 can generate an interrupt when the twelfth bit toggles. This toggle is latched into the T0PND pending flag, and will occur every 2.731 ms at ...

Page 20

Timers (Continued) In this mode the input pin TxB can be used as an indepen- dent positive edge sensitive interrupt input if the TxENB con- trol flag is set. The occurrence of a positive edge on the TxB input ...

Page 21

Timers (Continued) 6.3 TIMER CONTROL FLAGS The control bits and their functions are summarized below. TxC3 Timer mode control TxC2 Timer mode control TxC1 Timer mode control TxC0 Timer Start/Stop control in Modes 1 and 2 (Pro- cessor Independent ...

Page 22

Power Saving Features Today, the proliferation of battery-operated based applica- tions has placed new demands on designers to drive power consumption down. Battery-operated systems are not the only type of applications demanding low power. The power budget constraints are ...

Page 23

Power Saving Features 7.2 IDLE MODE The device is placed in the IDLE mode by writing a “1” to the IDLE flag (G6 data bit). In this mode, all activities, except the associated on-board oscillator circuitry and the IDLE ...

Page 24

Power Saving Features 7.3 MULTI-INPUT WAKEUP The Multi-Input Wakeup feature is used to return (wakeup) the device from either the HALT or IDLE modes. Alternately Multi-Input Wakeup/Interrupt feature may also be used to generate edge selectable ...

Page 25

USART Each device contains a full-duplex software programmable USART. The USART ( Figure 22 ) consists of a transmit shift register, a receive shift register and seven addressable reg- isters, as follows: a transmit buffer register (TBUF), a re- ...

Page 26

USART (Continued) 8.1 USART CONTROL AND STATUS REGISTERS The operation of the USART is programmed through three registers: ENU, ENUR and ENUI. 8.2 DESCRIPTION OF USART REGISTER BITS ENU-USART Control and Status Register (Address at 0BA) PEN PSEL1 XBIT9/ ...

Page 27

USART (Continued) ETI: This bit enables/disables interrupt from the transmitter section. Read/Write, cleared on reset. ETI = 0 Interrupt from the transmitter is disabled. ETI = 1 Interrupt from the transmitter is enabled. 8.3 Associated I/O Pins Data is ...

Page 28

USART (Continued) 8.6 USART INTERRUPTS The USART is capable of generating interrupts. Interrupts are generated on Receive Buffer Full and Transmit Buffer Empty. Both interrupts have individual interrupt vectors. Two bytes of program memory space are reserved for each ...

Page 29

USART (Continued) FIGURE 24. USART BAUD Clock Generation FIGURE 25. USART BAUD Clock Divisor Registers TABLE 4. Baud Rate Divisors (1.8432 MHz Prescaler Output) Baud Baud Rate Rate Divisor − 1 (N-1) 110 1046 (110.03) 134.5 855 (134.58) 150 ...

Page 30

USART (Continued example, considering Asynchronous Mode and a CKI clock of 4.608 MHz, the prescaler factor selected is: 4.608/1.8432 = 2.5 The 2.5 entry is available in Table 5 . The 1.8432 MHz pres- caler output is ...

Page 31

Comparators The device contains two differential comparators, each with a pair of inputs (positive and negative) and an output. Ports F1–F3 and F4–F6 are used for the comparators. The follow- ing is the Port F assignment: F6 Comparator2 output ...

Page 32

Interrupts (Continued) 10.2 MASKABLE INTERRUPTS All interrupts other than the Software Trap are maskable. Each maskable interrupt has an associated enable bit and pending flag bit. The pending bit is set to 1 when the interrupt condition occurs. The ...

Page 33

Interrupts (Continued) ample, if the Software Trap routine is located at 0310 Hex, then the vector location 0yFE and -0yFF should contain the data 03 and 10 Hex, respectively. When a Software Trap in- terrupt occurs and the VIS ...

Page 34

Interrupts (Continued) 10.3.1 VIS Execution When the VIS instruction is executed it activates the arbitra- tion logic. The arbitration logic generates an even number between E0 and FE (E0, E2, E4, E6 etc...) depending on which active interrupt has ...

Page 35

Interrupts (Continued) DS101116-30 FIGURE 28. VIS Flowchart 35 www.national.com ...

Page 36

Interrupts (Continued) Programming Example: External Interrupt PSW =00EF CNTRL =00EE RBIT 0,PORTGC RBIT 0,PORTGD SBIT IEDG, CNTRL SBIT EXEN, PSW SBIT GIE, PSW WAIT: JP WAIT . . . .=0FF VIS . . . .=01FA .ADDRW SERVICE . . ...

Page 37

Interrupts (Continued) 10.4 NON-MASKABLE INTERRUPT 10.4.1 Pending Flag There is a pending flag bit associated with the non-maskable interrupt, called STPND. This pending flag is not memory- mapped and cannot be accessed directly by the software. The pending flag ...

Page 38

WATCHDOG/Clock Monitor Each device contains a user selectable WATCHDOG and clock monitor. The following section is applicable only if WATCHDOG feature has been selected in the ECON regis- ter. The WATCHDOG is designed to detect the user program getting ...

Page 39

WATCHDOG/Clock Monitor TABLE 9. WATCHDOG Service Actions Key Window Data Data Match Match Don’t Care Mismatch Mismatch Don’t Care Don’t Care Don’t Care 11.3 WATCHDOG AND CLOCK MONITOR SUMMARY The following salient points regarding the WATCHDOG and CLOCK MONITOR ...

Page 40

MICROWIRE/PLUS MICROWIRE/PLUS is a serial SPI compatible synchronous communications interface. The MICROWIRE/PLUS capabil- ity enables the device to interface with MICROWIRE/PLUS or SPI peripherals (i.e. A/D converters, display drivers, EE- PROMs etc.) and with other microcontrollers which support the ...

Page 41

MICROWIRE/PLUS (Continued) 12.1.2 MICROWIRE/PLUS Slave Mode Operation In the MICROWIRE/PLUS Slave mode of operation the SK clock is generated by an external source. Setting the MSEL bit in the CNTRL register enables the SO and SK functions onto the ...

Page 42

MICROWIRE/PLUS FIGURE 32. MICROWIRE/PLUS SPI Mode Interface Timing, Alternate SK Mode, SK Idle Phase being High FIGURE 33. MICROWIRE/PLUS SPI Mode Interface Timing, Normal SK Mode, SK Idle Phase being High www.national.com (Continued) 42 DS101116-35 DS101116-31 ...

Page 43

... COP8FGE) 0300–037F On-Chip 128 RAM Bytes (Reads as undefined data on COP8FGE) Note: Reading memory locations 0070H–007FH (Segment 0) will return all ones. Reading unused memory locations 0080H–0093H (Segment 0) will return undefined data. Reading memory locations from other Seg- ments (i.e., Segment 4, Segment 5, … ...

Page 44

Instruction Set 14.1 INTRODUCTION This section defines the instruction set of the COPSAx7 Family members. It contains information about the instruc- tion set features, addressing modes and types. 14.2 INSTRUCTION FEATURES The strength of the instruction set is based ...

Page 45

Instruction Set (Continued) Example: Load Accumulator Immediate Reg/Data Contents Memory Before Accumulator XX Hex Immediate Short. This is a special case of an immediate in- struction. In the “Load B immediate” instruction, the 4-bit im- ...

Page 46

Instruction Set (Continued) Jump Indirect. In this 1-byte instruction, the lower byte of the jump address is obtained from a table stored in program memory, with the Accumulator serving as the low order byte of a pointer into program ...

Page 47

Instruction Set (Continued) 14.4.9 No-Operation Instruction The no-operation instruction does nothing, except to occupy space in the program memory and time in execution. No-Operation (NOP) Note: The VIS is a special case of the Indirect Transfer of Control addressing ...

Page 48

Instruction Set (Continued) ± LoaD A with Memory [B] ± LoaD A with Memory [X] ± ],Imm LoaD Memory [B] Immed. CLR A CLeaR A INC A INCrement A ...

Page 49

Instruction Set (Continued) 14.7 INSTRUCTION EXECUTION TIME Most instructions are single byte (with immediate addressing mode instructions taking two bytes). Most single byte instructions take one cycle time to execute. Skipped instructions require x number of cycles to be ...

Page 50

Instruction Set (Continued) www.national.com Nibble Lower 50 ...

Page 51

Mask Options See Section 5.5 ECON (CONFIGURATION) REGISTER. 16.0 Development Support 16.1 OVERVIEW National is engaged with an international community of inde- pendent 3rd party vendors who provide hardware and soft- ware development tool support. Through National’s interac- tion ...

Page 52

... COP8SGx devices, and the existing SGx tools can be used without updating or modification (just use the SGx menus). The COP8SG-DM and IM-COP8/400 ICE can be used for emulation with the limitation of 10 MHz emulation speed maximum. For full speed COP8FGx emulation, use the 15 MHz COP8FG-DM. Cost Free ...

Page 53

Development Support MetaLink COP8-EPU EPU-COP8SG COP8-DM DM5-COP8-FGx (15 MHz) or DM4-COP8-SGx (10 MHz), plus PS-10, plus DM-COP8/xxx (ie. 28D) DM Target MHW-CNVxx (xx = 33, 34 Adapters etc.) OTP MHW-COP8-PGMA-DS Programming Adapters MHW-COP8-PGMA-44QFP L MHW-COP8-PGMA-28CSP L IM-COP8 IM-COP8-AD-464 (-220) ...

Page 54

Development Support 16.4 WHERE TO GET TOOLS Tools are ordered directly from the following vendors. Please go to the vendor’s web site for current listings of distributors. Vendor Home Office Aisys U.S.A.: Santa Clara, CA 1-408-327-8820 fax: 1-408-327-8830 Byte ...

Page 55

... Physical Dimensions inches (millimeters) unless otherwise noted Molded SO Wide Body Package (WM) Order Number COP8FGx528Mx, NS Package Number M28B Molded Dual-In-Line Package (N) Order Number COP8SGx728Nx NS Package Number N28A 55 www.national.com ...

Page 56

... Physical Dimensions inches (millimeters) unless otherwise noted (Continued) www.national.com Molded Dual-In-Line Package (N) Order Number COP8FGx540Nx NS Package Number N40A 56 ...

Page 57

Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 44-Lead EPROM Leaded Chip Carrier (EL) Order Number COP8SGR744J3 NS Package Number EL44C 57 www.national.com ...

Page 58

... Physical Dimensions inches (millimeters) unless otherwise noted (Continued) www.national.com Molded Dual-In-Line Package (N) Order Number COP8FGx544Vx NS Package Number V44A Plastic Quad Flat Package (VEJ) Order Number COP8FGx544VEJx NS Package Number VEJ44A 58 ...

Page 59

... NATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF NATIONAL SEMICONDUCTOR CORPORATION. As used herein: 1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant ...

Related keywords