![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
tsc 80251a1 matra mhs tsc 80251a1 extended 8bit microcontroller with analog interfaces datasheet 1996
tsc 80251a1 rev. b (20/09/96) matra mhs general introduction extended 8bit microcontroller with analog interfaces 1. . . . . . . . . . . . . . . . . . section i: introduction to tsc80251a1 chapter 1: core features i. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: product features i. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: block diagram i. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: pin description i. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section ii: design information chapter 1: configuration and memory mapping ii. 1.1 . . . . . . . . . . . . . . . . . . 1.1. introduction ii. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2. configuration ii. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1. page mode and wait states ii. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2. external memory signals ii. 1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3. memory mapping ii. 1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1. configuration bytes ii. 1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2. program/code memory ii. 1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.3. data memory ii. 1.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table of contents tsc 80251a1 rev. b (20/09/96) matra mhs 1.3.4. special function registers ii. 1.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: parallel i/o ports ii. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1. introduction ii. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2. i/o configurations ii. 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3. port 1 and port 3 ii. 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4. port 0 and port 2 ii. 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5. readmodifywrite instructions ii. 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6. quasibidirectional port operation ii. 2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7. port loading ii. 2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8. external memory access ii. 2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: timers/counters ii. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1. introduction ii. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2. timer/counter operations ii. 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3. timer 0 ii. 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1. mode 0 (13bit timer) ii. 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2. mode 1 (16bit timer) ii. 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3. mode 2 (8bit timer with autoreload) ii. 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4. mode 3 (two 8bit timers) ii. 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4. timer 1 ii. 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1. mode 0 (13bit timer) ii. 3.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2. mode 1 (16bit timer) ii. 3.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3. mode 2 (8bit timer with autoreload) ii. 3.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4. mode 3 (halt) ii. 3.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5. registers ii. 3.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: serial i/o port ii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1. introduction ii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs 4.2. modes of operation ii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3. synchronous mode (mode 0) ii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1. transmission (mode 0) ii. 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2. reception (mode 0) ii. 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4. asynchronous modes (modes 1, 2 and 3) ii. 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1. transmission (modes 1, 2 and 3) ii. 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2. reception (modes 1, 2 and 3) ii. 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5. framing bit error detection (modes 1, 2 and 3) ii. 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6. overrun error detection (modes 1, 2 and 3) ii. 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7. multiprocessor communication (modes 2 and 3) ii. 4.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8. automatic address recognition ii. 4.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.1. given address ii. 4.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.2. broadcast address ii. 4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8.3. reset addresses ii. 4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9. baud rates ii. 4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.1. internal baud rate generator ii. 4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.2. baud rate for mode 0 ii. 4.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.3. transmission clock selection ii. 4.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.4. baud rate for modes 1 and 3 ii. 4.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9.5. baud rate for mode 2 ii. 4.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10. registers ii. 4.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 5: pulse measurement unit ii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1. introduction ii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2. description ii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3. registers ii. 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 6: event and waveform controller ii. 6.1 . . . . . . . . . . . . . . . . . . . . . . . 6.1. introduction ii. 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2. features ii. 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3. pca mode ii. 6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs 6.3.1. timers/counters ii. 6.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.2. compare/capture modules ii. 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4. enhanced pca mode ii. 6.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1. timers/counters ii. 6.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5. registers ii. 6.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 7: 8-bit analog to digital converter ii. 7.1 . . . . . . . . . . . . . . . . . . . . . . 7.1. introduction ii. 7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2. description ii. 7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3. registers ii. 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 8: monitoring and power management ii. 8.1 . . . . . . . . . . . . . . . . . . . 8.1. introduction ii. 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2. poweron/off reset ii. 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3. powerfail detector ii. 8.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4. poweroff flag ii. 8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5. clock prescaler ii. 8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6. idle mode ii. 8.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6.1 entering idle mode ii. 8.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.6.2 exiting idle mode ii. 8.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7. powerdown mode ii. 8.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.1 entering powerdown mode ii. 8.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7.2 exiting powerdown mode ii. 8.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.8. registers ii. 8.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 9: interrupt system ii. 9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1. introduction ii. 9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2. interrupt system priorities ii. 9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs 9.3. external interrupts ii. 9.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4. registers ii. 9.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section iii: electrical and mechanical information chapter 1: dc characteristics iii. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: ac characteristics iii. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: adc characteristics iii. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: eprom programming iii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1. programming modes iii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2. verify algorithm iii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 5: tsc80c251a1: packages iii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1. plcc 44 iii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1. mechanical outline iii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2. pin assignment iii. 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2. cqpj 44 with window iii. 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1. mechanical outline iii. 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2. pin assignment iii. 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3. tqfp 44 iii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1. mechanical outline iii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.2. pin assignment iii. 5.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs section iv: ordering information ordering information iv. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section v: temic addresses sales offices addresses v. so.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . representatives addresses v. rep.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . distributors addresses v. dist.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs section i: introduction to tsc80251a1 chapter 3: block diagram figure 3.1. tsc80251a1 block diagram i. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: pin description figure 4.1. tsc80251a1 pin description i. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section ii: design information chapter 1: configuration and memory mapping figure 1.1. bus structure in nonpage mode and page mode ii. 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.2. external bus cycle: code fetch, nonpage mode ii. 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.3. external bus cycle: code fetch, page mode ii. 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.4. external bus cycle: code fetch with one rd#/psen# wait state in nonpage mode ii. 1.3 . . . . . . . . . . . . . figure 1.5. internal/external memory segments (rd1:0 = 00) ii. 1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.6. internal/external memory segments (rd1:0 = 01) ii. 1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.7. internal/external memory segments (rd1:0 = 10) ii. 1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.8. internal/external memory segments (rd1:0 = 11) ii. 1.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.9. programmable memory mapping ii. 1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.10. data memory mapping ii. 1.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.11. configuration byte 0 ii. 1.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.12. configuration byte 1 ii. 1.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: parallel i/o ports figure 2.1. port 1 and port 3 structure ii. 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.2. port 0 structure ii. 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.3. port 2 structure ii. 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.4. internal pullup configurations ii. 2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: timers/counters figure 3.1. timer/counter x (x = 0 or 1) in mode 0 and mode 1 ii. 3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 3.2. timer/counter x (x = 0 or 1) in mode 1 ii. 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 3.3. timer/counter x (x = 0 or 1) in mode 2 ii. 3.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 3.4. timer/counter in mode 3 : two 8-bit counters ii. 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . list of figures tsc 80251a1 rev. b (20/09/96) matra mhs figure 3.5. tcon register ii. 3.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 3.6. tmod register ii. 3.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: serial i/o port figure 4.1. serial port block diagram ii. 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.2. mode 0 timings ii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.3. data frames (modes 1, 2 and 3) ii. 4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.4. overrun error (modes 1, 2 and 3) ii. 4.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.5. clock transmission sources in mode 0 ii. 4.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.6. timer 1 as baud rate generator in modes 1 and 3 ii. 4.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.7. internal baud rate generator in modes 1 and 3 ii. 4.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.8. baud rate generator selection ii. 4.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.9. uart in mode 2 ii. 4.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.10. bdrcon register ii. 4.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.11. brl register ii. 4.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.12. saddr register ii. 4.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.13. saden register ii. 4.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.14. sbuf register ii. 4.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.15. scon register ii. 4.14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 5: pulse measurement unit figure 5.1. pmu block diagram ii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.2. pmu module n (n = 0, 1, 2) ii. 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.3. pmu measurement ii. 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.4. pulse measurement polarity ii. 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.5. pmcon register ii. 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.6. pmper0 register ii. 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.7. pmper1 register ii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.8. pmper2 register ii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.9. pmscal0 register ii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.10. pmscal1 register ii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.11. pmscal2 register ii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.12. pmstat register ii. 5.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.13. pmu register ii. 5.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.14. pmwid0 register ii. 5.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.15. pmwid1 register ii. 5.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.16. pmwid2 register ii. 5.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 6: event and waveform controller tsc 80251a1 rev. b (20/09/96) matra mhs figure 6.1. ewc timer/counter in pca mode ii. 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.2. pca 16bit capture mode ii. 6.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.3. pca software timer and highspeed output modes ii. 6.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.4. pca watchdog timer mode ii. 6.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.5. pwm mode ii. 6.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.6. pwm variable duty cycle ii. 6.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 6.7. ewc timer/counter in epca mode ii. 6.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 7: 8bit analog to digital converter figure 7.1. analog digital converter structure ii. 7.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 7.2. adat register ii. 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 7.3. adcon register ii. 7.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 8: power monitoring and management figure 8.1. behavior of the reset when the power supply is switched on ii. 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.2. behavior of the reset when the power supply is switched off ii. 8.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.3. power management timings ii. 8.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.4. block diagram of the digital filter ii. 8.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.5. waveforms of the vdd filtering ii. 8.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.6. block diagram of the onchip oscillator ii. 8.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.7. symbolic of the onchip oscillator ii. 8.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.8. pcon register ii. 8.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.9. pfilt register ii. 8.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.10. powm register ii. 8.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 8.11. ckrl register ii. 8.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 9: interruption system figure 9.1. minimum pulse timings. ii. 9.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.2. ie0 register ii. 9.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.3. ie1 register ii. 9.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.4. iph0 register ii. 9.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.5. iph1 register ii. 9.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.6. ipl0 register ii. 9.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 9.7. ipl1 register ii. 9.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section iii: electrical and mechanical information chapter 1: dc characteristics tsc 80251a1 rev. b (20/09/96) matra mhs figure 1.1. ipd test condition, powerdown mode iii. 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.2. idl test condition, idle mode iii. 1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 1.3. idd test condition, active mode iii. 1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: ac characteristics figure 2.1. external instruction bus cycle in nonpage mode iii. 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.2. external data read cycle in nonpage mode iii. 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.3. external write data bus cycle in nonpage mode iii. 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.4. external instruction bus cycle in page mode iii. 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.5. external read data bus cycle in page mode iii. 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.6. external write data bus cycle in page mode iii. 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 2.7. serial port waveform shift register mode iii. 2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: adc characteristics figure 3.1. a/d conversion characteristic iii. 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: eprom programming figure 4.1. setup for eprom programming iii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.2. timings for eprom programming iii. 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.3. setup for eprom verification iii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 4.4. timings for eprom verification iii. 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 5: packages figure 5.1. plastic lead chip carrier iii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.2. ceramic quad pack j iii. 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . figure 5.3. thin quad flat pack (plastic) iii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 rev. b (20/09/96) matra mhs section i: introduction to tsc80251a1 chapter 4: tsc80251a1 pin description table 4.1. tsc80251a1 pin description i. 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section ii: design information chapter 1: configuration and memory mapping table 1.1. minimum times to fetch two bytes of code ii. 1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 1.2. sfr addresses and reset values ii. 1.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 2: parallel i/o ports table 2.1. port pin descriptions ii. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 2.2. instructions for external data moves ii. 2.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: timers/counters table 3.1. timer/counter sfrs ii. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 3.2. external signals ii. 3.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: serial i/o port table 4.1. serial port signals ii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 4.2. serial port sfrs ii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 6: event and waveform controller table 6.1. pca module modes ii. 6.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 8: power monitoring and management table 8.1. pin conditions in various modes ii. 8.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 9: interruption system table 9.1. interrupt system signals ii. 9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 9.2. interrupt system sfrs ii. 9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 9.3. level of priority ii. 9.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 9.4. interrupt priority within level ii. 9.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . section iii: electrical and mechanical information chapter 1: dc characteristics table 1.2. dc characteristics iii. 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . list of tables tsc 80251a1 rev. b (20/09/96) matra mhs chapter 2: ac characteristics table 2.1. ac characteristics (capacitive loading = 50 pf) iii. 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 3: adc characteristics table 3.1. a/d converter electrical characteristics iii. 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 4: eprom programming table 4.1. eprom programming configuration iii. 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 4.2. eprom verifying configuration iii. 4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 4.3. eprom programming & verification characteristics ( ta = 21 to 275c ; vcc = 5v +/ 0.25v ; vss= 0 ) iii. 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chapter 5: packages table 5.1. plcc chip size iii. 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 5.2. plcc pin assignment iii. 5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 5.3. cqpj chip size iii. 5.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 5.4. cqpj pin assignment iii. 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 5.5. tqfp chip size iii. 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . table 5.6. tqfp pin assignment iii. 5.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tsc 80251a1 general introduction tsc 80251a1 rev. b (20/09/96) 1. matra mhs the tsc80251a1 products are derivatives of the temic application specific microcontroller family based on the extended 8bit c251 architecture described below. this family of products are tailored to microcontroller applications requiring analog interface structures. three major peripheral blocks have been implemented to provide this facility to the designer: analog to digital converter: 4 inputs at 8bit resolution. pulse measurement unit (pmu): 3 modules used to interface to smart analog sensors. event and waveform controller (ewc): 5 programmable counters e.g. for pulse width modulation (pwm) or compare/capture functions. 1.1. application focus typical applications for these products are cdrom, card or barcode readers, monitors, car navigation systems, airbag and brake systems, as well as all kinds of industrial control and measurement equipment. with the high instruction throughput, the tsc80251a1 products are focussing on all highend 8bit to 16bit applications. they are also well suited to systems where a lower operating frequency is needed to reduce power consumption or radio frequency interference (rfi), while maintaining a high level of cpupower. 1.2. c251 architecture the c251 architecture at its lowest performance level, is binary code compatible with the 80c51 architecture. due to a 3stage instruction pipeline, the cpuperformance is increased by up to 5 times, using existing 80c51 code without any modification. using the new c251 instruction set, the performance will be increased by up to 15 times, at the same clock rate. this performance enhancement is based on the 16bit instruction bus and additional internal 8 and 16bit data busses. the 24bit address bus will allow an extension of the address space up to 16 mbytes for future derivatives. programming flexibility and ccode efficiency are both increased by the registerbased architecture, the 64kbyte extended stack space, combined with the new instruction set. combining the above features of the c251 core, the final code size could be reduced by a factor of 3, compared to an 80c51 implementation. all technical information in this document about core features are related to the core revision a (astepping). a new core revision, b/c (bstepping) is presently in preparation. both versions are upward compatible, so that no problem will appear if an astepping product is replaced by a bstepping one. the major differences are some additional features in the configuration bytes and a modified emulator interface which will not affect existing application. extended 8bit microcontroller with analog interfaces tsc 80251a1 rev. b (20/09/96) 2. matra mhs a new document will be released as soon as the first tsc80251a1 product will be available in revision c. 1.3. tsc80251a1 products the tsc80251a1 is available as a romless version (tsc80251a1) or with onchip mask programmable rom (tsc83251a1). the tsc87251a1 is an eprom version or otprom (one time programmable) compatible with the mask rom version. the standard production packages are 44 pins plcc or tqfp. the products can be delivered as 12 or 16 mhz versions at 5 volts and in all major temperature ranges. 1.4. tsc80251a1 documentation and tools the following documentation and starter tools are available to allow the full evaluation of the temic tsc80251a1 product range: atsc80251a1 microcontrollero contains all information about the a1 derivatives (block diagram, memory mapping, ports, peripheral description, electrical mechanical and ordering information...). atsc80251 programmer`s guideo contains all information for the programmer. (architecture, instruction set, programming, development tools) atsc80251 design guideo contains a summary of available application notes for an easier usage of the tsc80251 and its major peripherals. atsc80251a1 starter kito this kit enables the tsc80251a1 to be evaluated by the designer. it contains the following: ccompiler (limited to 2 kbytes of code) assembler linker tsc80251a1 simulator optionally tsc80251a1 evaluation board with rommonitor please visit our www for updated versions in zip format. atsc80251a1 development toolso see chapter odevelopment toolso in the programmer's guideo (keil, tasking, hitex, metalink, nohau) world wide web please contact our www for possible updated information at http://www.temic.de tsc80251 email hotline: c251@temic.fr tsc 80251a1 section i introduction to tsc80251a1 1 tsc 80251a1 rev. b (20/09/96) i. 1.1 matra mhs based on the extended 8bit c251 architecture, the tsc80251a1 includes a complete set of new or improved c51 compatible peripherals as well as a 4 channels 8bit a/d converter for communication with the analog environment. the key features of the new c251 architecture are: registerbased architecture: 40byte register file registers accessible as bytes, words, and double word. 3-stage instruction pipeline enriched instruction set 16bit and 32bit arithmetic and logic instructions compare and conditional jump instructions expanded set of move instructions reduced instruction set 189 generic instructions free space for additional instructions in the future additionally all 80c51 instructions are usable in binary mode 16bit internal code fetch 64 kbytes extended stack space maximum addressable memory 16 mbytes the benefits of this new architecture are: 5 times 80c51 performances in binary mode (80c51 binary code compatibility) 15 times 80c51 performances in source mode (full architecture performance) up to a factor 3 of code size reduction (when a c for 80c51 program is recompiled in c251 language) reduction of rfi and power consumption (reduced operating frequency) complete system development support compatible with existing tools new tools available: compiler, assembler, debugger, ice efficient c language support core features 1 tsc 80251a1 rev. b (20/09/96) i. 2.1 matra mhs 1 kbyte of internal ram tsc83251a1: 24 kbytes of on-chip masked rom tsc87251a1: 24 kbytes of internal programmable rom (otp or uv erasable in window package) tsc80251a1: romless version external memory space (code/data): 256 kbytes four 8bit parallel i/o ports (ports 0, 1, 2 and 3 of the standard 80c51) two 16bit timers/counters (timers 0 and 1 of the standard 80c51) serial i/o port : full duplex uart (80c51 compatible) three pmu: pulse measurement unit for smart analog interface for each of the three modules: 8bit prescaler 8bit timer for period and width measurements (duty cycle) the measurement can start either on the rising or on the falling edge one interrupt only one port line is used ewc: event and waveform controller high-speed output compare/capture inputs pwm: pulse width modulator watchdog timer capabilities compatible with pca: programmable counter array (5 x 16bit modules) 8bit analog to digital converter 4 channels conversion time: 600 clock periods (37.5 m s at 16 mhz) power management poweron reset (integrated on the chip) poweroff flag (cold and warm resets) power-fail detector power consumption reduction software programmable system clock idle and powerdown modes power supply: 5v 10% up to 16 mhz operation and three temperature ranges(*): commercial (0 to 70 c) industrial (40 to +85 c) automotive (40 to +125 c) packages: plcc44, cqpj44 (window) and tqfp44(**) *please contact your sales office for availability of speed options ** please contact your sales office for tqfp availability product features 1 tsc 80251a1 rev. b (20/09/96) i. 3.1 matra mhs p2 (a158) p0 (ad70) psen# ram bus interface unit cpu timer 0 and timer 1 interrupt handler unit 16bit memory code 16bit memory address ale/prog# p1(a17) ea#/vpp xtal1 xtal2 rst p3(a16) vdd0 vss0 vss1 avdd avss uart event and waveform controller pulse measurement unit vref 1 kbyte clock unit clock system prescaler eprom 24 kbytes ports 16-bit inst. bus 24-bit prog. counter bus 8-bit data bus 24-bit data address bus peripheral interface unit 8-bit internal bus 4 x 8bit adc poweron reset rom otprom 0-3 figure 3.1. tsc80251a1 block diagram block diagram 1 tsc 80251a1 rev. b (20/09/96) i. 4.1 matra mhs p1.4/cex1 p3.0/rxd p3.5/t1 tsc80251a1 p1.6/pmi1/cex3 p1.5/pmi0/cex2 p3.4/t0 p3.3/int1# p3.2/int0# p3.1/txd p1.7/a17/pmi2/cex4 rst p0.4/ad4 p0.5/ad5 p0.6/ad6 p0.7/ad7 ea#/vpp ale/prog# psen# p2.7/a15 p2.6/a14 vdd0 vss0 p1.3/cex0/an3 p1.2/eci/an2 p1.1/an1 p1.0/an0 vref avss avdd p0.0/ad0 p0.1/ad1 p0.2/ad2 p0.3/ad3 p3.6/wr# p3.7/rd#/a16 xtal2 xtal1 vss1 p2.0/a8 p2.1/a9 p2.2/a10 p2.3/a11/pmi0 p2.4/a12/pmi1 p2.5/a13/pmi2 figure 4.1. tsc80251a1 pin description pin description 1 tsc 80251a1 rev. b (20/09/96) i. 4.2 matra mhs table 4.1. tsc80251a1 pin description pin type description p0.0:7 i/o port 0 this is an 8bit opendrain bidirectional i/o port. port 0 pins that have 1s written to them float and can be used as highimpedance inputs. it is also address/data lines ad0:7, which are multiplexed lower address lines and data lines for external memory. external pullups are required during program verification. p1.0:7 i/o port 1 this is an 8bit bidirectional i/o port. it receives the loworder address byte during eprom programming and verifica- tion. it serves also the functions of various special features: p1.0 an0 : analog input 0, p1.1 an1 : analog input 1, p1.2 eci : ewc external clock input. an2 : analog input 2, p1.3 cex0 : ewc module 0 capture input/pwm output. an3 : analog input 3, p1.4 cex1 : ewc module 1 capture input/pwm output, p1.5 pmi0 : pulse measurement input 0, cex2 : ewc module 2 capture input/pwm output. p1.6 ead6 : external address line 6, pmi1 : pulse measurement input 1, cex3 : ewc module 3 capture input/pwm output. p1.7 a17 : address line for the 256kbyte memory space depending on the byte config0 (see table 1.2. ), pmi2 : pulse measurement input 2, cex4 : ewc module 4 capture input/pwm output. p2.0:7 i/o port 2 this is an 8bit bidirectional i/o port with internal pull-ups. it is also address lines a8:15, which are upper address lines for external memory. p3.0:7 i/o port 3 this is an 8bit bidirectional i/o port with internal pull-ups. it receives the highorder address bits during eprom programming and verifica- tion. it serves also the functions of various special features: p3.0 rxd : serial port receive data input. p3.1 txd : serial port transmit data output. p3.2 int0# : external interrupt 0. p3.3 int1# : external interrupt 1. p3.4 t0 : timer 0 external clock input. p3.5 t1 : timer 1 external clock input. p3.6 wr# : write signal for external access. p3.7 a16 : address line for 128kbyte and 256kbyte memory space depending on the byte config0, rd# : read signal for external access, depending on the byte config0. tsc 80251a1 rev. b (20/09/96) i. 4.3 matra mhs description type pin ale/prog# i/o address latch enable/program pulse it signals the start of an external bus cycle and indicates that valid address informa- tion is available on lines a15:8 and ad7:0. an external latch can use ale to de- multiplex the address from address/data bus. it is also used as the program pulse input prog#, during eprom programming. psen# o program store enable/read signal output this output is asserted for a memory address range that depends on bits rd0 and rd1 in configuration byte config0. ea#/vpp i external access enable/programming supply voltage this input directs program memory accesses to onchip or offchip code memory. for ea# = 0, all program memory accesses are off-chip. for ea# = 1, an access is on-chip otprom/eprom/rom if the address is within the range of the onchip otprom/eprom/rom; otherwise the access is off-chip. the value of ea# is latched at reset. for devices without rom on-chip, ea# must be strapped to ground. it receives also the programming supply voltage vpp during eprom programming operation. vref i voltage reference for the analog to digital converter vss0 gnd digital ground vdd0 pwr digital supply voltage vss1 gnd digital ground avss gnd analog ground avdd pwr analog supply voltage rst i reset input to the chip holding this pin high for 64 oscillator periods while the oscillator is running resets the device. the port pins are driven to their reset conditions when a voltage greater than v ih1 is applied, whether or not the oscillator is running. this pin has an internal pull-down resistor which allows the device to be reset by connecting a capacitor between this pin and vdd0. asserting rst when the chip is in idle mode or powerdown mode returns the chip to normal operation. xtal1 i input to the onchip inverting oscillator amplifier to use the internal oscillator, a crystal/resonator circuit is connected to this pin. if an external oscillator is used, its output is connected to this pin. xtal1 is the clock source for internal timing. xtal2 o output of the onchip inverting oscillator amplifier to use the internal oscillator, a crystal/resonator circuit is connected to this pin. if an external oscillator is used, leave xtal2 unconnected. tsc 80251a1 section ii design information 2 tsc 80251a1 rev. b (20/09/96) ii. 1.1 matra mhs 1.1. introduction the c251 architecture provides generic configuration and memory addressing capabilities. however, the products based on this architecture may provide various derivative features. the configuration and memory mapping features of the tsc80251a1 derivatives are detailed in this section. 1.2. configuration the tsc80251a1 derivatives provide design flexibility by configuring certain operating features during the device reset. these features fall into the following categories: external/internal memory access operation, external memory interface, source/binary mode opcodes, selection of bytes stored on the stack by an interrupt. the choice of internal program/code or external memory access is made through the external access pin (ea#, see paragraph 1.3.2.). the internal memories of the tsc80251a1 derivatives are detailed in paragraph 1.3. amemory mappingo. the choice of external memory interface is detailed in this section: page mode and wait states external memory signals the choice of source or binary mode and the interrupt processing are discussed in the tsc80251 programmers' guide. these settings are made based on two configuration bytes (config0 and config1, see figure 1.11. and figure 1.12. at the end of this chapter). 1.2.1. page mode and wait states this part discusses the choice of external cycle speed configuration. all the external bus cycles are based on states which are made of two cycles of the internal oscillator. the external xtal1 frequency can be internally divided by the oscillator to reduce the power consumption (see apower monitoring and managemento chapter) and the speed of the external cycles is then reduced accordingly. tsc80251a1 derivatives use two 8bit ports (p0, p2) to multiplex a 16bit address bus and an 8bit data bus. the first configuration is multiplexing the lower 8bit address bus and the 8bit data bus on port 0; this is the nonpage mode which is compatible with the 80c51 derivatives. the second configuration is multiplexing the upper 8bit address bus and the 8bit data bus on port 2; this is the page mode which improves performance. this bus structure is shown on figure 1.1 and is configured by the page bit of config0 byte. configuration and memory mapping 2 tsc 80251a1 rev. b (20/09/96) ii. 1.2 matra mhs a15:8 ad7:0 a7:0 a15:8/d7:0 a7:0 a7:0 d7:0 a15:8 a7:0 d7:0 a15:8 latch latch ram/ eprom/ flash tsc80251a1 tsc80251a1 nonpage mode page mode p0 p2 p0 p2 a15:8 ram/ eprom/ flash d7:0 figure 1.1. bus structure in nonpage mode and page mode the figure 1.2. highlights the nonpage mode configuration with a code fetch cycle. one state is used to latch a7:0 on port 0, then the data are transferred during the second state. a7:0 d7:0 a17/a16/a15:8 osc ale rd#/psen# p0 a17/a16/p2 state 1 state 2 figure 1.2. external bus cycle: code fetch, nonpage mode tsc 80251a1 rev. b (20/09/96) ii. 1.3 matra mhs osc ale rd#/psen# state 1 state 2 a17/a16/a7:0 a17/a16/a7:0 state 3 d7:0 d7:0 a15:8 a17/a16/p0 figure 1.3. external bus cycle: code fetch, page mode three configuration bits are provided to introduce wait states and modulate the access time depending on the external devices. one wait state can be added to extend the address latch time using the xale bit in config0 byte. another wait state can also be added to extend the data access time once the multiplexed addresses have been latched. figure 1.4. shows a code fetch in nonpage mode with one such wait state. the wait state a bit (wsa bit in config0 byte) adds one state for external program/code and data accesses (see segments ff:, fe:, 00: in paragraph 1.2.2.). the wait state b bit (wsb bit in config1 byte) adds one state for external data accesses only (see segment 01: in paragraph 1.2.2.). osc ale rd#/psen# p0 a17/a16/p2 state 1 state 2 a17/a16/a15:8 d7:0 a7:0 state 3 figure 1.4. external bus cycle: code fetch with one rd#/psen# wait state in nonpage mode 2 tsc 80251a1 rev. b (20/09/96) ii. 1.4 matra mhs 1.2.2. external memory signals for easy reference to the c51 architecture, it is convenient to consider the 24bit linear address space of the c251 architecture as 256 segments of 64 kbytes (from segment 00: to segment ff:). some of these segments are reserved to map the internal registers and, in this section, we only consider the segments which allows to access to the external memory. in the tsc80251a1 derivatives only four segments of the 24bit internal address space (00:, 01:, fe:, ff:) are implemented to address the external memory. this allows a maximum program or data memory space of 256 kbytes. various configurations are possible, depending on the read configuration bits (rd1:0) which are set in config0 byte. 1.2.2.1. how to address 256 kbytes the maximum external memory is provided when rd1:0 = 00, as shown on figure 1.5. psen# is used as a read signal and wr# is used as a write signal. eighteen address bits are provided externally (p0, p2, a16, a17) to control 256 kbytes in four segments. in this configuration, the program/code and data spaces share the same external memory segments. addresses read/write signals segments ff: fe: 01: 00: ff: fe: 01: 00: psen# psen#/wr# external memory 256 kbytes a17, a16, p2, p0 ff: fe: 01: 00: internal spaces program/code data 11 10 01 00 11 10 01 00 11 10 01 00 a17/a16 figure 1.5. internal/external memory segments (rd1:0 = 00) 1.2.2.2. how to address 128 kbytes one i/o pin (p1.7/a17) is saved if 128 kbytes of external memory are enough, as shown on figure 1.6. (rd1:0 = 01). psen# is used as a read signal and wr# is used as a write signal. seventeen address bits are provided externally (p0, p2, a16) to control 128 kbytes in two segments. in this configuration, the program/code and data spaces share the same external memory segments which are replicated twice in each internal space. tsc 80251a1 rev. b (20/09/96) ii. 1.5 matra mhs segments addresses external memory ff: fe: 01: 00: ff: fe: 01: 00: psen# psen#/wr# 128 kbytes a16, p2, p0 01:, ff: 00:, fe: read/write signals internal spaces program/code data 1 0 1 0 1 0 1 0 1 0 a16 figure 1.6. internal/external memory segments (rd1:0 = 01) 1.2.2.3. how to address 64 kbytes two i/o pins (p1.7/a17, p3.7/a16/rd#) are saved if 64 kbytes of external memory are enough, as shown on figure 1.7. (rd1:0 = 10). psen# is used as a read signal and wr# is used as a write signal. sixteen address bits are provided externally (p0, p2) to control 64 kbytes in one segment. in this configuration, the program/code and data share the same external memory segment which is replicated four times in each internal space. segments ff: fe: 01: 00: ff: fe: 01: 00: psen# psen#/wr# 64 kbytes 00:, 01:, fe:, ff: addresses read/write signals external memory internal spaces program/code data p2, p0 figure 1.7. internal/external memory segments (rd1:0 = 10) 1.2.2.4. how to keep c51 memory compatibility the last configuration provides a full compatibility with the c51 architecture, as shown on figure 1.8. (rd1:0 = 11). psen# is used as a read signal for program/code memory read while rd# is used as a read signal and wr# is used as a write signal for data memory accesses. sixteen address 2 tsc 80251a1 rev. b (20/09/96) ii. 1.6 matra mhs bits are provided externally (port 0, port 2). in this configuration, the program/code fits in one readonly external memory segment and the data fits in another readwrite external memory segment. each segment is replicated four times in one internal space. ff: fe: 01: 00: ff: fe: 01: 00: psen# rd#/wr# 2x64 kbytes 00:, 01:, fe:, ff: 00:, 01:, fe:, ff: program/code data segments addresses read/write signals external memory internal spaces p2, p0 figure 1.8. internal/external memory segments (rd1:0 = 11) 1.3. memory mapping the specific internal memories of the tsc80251a1 derivatives fall into the following categories: 2 configuration bytes, 24 kbytes onchip rom or eprom/otp program/code memory, 1 kbyte onchip ram data memory, special function registers (sfrs). 1.3.1. configuration bytes the configuration bytes, config0 and config1, are detailed in figure 1.11. and figure 1.12. during reset they are read from a specific rom area. for the tsc87251a1 eprom and otprom versions, these bytes are programmable in an eprom area (see aeprom programmingo chapter). for the tsc83251a1 masked rom versions, these bytes are additional information provided in a masked rom area. for the tsc80251a1 romless versions, these bytes are configured in factory according to the part number (see aordering informationo). these bytes are not accessible by the user during operation and they do not appear in the memory mapping of the tsc80251a1 derivatives. tsc 80251a1 rev. b (20/09/96) ii. 1.7 matra mhs ff:5fffh internal memory rom code program/code segments program/code external memory space ff:ffffh ff:6000h ff:0000h fe:0000h 01:ffffh 01:0000h 00:0000h 00:ffffh fe:ffffh ea#=0 8 kbytes 16 kbytes 40 kbytes 24 kbytes fd:ffffh 02:0000h reserved 64 kbytes 128 kbytes figure 1.9. programmable memory mapping 1.3.2. program/code memory the split of the internal and external program/code memory space is shown on figure 1.9. if ea# is tied to a high level, the 24kbyte internal program memory are mapped in the lower part of segment ff: where the c251 core jumps after reset. the rest of the program/code memory space is mapped to the external memory (see paragraph 1.2.2. to determine to which external memory location each segment actually maps). if ea# is tied to a low level, the internal program/code memory is not used and all the accesses are directed to the external memory. table 1.1. lists the minimum times to fetch onchip and external memory. table 1.1. minimum times to fetch two bytes of code type of code memory state times onchip code memory 1 external memory (page mode) 2 external memory (nonpage mode) 4 for the tsc87251a1 eprom and otprom versions, the internal program/code is programmable in eprom (see aeprom programmingo chapter). for the tsc83251a1 masked rom versions, the internal program/code is provided in a masked rom. for the tsc80251a1 romless versions, there is no possible internal program/code and ea# must be tied to a low level. in fact, for tsc83251a1 and tsc87251a1 versions, the upper 8 kbytes of the internal rom are also mapped in the data space (see paragraph 1.3.3.). 2 tsc 80251a1 rev. b (20/09/96) ii. 1.8 matra mhs note: special care should be taken when the program counter (pc) increments: if your program executes exclusively from onchip rom/otprom/eprom (not from external memory), beware of executing code from the upper eight bytes of the onchip rom/otprom/eprom (ff:5ff8hff:5fffh). because of its pipeline capability, the 80c251a1 may attempt to prefetch code from external memory (at an address above ff:5ff8h/ff:5fffh) and thereby disrupt i/o ports 0 and 2. fetching code constants from these eight bytes does not affect ports 0 and 2. when pc reaches the end of segment ff:, it loops to the reset address ff:0000h (for compatibility with the c51 architecture). when pc increments beyond the end of segment fe:, it continues at the reset address ff:0000h (linearity). when pc increments beyond the end of segment 01:, it loops to the beginning of segment 00: (this prevents it going into the reserved area). 1.3.3. data memory ff:5fffh data external memory space internal memory rom code ff:ffffh ff:6000h ff:0000h 01:0000h fc:0000h fe:ffffh ea#=0 8 kbytes 16 kbytes 1 kbyte 32 bytes reg. emap=1 00:efffh 00:e000h data segments 40 kbytes 24 kbytes 8 kbytes 55 kbytes ram data fe:0000h 01:ffffh fd:ffffh 02:0000h reserved 64 kbytes 64 kbytes emap=0 ea#=1 figure 1.10. data memory mapping the split of the internal and external data memory space is shown on figure 1.10. all the tsc80251a1 derivatives feature an internal 1 kbyte ram. this memory is mapped in the data space just over the 32 bytes of registers area (see tsc80251 programmers' guide). hence, the lowermost 96 bytes of the internal ram are bit addressable. this internal ram is not accessible through the program/code memory space. for computation with the internal rom code of the tsc83251a1 and tsc87251a1 versions, its upper 8 kbytes are also mapped in the data space if the eprom map configuration bit is cleared (emap bit in config1 byte, see figure 1.2. ). however, if ea# is tied to a low level and the tsc80251a1 derivative is running as a romless, the code is actually fetched in the corresponding external memory (i.e. the upper 8 kbytes of the lower 24 kbytes of segment ff:). if emap bit is set, the internal rom is not accessible through the data memory space. tsc 80251a1 rev. b (20/09/96) ii. 1.9 matra mhs all the accesses to the portion of the data space with no internal memory mapped onto are redirected to the external memory, see paragraph 1.2.2. to determine to which external memory location each segment actually maps. 1.3.4. special function registers the special function registers (sfrs) of the tsc80251a1 derivatives fall into the following categories: c251 core registers (sp, sph, dpl, dph, dpxl, psw, psw1, acc, b) port registers (p0, p1, p2, p3) timer registers (tcon, tmod, tl0, tl1, th0, th1) serial port and baud rate generator registers (scon, sbuf, saddr, saden, bdrcon, brl) pulse measurement unit registers (pmu, pmcon, pmscal0, pmscal1, pmscal2, pmper0, pmper1, pmper2, pmwid0, pmwid1, pmwid2) event and waveform controller registers: counters (ccon, cmod, cmod0, cmod1, cmod2, cof, crc, cie, cl0, cl1, cl2, cl3, cl4, ch0, ch1, ch2, ch3, ch4) compare/capture (ccapm0, ccapm1, ccapm2, ccapm3, ccapm4, ccapl0, ccapl1, ccapl2, ccapl3, ccapl4, ccaph0, ccaph1, ccaph2, ccaph3, ccaph4) analog to digital converter registers (adcon, adat) power monitoring/management and clock control registers (pcon, pfilt, powm, ckrl) interrupt system registers (ie0, ie1, ipl0, ipl1, iph0, iph1) sfrs are placed in a reserved internal memory segment s: which is not represented in the internal memory mapping. the relative addresses within s of these sfrs within s: are provided together with their reset values in table 1.2. . all the sfrs are bitaddressable using the c251 instruction set. the c251 core registers are in italics in this table and they are described in the tsc80251 programmers' guide. the other registers are detailed in the following sections which fully describe each peripheral unit. 2 tsc 80251a1 rev. b (20/09/96) ii. 1.10 matra mhs table 1.2. sfr addresses and reset values f8h ch = ch0 0000 0000 ccap0h xxxx xxxx ccap1h xxxx xxxx ccap2h xxxx xxxx ccap3h xxxx xxxx ccap4h xxxx xxxx cmod3 0000 0000 f0h b** 0000 0000 ch1 0000 0000 ch2 0000 0000 ch3 0000 0000 ch4 0000 0000 e8h cl = cl0 0000 0000 ccap0l xxxx xxxx ccap1l xxxx xxxx ccap2l xxxx xxxx ccap3l xxxx xxxx ccap4l xxxx xxxx cmod2 0000 0000 e0h acc** 0000 0000 cof xxx0 0000 crc 0000 0000 cie xxx0 0000 cl1 0000 0000 cl2 0000 0000 cl3 0000 0000 cl4 0000 0000 d8h ccon 0000 0000 cmod 00xx x000 ccapm0 x000 0000 ccapm1 x000 0000 ccapm2 x000 0000 ccapm3 x000 0000 ccapm4 x000 0000 cmod1 0000 0000 d0h psw** 0000 0000 psw1** 0000 0000 c8h c0h adcon xxx0 0x00 adat* xxxx xxxx b8h ipl0 0000 0000 saden 0000 0000 sph** 0000 0000 b0h p3 1111 1111 ie1 x000 0000 ipl1 0000 0000 iph1 0000 0000 iph0 0000 0000 a8h ie0 0000 0000 saddr 0000 0000 pmscal0 xxxx xxxx pmscal1 xxxx xxxx pmscal2 xxxx xxxx pmcon x000 x000 pmstat x000 x000 a0h p2 1111 1111 pmper0* xxxx xxxxh pmwid0* xxxx xxxxh pmper1* xxxx xxxxh pmwid1* xxxx xxxxh pmper2* xxxx xxxxh pmwid2* xxxx xxxxh 98h scon 0000 0000 sbuf xxxx xxxx brl 0000 0000 bdrcon xxx0 0000 pmu xxxx xxx0 90h p1 1111 1111 88h tcon 0000 0000 tmod 0000 0000 tl0 0000 0000 tl1 0000 0000 th0 0000 0000 th1 0000 0000 ckrl 0000 1000 powm 0xx0 0000 80h p0 1111 1111 sp** 0000 0111 dpl** 0000 0000 dph** 0000 0000 dpxl** 0000 0001 pfilt 0000 1000 pcon 000x 0000 0/8 1/9 2/a 3/b 4/c 5/d 6/e 7/f * read only **c251 core registers described in the tsc80251 programmer's guide reserved s:00h s7fh unimplemented s:100h s:1ffh unimplemented tsc 80251a1 rev. b (20/09/96) ii. 1.11 matra mhs config0 configuration byte 0 wsa xale rd1 rd0 page src 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 7 reserved the value read from this bit is indeterminate. do not set this bit. 5 wsa wait state a bit clear to generate one external wait state for memory regions 00:, fe:, and ff:. set for no wait states for these regions. 4 xale extend ale bit clear to extend the time of the ale pulse from t osc to 3.t osc , which adds one external wait state. set the time of the ale pulse to t osc . 3, 2 rd1, rd0 rd# and psen# function select bits rd1 rd0 rd# p1.7 psen# range 0 0 a16 a17 psen# is the read signal for both external data and program address space (256 kbytes). 0 1 a16 i/o pin psen# is the read signal for both external data and program address space (128 kbytes). 1 0 p3.7 i/o pin psen# is the read signal for both external data and program address space (64 kbytes). 1 1 rd# i/o pin 64kbyte code memory space 64kbyte data memory space 1 page page mode select bit clear for pagemode with a15:8/d7:0 on port 2, and a7:0 on port0. set for non pagemode with a15:8 on port 2, and a7:0/d7:0 on port 0 (compatible with 80c51microcontrollers). 0 src source mode/binary mode select bit clear for binary mode (binary code compatible with 80c51 microcontrollers) set for source mode. figure 1.11. configuration byte 0 note: to configure the tsc80251a1 in c51 microcontroller mode, use the following bit values in config0: 1101 1110b. 2 tsc 80251a1 rev. b (20/09/96) ii. 1.12 matra mhs config1 configuration byte 1 intr wsb emap 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 intr interrupt mode bit clear so that the interrupts push 2 bytes onto the stack (the 2 lower bytes of the pc register). set so that the interrupts push 4 bytes onto the stack (the 3 bytes of the pc register and the psw1 register). 3 wsb wait state b bit clear to generate one external wait state for memory region 01:. set for no wait states for region 01:. 2 reserved the value read from this bit is indeterminate. do not set this bit. 1 reserved the value read from this bit is indeterminate. do not set this bit. 0 emap eprom map bit clear to map the upper 8 kbytes of onchip code memory (ff:3000h-ff:5fffh) to 00:c000h-00:ffffh. set to map the upper 12 kbytes of onchip code memory to ff:3000h-ff:5fffh. figure 1.12. configuration byte 1 note: to configure the tsc80251a1 in c51 microcontroller mode, use the following bit values in config1: 1110 0111b. tsc 80251a1 rev. b (20/09/96) ii. 2.1 matra mhs 2.1. introduction the tsc80251a1 uses input/output (i/o) ports to exchange data with external devices. in addition to performing generalpurpose i/o, some ports are capable of external memory operations; others allow for alternate functions. all four tsc80251a1 i/o ports are bidirectional. each port contains a latch, an output driver and an input buffer. port 0 and port 2 output drivers and input buffers facilitate external memory operations. port 0 drives the lower address byte onto the parallel address bus and port 2 drives the upper address byte onto the bus. in nonpage mode, the data is multiplexed with the lower address byte on port 0. in page mode, the data is multiplexed with the upper address byte on port 2. all port 1 and port 3 pins serve for both generalpurpose i/o and alternate functions (see table 2.1. ). table 2.1. port pin descriptions pin name type alternate pin name alternate description alternate type p0.0 i/o ad0 address/data line 0 (nonpage mode) address line 0 (page mode) i/o p0.1 i/o ad1 address/data line 1 (nonpage mode) address line 1 (page mode) i/o p0.2 i/o ad2 address/data line 2 (nonpage mode) address line 2 (page mode) i/o p0.3 i/o ad3 address/data line 3 (nonpage mode) address line 3 (page mode) i/o p0.4 i/o ad4 address/data line 4 (nonpage mode) address line 4 (page mode) i/o p0.5 i/o ad5 address/data line 5 (nonpage mode) address line 5 (page mode) i/o p0.6 i/o ad6 address/data line 6 (nonpage mode) address line 6 (page mode) i/o p0.7 i/o ad7 address/data line 7 (nonpage mode) address line 7 (page mode) i/o parallel i/o ports 2 tsc 80251a1 rev. b (20/09/96) ii. 2.2 matra mhs pin name type alternate pin name alternate description alternate type p1.0 i/o an0 analog input 0 i p1.1 i/o an1 analog input 1 i p1.2 i/o eci an2 ewc external clock input analog input 2 i i p1.3 i/o cex0 an3 ewc module 0 capture input/pwm output analog input 3 i/o i p1.4 i/o cex1 ewc module 1 capture input/pwm output i/o p1.5 i/o pmi0 cex2 pmu input 0 ewc module 2 capture input/pwm output i i/o p1.6 i/o pmi1 cex3 pmu input 1 ewc module 3 capture input/pwm output i i/o p1.7 i/o a17 pmi2 cex4 address line 17 pmu input 2 ewc module 4 capture input/pwm output i/o i i/o pin name type alternate pin name alternate description alternate type p2.0 i/o a8 address line 8 (nonpage mode) address/data line 8 (page mode) i/o p2.1 i/o a9 address line 9 (nonpage mode) address/data line 9 (page mode) i/o p2.2 i/o a10 address line 10 (nonpage mode) address/data line 10 (page mode) i/o p2.3 i/o a11 address line 11 (nonpage mode) address/data line 11 (page mode) i/o p2.4 i/o a12 address line 12 (nonpage mode) address/data line 12 (page mode) i/o p2.5 i/o a13 address line 13 (nonpage mode) address/data line 13 (page mode) i/o p2.6 i/o a14 address line 14 (nonpage mode) address/data line 14 (page mode) i/o p2.7 i/o a15 address line 15 (nonpage mode) address/data line 15 (page mode) i/o tsc 80251a1 rev. b (20/09/96) ii. 2.3 matra mhs pin name type alternate pin name alternate description alternate type p3.0 i/o rxd serial port receive data input i p3.1 i/o txd serial port transmit data output o p3.2 i/o int0# external interrupt 0 i p3.3 i/o int1# external interrupt 1 i p3.4 i/o t0 timer 0 input i p3.5 i/o t1 timer 1 input i p3.6 i/o wr# write signal to external memory o p3.7 i/o rd# a16 read signal to external memory address line 16 o i/o notes: ewc = event waveform controller pmu = pulse measurement unit pwm = pulse width modulation 2.2. i/o configurations each port sfr operates via typed latches, as illustrated in figure 2.1. for ports 1 and 3. a cpu awrite to latcho signal initiates transfer of internal bus data into the typed latch. a cpu aread latcho signal transfers the latched q output onto the internal bus. similarly, a aread pino signal transfers the logical level of the port pin. some port data instructions activate the aread latcho signal while others activate the aread pino signal. latch instructions are referred to as readmodifywrite instructions (see areadmodifywrite instructionso paragraph). each i/o line may be independently programmed as input or output. 2.3. port 1 and port 3 figure 2.1. shows the structure of ports 1 and 3, which have internal pullups. an external source can pull the pin low. each port pin can be configured either for generalpurpose i/o or for its alternate input or output function (see table 2.1. ). to use a pin for generalpurpose output, set or clear the corresponding bit in the px register (x = 1 or 3). to use a pin for generalpurpose input, set the bit in the px register. this turns off the output driver fet. to configure a pin for its alternate function, set the bit in the px register. when the latch is set, the aalternate output functiono signal controls the output level (see figure 2.1. ). the operation of ports 1 and 3 is discussed further in aquasibidirectional port operationo paragraph. 2 tsc 80251a1 rev. b (20/09/96) ii. 2.4 matra mhs read latch internal bus write to latch read pin alternate input function alternate output function internal pullup vdd dq cl q# p1.x p3.x latch p3.x p1.x figure 2.1. port 1 and port 3 structure 2.4. port 0 and port 2 ports 0 and 2 are used for generalpurpose i/o or as the external address/data bus. port 0, shown in figure 2.2. , differs from the other ports in not having internal pullups. figure 2.3. shows the structure of port 2. an external source can pull a port 2 pin low. to use a pin for generalpurpose output, set or clear the corresponding bit in the px register (x = 0 or 2). to use a pin for generalpurpose input set the bit in the px register to turn off the output driver fet. dq cl q# read latch internal bus write to latch read pin address data p0.x latch vdd p0.x control 1 0 figure 2.2. port 0 structure tsc 80251a1 rev. b (20/09/96) ii. 2.5 matra mhs dq cl q# read latch internal bus write to latch read pin address data p2.x latch vdd p2.x control 1 0 figure 2.3. port 2 structure when port 0 and port 2 are used for an external memory cycle, an internal control signal switches the outputdriver input from the latch output to the internal address/data line. aexternal memory accesso paragraph discusses the operation of port 0 and port 2 as the external address/data bus. notes: port 0 and port 2 are precluded from use as general purpose i/o ports when used as address/data bus drivers. port 0 internal pullups assist the logicone output for memory bus cycles only. except for these bus cycles, the pullup fet is off. all other port 0 outputs are opendrain. 2.5. readmodifywrite instructions some instructions read the latch data rather than the pin data. the latch based instructions read the data, modify the data and then rewrite the latch. these are called areadmodifywriteo instructions. below is a complete list of these special instructions. when the destination operand is a port or a port bit, these instructions read the latch rather than the pin: instruction description example anl logical and anl p1,a orl logical or orl p2,a xrl logical exor xrl p3,a jbc jump if bit = 1 and clear bit jbc p1.1, label cpl complement bit cpl p3.0 inc increment inc p2 2 tsc 80251a1 rev. b (20/09/96) ii. 2.6 matra mhs example description instruction dec decrement dec p2 djnz decrement and jump if not zero djnz p3, label mov px.y, c move carry bit to bit y of port x mov p1.5, c clr px.y clear bit y of port x clr p2.4 set px.y set bit y of port x set p3.3 it is not obvious the last three instructions in this list are readmodifywrite instructions. these instructions read the port (all 8 bits), modify the specifically addressed bit and write the new byte back to the latch. these readmodifywrite instructions are directed to the latch rather than the pin in order to avoid possible misinterpretation of voltage (and therefore, logic) levels at the pin. for example, a port bit used to drive the base of an external bipolar transistor cannot rise above the transistor's baseemitter junction voltage (a value lower than v il ). with a logic one written to the bit, attempts by the cpu to read the port at the pin are misinterpreted as logic zero. a read of the latch rather than the pin returns the correct logicone value. 2.6. quasibidirectional port operation port 1, port 2 and port 3 have fixed internal pullups and are referred to as aquasibidirectionalo ports. when configured as an input, the pin impedance appears as logic one and sources current in response to an external logic zero condition. port 0 is a atrue bidirectionalo pin. the pin floats when configured as input. resets write logical one to all port latches. if logical zero is subsequently written to a port latch, it can be returned to input conditions by a logical one written to the latch. read port pin vdd vdd vdd 2 osc. periods input data q# from port latch p1 p2 p3 n figure 2.4. internal pullup configurations note: port latch values change near the end of readmodifywrite instruction cycles. output buffers (and therefore the pin state) update early in the instruction after the readmodifywrite instruction cycle. tsc 80251a1 rev. b (20/09/96) ii. 2.7 matra mhs logical zerotoone transitions in port 1, port 2 and port 3 use an additional pullup to aid this logic transition (see figure 2.4. ). this increases switch speed. the extra pullup briefly sources 100 times normal internal circuit current. the internal pullups are fieldeffect transistors rather than linear resistors. pullups consist of three pchannel fet (pfet) devices. a pfet is on when the gate senses logical zero and off when the gate senses logical one. pfet #1 is turned on for two oscillator periods immediately after a zerotoone transition in the port latch. a logical one at the port pin turns on pfet #3 (a weak pullup) through the inverter. this inverter and pfet pair form a latch to drive logical one. pfet #2 is a very weak pullup switched on whenever the associated nfet is switched off. this is traditional cmos switch convention. current strengths are 1/10 that of pfet #3. 2.7. port loading output buffers of port 1, port 2 and port 3 can each sink 1.6 ma at logic zero. these port pins can be driven by opencollector and opendrain devices. logic zerotoone transitions occur slowly as limited current pulls the pin to a logicone condition (see figure 2.4. ). a logiczero input turns off pfet #3. this leaves only pfet #2 weakly in support of the transition. in external bus mode, port 0 output buffers each sink 3.2 ma at logic zero. however, the port 0 pins require external pullups to drive external gate inputs. external circuits must be designed to limit current requirements to these conditions. 2.8. external memory access the external bus structure is different for page mode and nonpage mode. in nonpage mode (used by 80c51 microcontrollers), port 2 outputs the upper address byte; the lower address byte and the data are multiplexed on port 0. in page mode, the upper address byte and the data are multiplexed on port 2, while port 0 outputs the lower address byte. the tsc80251a1 cpu writes ffh to the port 0 register for all external memory bus cycles. this overwrites previous information in port 0. in contrast, the port 2 register is unmodified for external bus cycles. when address bits or data bits are not on the port 2 pins, the bit values in port 2 appear on the port 2 pins. in nonpage mode, port 0 uses a strong internal pullup fet to output ones or a strong internal pulldown fet to output zeros for the lower address byte and the data. port 0 is in a highimpedance state for data input. in page mode, port 0 uses a strong internal pullup fet to output ones or a strong internal pulldown fet to output zeros for the lower address byte or a strong internal pulldown fet to output zeros for the upper address byte. in nonpage mode, port 2 uses a strong internal pullup fet to output ones or a strong internal pulldown fet to output zeros for the upper address byte. in page mode, port 2 uses a strong internal pullup fet to output ones or a strong internal pulldown fet to output zeros for the upper address byte and data. port 2 is in a highimpedance state for data input. note: in external bus mode port 0 outputs do not require external pullups. there are two types of external memory accesses: external program memory and external data memory. external program memories use signal psen# as a read strobe. 80c51 microcontrollers 2 tsc 80251a1 rev. b (20/09/96) ii. 2.8 matra mhs use rd# (read) or wr# (write) to strobe memory for data accesses. depending on its rd0 and rd1 configuration bits, the tsc80251a1 uses psen# or rd# for data reads (see aconfiguration bits rd0 and rd1o). during instruction fetches, external program memory can transfer instructions with 16bit addresses for binary compatible code or with the external bus configured for extended memory addressing (17bit or 18bit). external data memory transfers use an 8bit, 16bit, 17bit or 18bit address bus, depending on the instruction and the configuration of the external bus. table 2.2. lists the instructions that can be used for the these bus widths. table 2.2. instructions for external data moves bus width instructions 8 movx @ri mov @rm mov dir8 16 movx @dptr mov @wrj mov @wrj+dis mov dir16 17 mov @drk mov @drk+dis 18 mov @drk mov @drk+dis note: avoid mov p0 instructions for external memory accesses. these instructions can corrupt input code bytes at port 0. external signal ale (address latch enable) facilitates external address latch capture. the address byte is valid after the ale pin drives v ol . for write cycles, valid data is written to port 0 just prior to the write pin (wr#) asserting v ol . data remains valid until wr# is undriven. for read cycles, data returned from external memory must appear at port 0 before the read pin (rd#) is undriven. waits states, by definition, affect bustiming. tsc 80251a1 rev. b (20/09/96) ii. 3.1 matra mhs 3.1. introduction the tsc80251a1 contains two generalpurpose, 16bit timers/counters. although they are identified as timer 0 and timer 1, you can independently configure each to operate in a variety of modes as a timer or as an event counter. each timer employs two 8bit timer registers, used separately or in cascade, to maintain the count. timer registers and associated control and capture registers are implemented as addressable special function registers (sfrs). table 3.1. briefly describes the sfrs referred to in this chapter. two of the sfrs provide programmable control of the timers as follows: timer/counter mode control register (tmod). timer/counter control register (tcon) for timer 0 and timer 1. these registers are described at the end of this chapter. table 3.1. timer/counter sfrs mnemonic description address tl0 th0 timer 0 registers used separately as two 8bit counters or in cascade as one 16bit counter. counts an internal clock signal with frequency f osc /12 (timer operation) or an external input (event counter operation). s:8ah s:8ch tl1 th1 timer 1 registers used separately as two 8bit counters or in cascade as one 16bit counter. counts an internal clock signal with frequency f osc /12 (timer operation) or an external input (event counter operation). s:8bh s:8dh tcon timer 0/1 control register contains the run control bits, overflow flags, interrupt flags and interrupt type control bits for timer 0 and timer 1. s:88h tmod timer 0/1 mode control register contains the mode select bits, counter/timer select bits and external control gate bits for timer 0 and timer 1. s:89h timers/counters 2 tsc 80251a1 rev. b (20/09/96) ii. 3.2 matra mhs table 3.2. describes the external signals referred to in this chapter. table 3.2. external signals mnemonic type description multiplexed with int0# i external interrupt 0 this input sets the ie0 interrupt flag in tcon register. it0 selects the triggering method: it0 = 1 selects edgetriggered (hightolow); it0 = 0 selects leveltriggered (active low). int0# also serves as external run control for timer 0, when selected by gate0 bit in tcon register. p3.2 int1# i external interrupt 1 this input sets the ie1 interrupt flag in tcon register. it1 selects the triggering method: it1 = 1 selects edgetriggered (hightolow); it1 =0 selects leveltriggered (active low). int1# also serves as external run control for timer 1, when selected by gate1 bit in tcon register. p3.3 t0 i timer 0 external clock input when timer 0 operates as a counter, a falling edge on the t0 pin increments the count. p3.4 t1 i timer 1 external clock input when timer 1 operates as a counter, a falling edge on the t1 pin increments the count. p3.5 3.2. timer/counter operations for example, a basic operation is timer registers thx and tlx (x = 0 or 1) connected in cascade to form a 16bit timer. setting the run control bit (trx) turns the timer on by allowing the selected input to increment tlx. when tlx overflows it increments thx; when thx overflows it sets the timer overflow flag (tfx) in tcon register. setting the run control bit does not clear the thx and tlx timer registers. timer registers can be accessed to obtain the current count or to enter preset values. timer 0 and timer 1 can also be controlled by external pin intx# to facilitate pulse width measurements. the c\tx# control bit selects timer operation or counter operation by selecting the divideddown system clock or external pin tx as the source for the counted signal. for timer operation (c/tx# = 0), the timer register counts the divideddown system clock. the timer register is incremented once every peripheral cycle, i.e. once every six states. since six states equals 12 oscillator periods (clock cycles), the timer clock rate is f osc /12. for counter operation (c/tx# = 1), the timer register counts the negative transitions on the tx external input pin. when the sample of the external inputs is high in one cycle and low in the next, the counter is incremented. since it takes 12 states (24 oscillator periods) to recognize a negative transition, the maximum count rate is 1/24 of the oscillator frequency. there are no restrictions on tsc 80251a1 rev. b (20/09/96) ii. 3.3 matra mhs the duty cycle of the external input signal, but to ensure that a given level is sampled at least once before it changes, it should be held for at least one full peripheral cycle. 3.3. timer 0 timer 0 functions as either a timer or event counter in four modes of operation. figure 3.1. , figure 3.3. and figure 3.4. show the logical configuration of each mode. timer 0 is controlled by the four loworder bits of tmod register (see figure 3.6. ) and bits 0, 1, 4 and 5 of tcon register (see figure 3.5. ). tmod register selects the method of timer gating (gate0), timer or counter operation (t/c0#), and mode of operation (m10 and m00). tcon register provides timer 0 control functions: overflow flag (tf0), run control bit (tr0), interrupt flag (ie0), and interrupt type control bit (it0). for normal timer operation (gate0 = 0), setting tr0 allows tl0 to be incremented by the selected input. setting gate0 and tr0 allows external pin int0# to control timer operation. this setup can be used to make pulse width measurements. timer 0 overflow (count rolls over from all 1s to all 0s) sets tf0 flag generating an interrupt request. 3.3.1. mode 0 (13bit timer) mode 0 configures timer 0 as an 13bit timer which is set up as an 8bit timer (th0 register) with a modulo 32 prescaler implemented with the lower five bits of tl0 register (see figure 3.1. ). the upper three bits of tl0 register are indeterminate and should be ignored. prescaler overflow increments th0 register. osc 12 c/t x = 0 c/t x = 1 tx trx gatex intx# thx (8 bits) tfx timer interrupt x overflow tlx (5 bits) figure 3.1. timer/counter x (x = 0 or 1) in mode 0 and mode 1 2 tsc 80251a1 rev. b (20/09/96) ii. 3.4 matra mhs 3.3.2. mode 1 (16bit timer) mode 1 configures timer 0 as a 16bit timer with th0 and tl0 connected in cascade (see figure 3.2. ). the selected input increments tl0. osc 12 c/t x = 0 c/t x = 1 tx trx gatex intx# thx (8 bits) tfx timer interrupt x overflow tlx (8 bits) figure 3.2. timer/counter x (x = 0 or 1) in mode 1 3.3.3. mode 2 (8bit timer with autoreload) mode 2 configures timer 0 as an 8bit timer (tl0 register) that automatically reloads from th0 register (see figure 3.3. ). tl0 overflow sets tf0 flag in tcon register and reloads tl0 with the contents of th0, which is preset by software. when the interrupt request is serviced, hardware clears tf0. the reload leaves th0 unchanged. osc 12 c/t x = 0 c/t x = 1 tx gatex intx# control tlx (8 bits) thx (8 bits) tfx timer interrupt x reload trx figure 3.3. timer/counter x (x = 0 or 1) in mode 2 tsc 80251a1 rev. b (20/09/96) ii. 3.5 matra mhs 3.3.4. mode 3 (two 8bit timers) mode 3 configures timer 0 such that registers tl0 and th0 operate as separate 8bit timers (see figure 3.4. ). this mode is provided for applications requiring an additional 8bit timer or counter. tl0 uses the timer 0 control bits c/t0# and gate0 in tmod register, and tr0 and tf0 in tcon register in the normal manner. th0 is locked into a timer function (counting f osc /12) and takes over use of the timer 1 interrupt (tf1) and run control (tr1) bits. thus, operation of timer 1 is restricted when timer 0 is in mode 3. osc 12 c/t 0 = 0 c/t 0 = 1 t0 gate0 int0# control tl0 (8 bits) tr0 tf0 timer interrupt 0 control tf1 th0 (8 bits) tr1 osc 12 timer interrupt 1 figure 3.4. timer/counter in mode 3 : two 8-bit counters 3.4. timer 1 timer 1 functions as either a timer or event counter in three modes of operation. figure 3.1. and figure 3.3. show the logical configuration for modes 0, 1, and 2. timer 1's mode 3 is a holdcount mode. timer 1 is controlled by the four highorder bits of tmod register (see figure 3.6. ) and bits 2, 3, 6 and 7 of tcon register (see figure 3.5. ). tmod register selects the method of timer gating (gate1), timer or counter operation (c/t1#), and mode of operation (m11 and m01). tcon register provides timer 1 control functions: overflow flag (tf1), run control bit (tr1), interrupt flag (ie1), and interrupt type control bit (it1). timer 1 operation in modes 0, 1 and 2 is identical to timer 0. timer 1 can serve as the baud rate generator for the serial port. mode 2 is best suited for this purpose. for normal timer operation (gate1 = 0), setting tr1 allows timer register tl1 to be incremented by the selected input. setting gate1 and tr1 allows external pin int1# to control timer operation. this setup can be used to make pulse width measurements. 2 tsc 80251a1 rev. b (20/09/96) ii. 3.6 matra mhs timer 1 overflow (count rolls over from all 1s to all 0s) sets the tf1 flag generating an interrupt request. when timer 0 is in mode 3, it uses timer 1's overflow flag (tf1) and run control bit (tr1). for this situation, use timer 1 only for applications that do not require an interrupt (such as a baud rate generator for the serial port) and switch timer 1 in and out of mode 3 to turn it off and on. 3.4.1. mode 0 (13bit timer) mode 0 configures timer 1 as a 13bit timer, which is set up as an 8bit timer (th1 register) with a modulo32 prescaler implemented with the lower 5 bits of the tl1 register (see figure 3.1. ). the upper 3 bits of tl1 register are ignored. prescaler overflow increments th1 register. 3.4.2. mode 1 (16bit timer) mode 1 configures timer 1 as a 16bit timer with th1 and tl1 connected in cascade (see figure 3.2. ). the selected input increments tl1. 3.4.3. mode 2 (8bit timer with autoreload) mode 2 configures timer 1 as an 8bit timer (tl1 register) with automatic reload from th1 register on overflow (see figure 3.3. ). overflow from tl1 sets overflow flag tf1 in tcon register and reloads tl1 with the contents of th1, which is preset by software. the reload leaves th1 unchanged. 3.4.4. mode 3 (halt) placing timer 1 in mode 3 causes it to halt and hold its count. this can be used to halt timer 1 when tr1 run control bit is not available, i.e. when timer 0 is in mode 3. tsc 80251a1 rev. b (20/09/96) ii. 3.7 matra mhs 3.5. registers tcon (088h) timer/counter control register tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 tf1 timer 1 overflow flag cleared by hardware when processor vectors to interrupt routine. set by hardware on timer/counter overflow. 6 tr1 timer 1 run control bit clear to turn off timer/counter 1. set to turn on timer/counter 1. 5 tf0 timer 0 overflow flag cleared by hardware when processor vectors to interrupt routine. set by hardware on timer/counter overflow. 4 tr0 timer 0 run control bit clear to turn off timer/counter 0. set to turn on timer/counter 0. 3 ie1 interrupt 1 edge flag cleared by hardware when interrupt is processed if edge-triggered (see it1). set by hardware when external interrupt is detected out int1# pin. 2 it1 interrupt 1 type control bit clear to select low level active (level triggered) for external interrupt 1. set to select falling edge active (edge triggered) for external interrupt 1. 1 ie0 interrupt 0 edge flag cleared by hardware when interrupt is processed if edge-triggered (see it0). set by hardware when external interrupt is detected out int0# pin. 0 it0 interrupt 0 type control bit clear to select low level active (level triggered) for external interrupt 0. set to select falling edge active (edge triggered) for external interrupt 0. reset value = 0000 0000b figure 3.5. tcon register 2 tsc 80251a1 rev. b (20/09/96) ii. 3.8 matra mhs tmod (089h) timer/counter mode register gate1 c/t1# m11 m01 gate0 c/t0# m10 m00 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 gate1 timer 1 gating control bit clear to enable timer 1 whenever tr1 bit is set. set to enable timer/counter 1 only while int1# pin is high and tr1 bit is set. 6 c/t1# timer 1 counter/timer select bit cleared for timer operation (input from internal system clock). set for counter operation (input from t1 input pin). 5 m11 timer 1 mode select bits m11 m01 operating mode 0 0 mode 0: 8bit timer/counter (th1) with 5bit prescalar (tl1) 0 1 mode 1: 16 bit t imer/counter 4 m01 01 m o d e 1 : 16 bit t i mer /c oun t er 1 0 mode 2: 8bit autoreload timer/counter (tl1). reloaded from th1 at overflow 1 1 mode 3: timer 1 halted. retains count. 3 gate0 timer 0 gating control bit clear to enable timer 0 whenever tr0 bit is set. set to enable timer/counter 0 only while int0# pin is high and tr0 bit is set. 2 c/t0# timer 0 counter/timer select bit cleared for timer operation (input from internal system clock) set for counter operation (input from t0 input pin). 1 m10 timer 0 mode select bit m10 m00 operating mode 0 0 mode 0: 8bit timer/counter (th0) with 5bit prescalar (tl0). 0 1 mode 1: 16bit timer/counter. 0 m00 1 0 mode 2: 8bit autoreload timer/counter (tl0). reloaded from th0 at overflow. 1 1 mode 3: tl0 is an 8bit timer/counter. th0 is an 8bit timer using timer 1's tr1 and tf1 bits. reset value = 0000 0000b figure 3.6. tmod register tsc 80251a1 rev.b (20/09/96) ii. 4.1 ma tra mhs 4.1. introduction this chapter provides instructions on programming the serial port and generating the serial i/0 baud rates with timer 1 and the internal baud rate generator. the serial input/output port supports communication with modems and other external peripheral devices. the serial port provides both synchronous and asynchronous communication modes. it operates as a universal asynchronous receiver and t ransmitter (uar t) in three fullduplex modes (modes 1, 2 and 3). asynchronous transmission and reception can occur simultaneously and at dif ferent baud rates. the uart supports framingbit error detection, overrun error detection, multiprocessor communication, and automatic address recognition. the serial port also operates in a single synchronous mode (mode 0). the synchronous mode (mode 0) operates either at a single baud rate (80c51 compatibility) or at a variable baud rate with an independent and internal baud rate generator . mode 2 can operate at two baud rates. modes 1 and 3 operate over a wide range of baud rates, which are generated by timer 1 and internal baud rate generator. the serial port signals are defined in table 4.1. and the serial port special function registers are described in table 4.2. figure 4.1. is a block diagram of the serial port. table 4.1. serial port signals name type description multiplexed with txd o transmit data in mode 0, txd transmits the clock signal. in modes 1, 2 and 3, txd transmits serial data. p3.1 rxd i/o receive data in mode 0, rxd transmits and receives serial data. in mode 1,2 and 3, rxd receives serial data. p3.0 for the three asynchronous modes, the uart transmits on the txd pin and receives on the rxd pin. for the synchronous mode (mode 0), the uar t outputs a clock signal on the txd pin and sends and receives messages on the rxd pin (see figure 4.1. ). sbuf register , which holds received bytes and bytes to be transmitted, actually consists of two physically dif ferent registers. t o send, software writes a byte to sbuf; to receive, software reads sbuf . the receive shift register allows reception of a second byte before the first byte has been read from sbuf . however , if software has not read the first byte by the time the second byte is received, the second byte will overwrite the first. the uart sets interrupt bits ti and ri on transmission and reception, respectively . these two bits share a single interrupt request and interrupt vector. table 4.2. serial port sfrs mnemonic description address sbuf serial buffer two separate registers comprise the sbuf register . w riting to sbuf loads the transmit buf fer and reading sbuf accesses the receive buf fer. s:99h serial i/o port 2 tsc 80251a1 rev.b (20/09/96) ii. 4.2 ma tra mhs address description mnemonic scon serial port control register selects the serial port operating mode. scon enables and disables the receiver, framing bit error detection, overrun error detection, multiprocessor communication, automatic address recognition and the serial port interrupt bits. s:98h saddr serial address defines the individual address for a slave device connected on the serial lines. s:0a9h saden serial addr ess enable r egister specifies the mask byte that is used to define the given address for a slave device. s:0b9h bdrcon baud rate control register enables and configures the internal baud rate register. s:09bh brl baud rate reload register contains the autoreload value of the baud rate generator . s:09ah txd rxd sbuf transmitter sbuf receiver ib bus mode 0 transmit receive shift register load sbuf read sbuf write sbuf scon ri ti interrupt request serial port figure 4.1. serial port block diagram tsc 80251a1 rev.b (20/09/96) ii. 4.3 ma tra mhs 4.2. modes of operation the serial port can operate in one synchronous and three asynchronous modes. 4.3. synchronous mode (mode 0) mode 0 is a halfduplex, synchronous mode, which is commonly used to expand the i/0 capabilities of a device with shift registers. the transmit data (txd) pin outputs a set of eight clock pulses while the receive data (rxd) pin transmits or receives a byte of data. the 8bit data are transmitted and received leastsignificant bit (lsb) first. shifts occur in the last phase (s6p2) of every peripheral cycle, which corresponds to a baud rate of f osc /12. figure 4.2. shows the timing for transmission and reception in mode 0. d0 d1 d2 d7 d6 s6p2 s3p1 s6p1 txd write to sbuf s6p2 s6p2 s6p2 s6p2 shift rxd s6p2 transmit ti s1p1 receive txd s3p1 s6p1 set ren, clear ri write to scon s6p2 s6p2 s6p2 s6p2 shift s5p2 d0 d1 d6 d7 rxd ri figure 4.2. mode 0 timings 2 tsc 80251a1 rev.b (20/09/96) ii. 4.4 ma tra mhs 4.3.1. transmission (mode 0) follow these steps to begin a transmission: write to scon register clearing bits sm0, sm1 and ren. write the byte to be transmitted to the sbuf register. this write starts the transmission. hardware executes the write to sbuf in the last phase (s6p2) of a peripheral cycle. at s6p2 of the following cycle, hardware shifts the lsb (d0) onto the rxd pin. at s3p1 of the next cycle, the txd pin goes low for the first clocksignal pulse. shifts continue every peripheral cycle. in the ninth cycle after the write to sbuf, the msb (d7) is on the rxd pin. at the beginning of the 10th cycle, hardware drives the rxd pin high and asserts ti to indicate the end of the transmission. 4.3.2. reception (mode 0) to start a reception in mode 0, write to the scon register . clear bits sm0, sm1 and ri and set the ren bit. hardware executes the write to scon in the last phase (s6p2) of a peripheral cycle (see figure 4.2. ). in the second peripheral cycle clocksignal pulse, and the lsb (d0) is sampled on the rxd pin at s5p2. the d0 bit is then shifted into the shift register . after eight shifts at s6p2 of every peripheral cycle, the lsb (d7) is shifted into the shift register, and hardware asserts ri to indicate acompleted reception. software can then read the received byte from sbuf. 4.4. asynchronous modes (modes 1, 2 and 3) the serial port has three asynchronous modes of operation: mode 1 mode 1 is a fullduplex, asynchronous mode. the data frame (see figure 4.3. ) consists of 10 bits: one start, eight data bits, and one stop bit. serial data is transmitted on the txd pin and received on the rxd pin. when a message is received, the stop bit is read in the rb8 bit in scon register . the baud rate is generated either by overflow of timer 1 or by overflow of the internal baud rate generator (see abaud rate generatoro paragraph). modes 2 and 3 modes 2 and 3 are fullduplex, asynchronous modes. the data frame (see figure 4.3. ) consists of 1 1bit: one start bit, 8bit data (transmitted and received lsb first), one programmable ninth data bit, and one stop bit. serial data is transmitted on the txd pin and received on the rxd pin. on receive, the ninth bit is read from rb8 bit in scon register. on transmit, the ninth data bit is written to tb8 bit in scon register . (alternatively , you can use the ninth bit as a command/data flag.) in mode 2, the baud rate is programmable to 1/32 or 1/64 of the oscillator frequency. in mode 3, the baud rate is generated either by overflow of t imer 1 or by overflow of internal baud rate generator. tsc 80251a1 rev.b (20/09/96) ii. 4.5 ma tra mhs start start d0 d1 d2 d3 d4 d5 d5 d6 d7 d0 d1 d2 d3 d4 d5 d5 d6 d7 d8 8bit data 9bit data stop stop mode 1 mode 2 and 3 figure 4.3. data frames (modes 1, 2 and 3) 4.4.1. transmission (modes 1, 2 and 3) follow these steps to initiate a transmission: write to scon register . select the mode with sm0 and sm1 bits and clear ren bit. for modes 2 and 3, also write the ninth bit to tb8 bit. write the byte to be transmitted to sbuf register. this write starts the transmission. 4.4.2. reception (modes 1, 2 and 3) to prepare for a reception, set ren bit in scon register. the actual reception is then initiated by a detected hightolow transition on the rxd pin. 4.5. framing bit error detection (modes 1, 2 and 3) framing bit error detection is provided for the three asynchronous modes. to enable the framing bit error detection feature, set smod0 bit in pcon register. when this feature is enabled, the receiver checks each incoming data frame for a valid stop bit. an invalid stop bit may result from noise on the serial lines or from simultaneous transmission by two cpus. if a valid stop bit is not found, the software sets fe bit in scon register. software may examine fe bit after each reception to check for data errors. once set, only software or a reset clear fe bit. subsequently received frames with valid stop bits cannot clear fe bit. 4.6. overrun error detection (modes 1, 2 and 3) overrun error detection is provided for the three asynchronous modes. t o enable the overrun error detection feature, set smod0 bit in pcon register. 2 tsc 80251a1 rev.b (20/09/96) ii. 4.6 ma tra mhs this error occurs when a character received and not read by the cpu is overwritten by a new one. figure 4.4. shows an example of overrun error. character 1 character 2 rxd ri ovr character 1 is overwritten by the character 2 figure 4.4. overrun error (modes 1, 2 and 3) in this example character 1 is received and ri is set. then a second character is sent before the cpu has read the first one. the first character is overwritten by character 2 and the overrun error bit (ovr) is set in scon register to indicate the error. 4.7. multiprocessor communication (modes 2 and 3) modes 2 and 3 provide a ninthbit mode to facilitate multiprocessor communication. t o enable this feature, set sm2 bit in scon register . when the multiprocessor communication feature is enabled, the serial port can differentiate between data frames (ninth bit clear) and address frames (ninth bit set). this allows the microcontroller to function as a slave processor in an environment where multiple slave processors share a single serial line. when the multiprocessor communication feature is enabled, the receiver ignores frames with the ninth bit clear. the receiver examines frames with the ninth bit set for an address match. if the received address matches the slaves address, the receiver hardware sets rb8 and ri bits in scon register, generating an interrupt. note : es bit must be set in ie register to allow ri bit to generate an interrupt. the addressed slave' s software then clears sm2 bit in scon register and prepares to receive the data bytes. the other slaves are unaf fected by these data bytes because they are waiting to respond to their own address. 4.8. automatic address recognition the automatic address recognition feature is enabled when the multiprocessor communication feature is enabled (sm2 bit in scon register is set). implemented in hardware, automatic address recognition enhances the multiprocessor communication feature by allowing the serial port to examine the address of each incoming tsc 80251a1 rev.b (20/09/96) ii. 4.7 ma tra mhs command frame. only when the serial port recognizes its own address, the receiver sets ri bit in scon register to generate an interrupt. this ensures that the cpu is not interrupted by command frames addressed to other devices. if desired, you may enable the automatic address recognition feature in mode 1. in this configuration, the stop bit takes the place of the ninth data bit. bit ri is set only when the received command frame address matches the device's address and is terminated by a valid stop bit. notes : the multiprocessor communication and automatic address recognition features cannot be enabled in mode 0 (i.e, setting sm2 bit in scon register in mode 0 has no effect). to support automatic address recognition, a device is identified by a given address and a broadcast address. 4.8.1. given address each device has an individual address that is specified in saddr register; the saden register is a mask byte that contains don' tcare bits (defined by zeros) to form the device' s given address. the don'tcare bits provide the flexibility to address one or mores slaves at a time. the following example illustrates how a given address is formed. to address a device by its individual address, the saden mask byte must be 1111 1111b . for example: saddr = 0101 0110b saden = 1111 1100b given = 0101 01xxb the following is an example of how to use given addresses to address different slaves: slave a: saddr = 1111 0001b saden = 1111 1010b given = 1111 0x0xb slave b: saddr = 1111 0011b saden = 1111 1001b given = 1111 0xx1b slave c: saddr = 1111 0010b saden = 1111 1101b given = 1111 00x1b the saden byte is selected so that each slave may be addressed separately. for slave a, bit 0 (the lsb) is a don' tcare bit; for slaves b and c, bit 0 is a 1. t o communicate with slave a only, the master must send an address where bit 0 is clear (e.g. 1111 0000b ). for slave a, bit 1 is a 0; for slaves b and c, bit 1 is a don' t care bit. t o communicate with slaves a and b, but not slave c, the master must send an address with bits 0 and 1 both set (e.g. 1111 0011b ). to communicate with slaves a, b and c, the master must send an address with bit 0 set , bit 1 clear , and bit 2 clear (e.g. 1111 0001b ). 2 tsc 80251a1 rev.b (20/09/96) ii. 4.8 ma tra mhs 4.8.2. broadcast address a broadcast address is formed from the logical or of the saddr and saden registers with zeros defined as don'tcare bits, e.g.: saddr = 0101 0110b saden = 1111 1100b (saddr) or (saden) = 1111 111xb the use of don'tcare bits provides flexibility in defining the broadcast address, however in most applications, a broadcast address is 0ffh. the following is an example of using broadcast addresses: slave a: saddr = 1111 0001b saden = 1111 1010b given = 1111 1x11b slave b: saddr = 1111 0011b saden = 1111 1001b given = 1111 1x11b slave c: saddr = 1111 0010b saden = 1111 1101b given = 1111 1111b for slaves a and b, bit 2 is a don' t care bit; for slave c, bit 2 is set. t o communicate with all of the slaves, the master must send an address ffh. to communicate with slaves a and b, but not slave c, the master can send and address fbh. 4.8.3. reset addresses on reset, the saddr and saden registers are initialized to 00h, i.e. the given and broadcast addresses are xxxx xxxxb (all don'tcare bits). this ensures that the serial port is backwards compatible with the 80c51 microcontrollers that do not support automatic address recognition. 4.9. baud rates 4.9.1. internal baud rate generator the baud rate control register (bdrcon, see figure 4.9. is added to the tsc80251a1 derivatives in order to manage the new functionality of the uart. two baud rate generators can supply the transmission clock to the uart: timer 1 and the internal baud rate generator as detailed below 4.9.2. baud rate for mode 0 the transmission clock is either the internal baud rate generator or the internal fixed prescaler . this selection is done by setting bit src in bdrcon register. the transmission clock is shown in figure 4.5. tsc 80251a1 rev.b (20/09/96) ii. 4.9 ma tra mhs by default, after a reset, the bit src is cleared and the transmission clock is compatible with 80c51 microcontrollers. setting this bit to one, selects the internal baud rate generator . the 8bit register brl is the reload register of the baud rate generator. 4.9.3. transmission clock selection when src = 0, the baud rate is fully compatible with 80c51 microcontrollers. the 1/12 clock frequency supplies the baud rate: baud_rate = f osc/12 when src = 1, the baud rate generator is selected and is variable in two ranges: when spd = 1, the fast mode is selected: baud_rate = fosc/[4x(256brl)] when spd = 0, the slow mode is selected: baud_rate = fosc/[24x(256brl)]. spd=0 brr src spd osc 2 6 2 brg spd=1 uart src=0 src=1 brl figure 4.5. clock transmission sources in mode 0 4.9.4. baud rate for modes 1 and 3 two baud rate generators can supply the baud rate to the uart: timer 1 and the internal baud rate generator. it is possible to have two different transmission clocks for the transmission and reception. 4.9.4.1. timer 1 when t imer 1 is used as baud rate generator , the baud rates in modes 1 and 3 are determined by the timer 1 overflow and the value of smod1 as follows: mode 1 and 3, baud_rate 2 smod1 f osc 12 32 [ 256 ( th1 )] and if the baud rate is known the value of th1 is: th1 256 2 smod1 f osc 384 baud_rate the configuration is shown in figure 4.6. 2 tsc 80251a1 rev.b (20/09/96) ii. 4.10 ma tra mhs t1 gate0 control c/t1=1 tr1 int0# tl1 osc 12 2 smod1=0 smod1=1 th1 timer1_br g c/t1=0 smod1 figure 4.6. timer 1 as baud rate generator in modes 1 and 3 4.9.4.2. internal baud rate generator when the internal baud rate generator is used, the baud rates are determined by the brg overflow , the value of spd bit (speed mode) and the value of the smod1 bit (serial mode). baud_rate 2 smod1 f osc 2 32 [ 256 ( brl )] brl 256 2 smod1 f osc 64 baud_rate if the slow mode is selected (spd = 0, default mode), the baud rate is as follows: baud_rate 2 smod1 f osc 12 32 [ 256 ( brl )] brl 256 2 smod1 f osc 384 baud_rate the configuration is shown in the figure 4.7. osc 2 brr spd 6 spd=0 spd=1 2 smod1=0 smod1=1 brl brg int_brg smod1 figure 4.7. internal baud rate generator in modes 1 and 3 baud_rate 2 smod1 f osc 64 tsc 80251a1 rev.b (20/09/96) ii. 4.11 ma tra mhs 4.9.4.3. baud rate selection the baud rate generator for transmit and receive clocks can be selected separately via the bdrcon register (see figure 4.10. ) figure 4.8. gives the configuration of rbck and tbck bits to select the source of rx clock and tx clock. 16 16 rbck = 1 tbck = 1 timer1_brg tx clock int_brg tbck tbck = 0 rx clock int_brg rbck rbck = 0 timer1_brg figure 4.8. baud rate generator selection 4.9.5. baud rate for mode 2 the baud rate in mode 2 depends on the value of smod1 bit in pcon register. if smod1 = 0 (default value on reset), the baud rate is 1/64 the oscillator frequency . if smod1 = 1, the baud rate is 1/32 the oscillator frequency. the formula is given below: the configuration is shown in figure 4.9. 2 smod1 = 1 osc 2 uart smod1 = 0 smod1 16 figure 4.9. uart in mode 2 2 tsc 80251a1 rev.b (20/09/96) ii. 4.12 ma tra mhs 4.10. registers bdrcon (9bh) baud rate control register brr tbck rbck spd src 76543210 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 brr baud rate run control bit clear to stop the baud rate set to start the baud rate 3 tbck transmission baud rate generator selection bit clear to select t imer 1 for the baud rate generator set to select internal baud rate generator 2 rbck reception baud rate generator selection bit clear to select t imer 1 for the baud rate generator set to select internal baud rate generator 1 spd baud rate speed control bit clear to select the slow baud rate generator when src = 0 set to select the fast baud rate generator when src = 1 0 src baud rate source select bit in mode 0 = 1, selects the internal baud rate generator, = 0, selects teh 1/12 clock as the baud rate generator (fixed transmission clock in mode 0) reset value = xxx0 0000b figure 4.10. bdrcon register tsc 80251a1 rev.b (20/09/96) ii. 4.13 ma tra mhs brl (9ah) baud rate reload register (8bit) 76543210 reset value = 0000 0000b figure 4.11. brl register saddr (0a9h) serial address register 76543210 reset value = 0000 0000b figure 4.12. saddr register saden (0b9h) serial address enable register 76543210 reset value = 0000 0000b figure 4.13. saden register sbuf (099h) serial buffer register 76543210 reset value = xxxx xxxxb figure 4.14. sbuf register 2 tsc 80251a1 rev.b (20/09/96) ii. 4.14 ma tra mhs scon (098h) serial control register fe/sm0 ovr/sm1 sm2 ren tb8 rb8 ti ri 76543210 bit number bit mnemonic description 7 fe sm0 framing error bit t o select this function, set smod0 bit in pcon register . set by hardware to indicate an invalid stop bit. must be cleared by software. serial port mode bit 0 to select this function, clear smod0 bit in pcon register. software writes to bits sm0 and sm1 to select the serial port operating mode. refer to sm1 bit for the mode selections. 6 ovr sm1 overrun err or bit t o select this function, set smod0 bit in pcon register . set by hardware to indicate an overwrite of the receive buffer. must be cleared by software serial port mode bit 1 to select this function, clear smod0 bit in pcon register. software writes to bits sm1 and smo to select the serial port operating mode. smo sm1 mode description baud rate 0 0 0 shift register f osc /12 or variable if src bit bdrcon register is set 01 1 8bit uar t variable 10 2 9bit uar tf osc /32 or f osc /64 11 3 9bit uar t variable 5 sm2 serial port mode bit 2 software writes to bit sm2 to enable and disable the multiprocessor communication and automatic address recognition features. this allows the serial port to differentiate between data and command frames and to recognize slave and broadcast addresses. 4 ren receiver enable bit clear to enable transmission. set to enable reception. 3 tb8 transmit bit 8 modes 0 and 1: not used. modes 2 and 3: software writes the ninth data bit to be transmitted to tb8. 2 rb8 receiver bit 8 mode 0: not used. mode 1 (sm2 cleared): set or cleared by hardware to reflect the stop bit received. modes 2 and 3 (sm2 set): set or cleared by hardware to reflect the ninth bit received. 1 ti transmit interrupt flag set by the transmitter after the last data bit is transmitted. must be cleared by software. 0 ri receive interrupt flag set by the receiver after the stop bit of a frame has been received. must be cleared by software. reset value = 0000 0000b figure 4.15. scon register tsc 80251a1 rev. b (20/09/96) ii. 5.1 matra mhs 5.1. introduction this chapter describes the pulse measurement unit (pmu) which allows to measure the width and the period of pulses. it is useful for each application using a smart analog sensor which provide a pulse width modulated information. with standard peripherals, measuring both the period and the width of pulses series involve two timers, hence two i/o port lines. the pmu is specially designed to measure the period and the width of pulses using only one timer and one i/o port line. compared to the standard solution, this new one saves one i/o port line. 5.2. description just after reset, the pulse measurement mode selection bit (pmmod) bit is equal to zero which places the pmu in test mode (pmu register, see figure 5.13. ). this bit must be set to one before any pmu configuration, otherwise the tsc80251a1 behavior is unpredictable. the pmu includes three identical modules, as shown in figure 5.1. each module features one pulse measurement input (pmin) connected to one pin of port 1 which provides the pulses to measure. the internal oscillator provide a clock reference common to all the modules to count cycles between pulse edges. when a new measurement is detected, the corresponding pulse measurement finished flag (pmfn) is set. however, if the pmu timer overflows before the measurement completion, the corresponding pmu overflow flags (pmvn) is set. when any of these flags is set, the pmu interrupt request which is shared by the three modules is sent to the interrupt system (see is in section 9). pmu interrupt request osc 2 pmv2 pmi2/p1.7 pmu module 1 pmf1 pmv1 pmv0 pmi1/p1.6 pmu module 0 pmi0/p1.5 pmu module 2 pmf0 pmf2 figure 5.1. pmu block diagram pulse measurement unit 2 tsc 80251a1 rev. b (20/09/96) ii. 5.2 matra mhs the pmu module structure is detailed in figure 5.2. each module features its own 8bit pulse measurement prescaler (pmscaln) which allows to adapt the pmu time base to the sensor. if the pmscaln value is well chosen, the pmpern value will be comprised between 128 and 255. using the tsc80251a1 at its nominal speed, the prescaler then allows to achieve a measurement accuracy better than 1% while managing wave periods ranging from 20 s to 1 ms. the pwm ratio is simply obtained by dividing the 8bit pmu width value (pmwidn) by the 8bit pmu period value (pmpern). as shown on figure 5.3. , the timer is set to zero at the beginning of one measurement, hence the errors on the pmpern value and on the pmwidn value are both negative (+0/1 lsb). however, due to the division, the maximum relative error on the pwm ratio then will be +/1 lsb. pmin 2 osc load rst 8bit timer 8bit pmpern load load 8bit pmwidn pmscaln pmrn clk 8bit temp register pmen pmcon pmfn pmvn pmstat figure 5.2. pmu module n (n = 0, 1, 2) pmfn pmin pmpern pmwidn timer 00 wn1 period tn wn temporary register wn1 wn tn1 tn width wn reset by the interrupt service routine figure 5.3. pmu measurement tsc 80251a1 rev. b (20/09/96) ii. 5.3 matra mhs all the status information regarding each module are gathered in the pulse measurement status register (pmstat, see figure 5.12. ). when an overflow occurs in one pmu, its pmscaln value must be increased to slow down the pmu time base until the measured period is less than 256 pmu time base clock cycles. the pulse measurement control register (pmcon, see figure 5.5. ) allows to enable or disable each pmu module operation through the pulse measurement run control bits (pmrn, n = 0, 1, 2). when pmun is stopped, its timer is disabled and its pmpern and pmwidn registers are frozen. when pmun is running, its pmpern and pmwidn registers are periodically updated. hence, in order to get a consistent measurement from pmun (i.e. pmpern and pmwidn values relating to the same period), its flags must be reset by software before any measurement and its measurement must be read as soon as possible after completion (i.e. when pmfn is set and before the end of the next period). when pmun overflows, it should be stopped before resetting its flag to prevent a false measurement update if the measurement is not yet completed. the pmcon register also allows to define the input polarity for each pmu through the pulse measurement edge select bits (pmen). the width measurement is performed either on the low level or the high level state as shown on figure 5.4. period width width period (pmen = 0) (pmen = 1) pmin figure 5.4. pulse measurement polarity 2 tsc 80251a1 rev. b (20/09/96) ii. 5.4 matra mhs 5.3. registers pmcon (0adh) pulse measurement control register pme2 pme1 pme0 pmr2 pmr1 pmr0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 pme2 pulse measurement 2 edge select bit clear this bit to start pmu module n (n = 2) on falling edge. set this bit to start pmu module n (n = 2) on rising edge . 5 pme1 pulse measurement 1 edge select bit clear this bit to start pmu module n (n = 1) on falling edge. set this bit to start pmu module n (n = 1) on rising edge . 4 pme0 pulse measurement 0 edge select bit clear this bit to start pmu module n (n = 0) on falling edge. set this bit to start pmu module n (n = 0) on rising edge . 3 reserved the value read from this bit is indeterminate. do not set this bit. 2 pmr2 pulse measurement 2 run control bit clear this bit to stop pmu module n (n = 2). set this bit to start pmu module n (n = 2) . 1 pmr1 pulse measurement 1 run control bit clear this bit to stop pmu module n (n = 1). set this bit to start pmu module n (n = 1) . 0 pmr0 pulse measurement 0 run control bit clear this bit to stop pmu module n (n = 0). set this bit to start pmu module n (n = 0) . reset value = x000 x000b figure 5.5. pmcon register pmper0 (0a2h) pulse measurement period register 0 (8bit read only) 7 6 5 4 3 2 1 0 reset value = x000 x000b figure 5.6. pmper0 register tsc 80251a1 rev. b (20/09/96) ii. 5.5 matra mhs pmper1 (0a4h) pulse measurement period register 1 (8bit read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.7. pmper1 register pmper2 (0a6h) pulse measurement period register 2 (8bit read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.8. pmper2 register pmscal0 (0aah) pulse measurement prescaler register (8bit) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.9. pmscal0 register pmscal1 (0abh) pulse measurement prescaler register (8bit) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.10. pmscal1 register pmscal2 (0ach) pulse measurement prescaler register (8bit) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.11. pmscal2 register 2 tsc 80251a1 rev. b (20/09/96) ii. 5.6 matra mhs pmstat (0aeh) pulse measurement status register pmv2 pmv1 pmv0 pmf2 pmf1 pmf0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 pmv2 pmu overflow flag set by hardware when an overflow of the counter has occured during the pulse measurement. must be cleared by software. 5 pmv1 pmu overflow flag set by hardware when an overflow of the counter has occured during the pulse measurement. must be cleared by software. 4 pmv0 pmu overflow flag set by hardware when an overflow of the counter has occured during the pulse measurement. must be cleared by software. 3 reserved the value read from this bit is indeterminate. do not set this bit. 2 pmf2 pulse measurement flag cleared by hardware when pmu module 2 is stopped. set by hardware when pmu module 2 detects a transition. must be cleared by software to allow a new measurement. 1 pmf1 pulse measurement flag cleared by hardware when pmu module 1 is stopped. set by hardware when pmu module 1 detects a transition. must be cleared by software to allow a new measurement. 0 pmf0 pulse measurement flag cleared by hardware when pmu module 0 is stopped. set by hardware when pmu module 0 detects a transition. must be cleared by software to allow a new measurement. reset value = x000 x000b figure 5.12. pmstat register tsc 80251a1 rev. b (20/09/96) ii. 5.7 matra mhs pmu (09fh) pulse measurement unit mode control register pmu.0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 reserved the value read from this bit is indeterminate. do not set this bit. 3 reserved the value read from this bit is indeterminate. do not set this bit. 2 reserved the value read from this bit is indeterminate. do not set this bit. 1 reserved the value read from this bit is indeterminate. do not set this bit. 0 pmmod pulse measurement unit must be set to one before any pmu configuration, otherwise the tsc80c251a1 behavior is unpredictable. reset value = xxxx xxx0b figure 5.13. pmu register pmwid0 (0a3h) pulse measurement width register (8bit read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxx0b figure 5.14. pmwid0 register 2 tsc 80251a1 rev. b (20/09/96) ii. 5.8 matra mhs pmwid1 (0a5h) pulse measurement width register (8bit read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.15. pmwid1 register pmwid2 (0a7h) pulse measurement width register (8bit, read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 5.16. pmwid2 register tsc 80251a1 rev. b (20/09/96) ii. 6.1 matra mhs 6.1. introduction this chapter describes the event and waveform controller (ewc) which is a superset of the programmable counter array (pca) found in some 80c51 microcontrollers. this is an onchip peripheral of the tsc80251a1 which performs a variety of timing and counting operations, including pulse width modulation (pwm). the ewc can be configured in two modes: pca enhanced pca (epca) the pca mode has up to five compare/capture modules using the same time base and event counter. the epca mode has the compare/capture modules using their own time base and event counter. the ewc also provides the capability for a software watchdog timer (wdt). 6.2. features compatible with pca: programmable counter array (pca mode) enhanced pca (epca mode) programmable counter mode with 8bit parallel output on port 1 (external counter mode) five 16bit counter five 16bit compare/capture modules the last module can also be programmed as a watchdog timer (wdt) each module may use up to seven clock sources: 1/12 of the clock frequency 1/4 of the clock frequency timer 0 overflow (modes 1, 2 and 3 ) external input on eci (p1.2) f osc /2 (epca mode) timer 1 overflow (epca mode) baud rate generator (epca mode) each module can be programmed in any of the following modes: rising and/or falling edge capture software timer high-speed output pulse width modulation (pwm) event and waveform controller 2 tsc 80251a1 rev. b (20/09/96) ii. 6.2 matra mhs 6.3. pca mode 6.3.1. timers/counters figure 6.2. depicts the basic logic of the timer/counter portion of the pca. the ch/cl special function register pair operates as a 16bit timer/counter. the selected input increments cl (low byte) register. when cl overflows, ch (high byte) register increments after two oscillator periods; when ch overflows, it sets the pca overflow flag (cf in ccon register) generating a pca interrupt request if ecf bit in cmod register is set. cps1 and cps0 bits in cmod register select one of four signals as the input to the timer/counter (see figure 6.2. ): f osc /12 provides a clock pulse at s5p2 of every peripheral cycle. with f osc = 16 mhz, the timer/counter increments every 750 ns. f osc /4 provides clock pulses at s1p2, s3p2, and s5p2 of every peripheral cycle. with f osc = 16 mhz, the timer/counter increments every 250 ns. timer 0 overflow the cl register is incremented at s5p2 of the peripheral cycle when timer 0 overflows. this selection provides the pca with a programmable frequency input. external signal on port 1.2/eci the cpu samples the eci pin at s1p2, s3p2 and s5p2 of every peripheral cycle. the first clock pulse (s1p2, s3p2 or s5p2) that occurs following a hightolow transition at the eci pin increments the cl register. the maximum input frequency for this input selection is f osc /8. setting the run control bit (cr in ccon register) turns the pca timer/counter on, if the output of the nand gate (see figure 6.2. ) equals logic 1. the pca timer/counter continues to operate during idle mode unless cidl bit of cmod register is set. cpu can read the contents of ch and cl registers at any time. however, writing to them is inhibited while they are counting i.e., when cr bit is set. tsc 80251a1 rev. b (20/09/96) ii. 6.3 matra mhs ch (8 bits) processor in idle mode cf ewc interrupt ecf timer/counter cr cidl f osc/2 f osc/4 timer 0 p1.2/eci 00 01 10 11 cl (8 bits) cps1 cps0 cmod module 0 module 1 module 2 module 3 module 4 cmod figure 6.1. ewc timer/counter in pca mode 6.3.2. compare/capture modules each compare/capture module is made up of a compare/capture register pair (chx/clx; x = 0, 1, 2, 3, 4), a 16bit comparator and various logic gates and signal transition selectors. the registers store the time or count at which an external event occurred (capture) or at which an action should occur (comparison). for example, in the pwm mode, the lowbyte register counter the duty cycle of the output waveform. the logical configuration of a compare/capture module controls depends on its mode of operation. each module can be independently programmed for operation in any of the following modes: 16bit capture mode with triggering on the positive edge, negative edge or either edge compare modes: 16bit software timer 16bit highspeed output 16bit watchdog timer (module 4 only) 8bit pulse width modulation the compare function provides the capability for operating the five modules as timers, event counters or pulse width modulators. four modes employ the compare function: 16bit software timer mode, highspeed output mode, wdt mode and pwm mode. in the first three of these, the compare/capture module continuously compares the 16bit pca timer/counter value with the 16bit value preloaded into the module's ccapxh/ccapxl register pair. in the pwm mode, the module continuously compares the value in the lowbyte pca timer/counter register (cl) with an 8bit value in the ccapxl module register. comparisons are made three times per peripheral cycle to match the fastest pca timer/counter clocking rate (f osc /4). 2 tsc 80251a1 rev. b (20/09/96) ii. 6.4 matra mhs setting ecomx bit in a module's mode register (ccapmx) selects the compare function for that module. to use the modules in the compare modes, observe the following general procedure: select the module's mode of operation. select the input signal for the pca timer/counter. load the comparison value into the module's compare/capture register pair. set the pca timer/counter run counter bit. after a match causes an interrupt, clear the module's compare/capture flag. no operation bit combinations programmed into a compare/capture module's mode register (ccapmx) determine the operation mode. figure 6.10. provides bit definition and table 6.3. lists the bit combinations of the available modes. other bit combinations are invalid and produce undefined results. the compare/capture modules perform their programmed functions when their common time base, the pca timer/counter, runs. the timer/counter is turned on and off with cr bit in ccon register. to disable any given module, program it for the ano operationo mode. the occurrence of a capture, software timer, or highspeed output event in a compare/capture module sets the module's compare/capture flag (ccfx) in ccon register and generates a pca interrupt request if the corresponding enable bit in ccapmx register is set. the cpu can read or write ccapxh and ccapxl registers at any time. table 6.1. pca module modes ecomx cappx capnx matx togx pwmx eccfx module mode 0 0 0 0 0 0 0 no operation x (2) 1 0 0 0 0 x (2) 16bit capture on positiveedge trigger at cexx x (2) 0 1 0 0 0 x (2) 16bit capture on negativeedge trigger at cexx x (2) 1 1 0 0 0 x (2) 16-bit capture on positive/negative-edge trigger at cexx 1 0 0 1 0 0 x (2) compare: software timer 1 0 0 1 1 0 x (2) compare: highspeed output 1 0 0 0 0 1 0 compare: 8bit pwm 1 0 0 1 x (2) 0 x (2) compare: pca wdt (ccapm4 only) (3) notes: 1. this table shows the ccapmx register bit combinations for selecting the operating modes of the pca compare/capture modules. other bit combinations are invalid. 2. x = indetermined; x = 0, 1, 2, 3, 4. 3. for the pca wdt mode, set also wdte bit in cmod register to enable the reset output signal. 6.3.2.1. 16-bit capture mode the capture mode (see figure 6.16. ) provides the pca with the ability to measure periods, pulse widths, duty cycles and phase differences at up to five separate inputs. external i/0 pins cexo through cex4 are sampled for signal transitions (positive and/or negative as specified). when a tsc 80251a1 rev. b (20/09/96) ii. 6.5 matra mhs compare/capture module programmed for the capture mode detects the specified transition, it captures the pca timer/counter value. this records the time at which an external event is detected, with a resolution equal to the timer/counter clock period. to program a compare/capture module for the 16bit capture mode, program the cappx and capnx bits in the module's ccapmx register as follows: to trigger the capture on a positive transition, set cappx and clear capnx to trigger the capture on a negative transition, set capnx and clear cappx to trigger the capture on a positive or negative transition, set both cappx and capnx table 6.3. lists the bit combinations for selecting module modes. for modules in the capture mode, detection of a valid signal transition at the i/o pin (cexx) causes hardware to load the current pca timer/counter value into the compare/capture registers (ccapxh/ccapxl) and to set the module's compare/capture flag (ccfx) in the ccon register. if the corresponding interrupt enable bit (eccfx) in the ccapmx register is set, a the pca sends an interrupt request to the ewc interrupt handler. since hardware does not clear the event flag when the interrupt is processed, the user must clear the flag by software. a subsequent capture by the same module overwrites the existing captured value. to preserve a captured value, save it in ram with the interrupt service routine before the next capture event occurs. cex x = 0, 1, 2, 3, 4 pca timer/counter count input ch (8bits) cl (8bits) ccapxh ccapxl ccfx ccon register enable ewc interrupt capture 0 cappx capnx 0 0 0 eccfx 70 ccapmx mode register (x = 0, 1, 2, 3, 4) figure 6.2. pca 16bit capture mode 2 tsc 80251a1 rev. b (20/09/96) ii. 6.6 matra mhs 6.3.2.2. 16bit software timer mode to program a compare/capture module for the 16bit software timer mode (see figure 6.3. ), set the ecomx and matx bits in the module's ccapmx register. table 6.3. lists the bit combinations for selecting module modes. a match between the pca timer/counter and the compare/capture registers (ccapxh/ccapxl) sets the module's compare/capture flag (ccfx in ccon register). this generates an interrupt request if the corresponding interrupt enable bit (eccfx in ccapmx register) is set. since hardware does not clear the compare/capture flag when the interrupt is processed, the user must clear the flag in software. during the interrupt routine, a new 16bit compare value can be written to the compare/capture registers (ccapxh/ccapxl). ccapxl (8 bits) ccapxh (8 bits) ecomx 0 0 matx togx 0 eccfx 70 ccapmx mode register ch (8 bits) cl (8 bits) 16-bit comparator match count enable ccfx ccon enable ewc interrupt cexx compare/capture module pca timer/counter a0o a1o reset write to ccapxl write to ccapxh x = 0, 1, 2, 3, 4 for software timer mode, set ecomx and matx. for high speed output mode, set ecomx, matx and togx. toggle figure 6.3. pca software timer and highspeed output modes note: to prevent an invalid match while updating these registers, user software should write to ccapxl first, then ccapxh. a write to ccapxl clears the ecomx bit disabling the comparefunction, while a write to ccapxh sets the ecomx bit reenabling the compare function. 6.3.2.3. high-speed output mode the highspeed output mode (see figure 6.3. ) generates an output signal by toggling the module's i/0 pin (cexx) when a match occurs. this provides greater accuracy than toggling pins in software because the toggle occurs before the interrupt request is serviced. thus, interrupt response time does not affect the accuracy of the output. to program a compare/capture module for the highspeed output mode, set the ecomx, matx, togx bits in the module's ccapmx register. table 6.3. lists the bit combinations for selecting module modes. a match between the pca timer/counter and the compare/capture registers (ccapxh/ccapxl) toggles the cexx pin and sets the module's compare/capture flag (ccfx in tsc 80251a1 rev. b (20/09/96) ii. 6.7 matra mhs ccon register). by setting or clearing the cexx pin in software, the user selects whether the match toggles the pin from low to high or vice versa. 6.3.2.4. watchdog timer mode a watchdog timer (wdt) provides the means to recover from routines that do not complete successfully. a wdt automatically invokes a device reset if it does not regularly receive holdoff signals. watchdog timers are used in applications that are subject to electrical noise, power glitches, electrostatic discharges, etc., or where high reliability is required. the pca provides a 16bit programmable frequency wdt as a mode option on compare/capture module 4. this mode generates a device reset when the count in the pca timer/counter matches the value stored in the module 4 compare/capture registers. a pca wdt reset has the same effect as an external reset. module 4 is the only pca module that has the wdt mode (see figure 6.18. ). when not programmed as a wdt, it can be used in the other modes. to program module 4 for the pca wdt mode: set ecom4 and mat4 bits in ccapm4 register and wdte bit in cmod register. table 6.3. lists the bit combinations for selecting module modes. select the desired input for the pca timer/counter by programming cps0 and cps1 bits in cmod register (see figure 6.15. ). enter a 16bit comparison value in the compare/capture registers (ccap4h/ccap4l). enter a 16bit initial value in the pca timer/counter (ch/cl) or use the reset value (0000h). the difference between these values multiplied by the pca input pulse rate determines the running time to oexpiration.o set the timer/counter run counter bit (cr in ccon register) to start the pca wdt. the pca wdt generates a reset signal each time a match occurs. to hold off a pca wdt reset, the user has three options: periodically change the comparison value in ccap4h/ccap4l so a match never occurs. periodically change the pca timer/counter value so a match never occurs. disable the module 4 reset output signal by clearing wdte bit before a match occurs, then later reenable it. the first two options are more reliable because the watchdog timer is not disabled as in the third option. the second option is not recommended if other pca modules are in use, since the five modules share a common time base. thus, in most applications the first option is the best one. 2 tsc 80251a1 rev. b (20/09/96) ii. 6.8 matra mhs ch (8 bits) cl (8 bits) ccapxh (8 bits) ccapxl (8 bits) 16-bit comparator match ecom4 0 0 1 0 70 ccapm4 mode register count enable compare/capture module pca timer/counter a0o a1o reset write to ccap4l write to ccap4h for software timer mode, set ecomx and mat x for high speed output mode, set ecomx, m a togx. wdte cmod.6 pca wdt reset figure 6.4. pca watchdog timer mode 6.3.2.5. pulse width modulator mode the five pca compare/capture modules can be independently programmed to function as pulse width modulators (pwm). the modulated output, which has an 8bit pulse width resolution is available on cexx pin. the pwm output can be used to convert digital data to an analog signal with simple external circuitry. in this mode, the value in the low byte of the pca timer/counter (cl) is continuously compared with the value in the low byte of the compare/capture register (ccapxl; x = 0, 1, 2, 3, 4). when cl < ccapxl, the output waveform is low (see figure 6.20. ). when a match occurs (cl = ccapxl), the output waveform goes high and remains high until cl register rolls over from ffh to 00h, ending the period. at rollover the output returns to low, the value in ccapxh register is loaded into ccapxl register, and a new period begins. the value in ccapxl register determines the duty cycle of the current period. the value in ccapxh register determines the duty cycle of the following period. changing the value in ccapxl over time modulates the pulse width. as depicted in figure 6.20. , the 8bit value in ccapxl can vary from 0 (100% duty cycle) to 255 (0.4% duty cycle). tsc 80251a1 rev. b (20/09/96) ii. 6.9 matra mhs to program a compare/capture module for the pwm mode: set ecomx and pwmx bits in the module's ccapmx register. table 6.3. lists the bit combinations for selecting module modes. select the desired input for the pca timer/counter by programming cps0 and cps1 bits in cmod register. enter an 8bit value in ccapxl to specify the duty cycle of the first period of the pwm output waveform. enter an 8bit value in ccapxh to specify the duty cycle of the second period. set the timer/counter run counter bit (cr in ccon register) to start the pca timer/counter. note: to change the value in ccapxl without glitches, write the new value to the high byte register (ccapxh). this value is shifted by hardware into ccapxl when cl rolls over from ffh to 00h. the frequency of the pwm output equals the frequency of the pca timer/counter input signal divided by 256. the highest frequency occurs when the f osc /4 input is selected for the pca timer/counter. for f osc = 16 mhz, this is 15.6 khz. cl rollover from ffh to 00h loads ccapxh contents into ccapxl ccapxl ccapxh 8-bit comparator cl (8 bits) a0o a1o cl < ccapxl cl >= ccapxl cex x = 0, 1, 2 or 4 ecomx 0 0 0 0 pwmx 0 7 0 ccapmx mode register figure 6.5. pwm mode 2 tsc 80251a1 rev. b (20/09/96) ii. 6.10 matra mhs ccapxl duty cycle 1 output waveform 255 0.4% 0 230 10% 0 1 0 128 50% 0 1 0 25 90% 0 1 0 1 0 100% 1 0 figure 6.6. pwm variable duty cycle 6.4. enhanced pca mode the enhanced pca mode (epca) provides all the pca functionalities with additional features. it has the five compare/capture modules using their own epca timer/counter. one timer/counter and its capture/compare module form an epca unit. these five epca units may be linked to form a time base array (tba). the epca mode is enabled by epca bit in crc register. after reset, epca mode is disabled and the ewc is configured in pca mode. please notice that the external counter mode (see figure 6.42. ) takes precedence over the epca mode and should be disabled to have the epca working. tsc 80251a1 rev. b (20/09/96) ii. 6.11 matra mhs 6.4.1. timers/counters epca mode features five identical timers/counters instead of one in pca mode. each timer/counter is dedicated to one module. the structure of the epca unit is shown on figure 6.3. epca timers/counters are very similar to pca timer/counter. the behavior of the capture/compare module is exactly the same as in pca mode. all the differences are highlighted below: independent counter high and counter low registers (chx and clx; x = 0, 1, 2, 3, 4). in fact, in epca mode, cl is used as cl0 and ch is used as ch0. independent counter run counter bits (crx; x = 0, 1, 2, 3, 4). these flags are gathered in the counter run counter register (crc). cr bit of ccon register is not used in epca mode. independent counter idle counter bits (cidlx; x = 0, 1, 2, 3, 4). these flags are in the counter mode registers (cmodx; x = 1, 2, 3). cidl bit of cmod register is not used in epca mode. up to seven different clock sources instead of four. they are selected independently for each timer/counter by the count pulse select bits (cpx(2:0); x = 0, 1, 2, 3, 4). three bits encode seven possible choice and one reserved. if cpx2 = 0, cpx(1:0) is performing the same selection as would cps1:0 in pca mode. the three new choices are provided by cpx2 set to one: fastest clock: f osc /4 is selected by cpx(1:0)=00. timer 1 overflow: timer 1 is selected by cpx(1:0)=01. baud rate generator: it is selected by cpx(1:0)=11. independent counter overflow flags (cfx; x = 0, 1, 2, 3, 4). these flags are gathered in the counter overflow flag register (cof). cf bit of ccon register is not used in epca mode. when a flag is set, it produces an ewc interrupt request if the corresponding enable counter overflow flag (ecfx; x = 0, 1, 2, 3, 4) is set. these flags are gathered in the enable counter overflow flag register (ecof). ecf bit of cmod register is not used in epca mode. they must be cleared by software. four independent compare/capture interrupt request for ccfx (x = 1, 2, 3, 4). each of them has its own interrupt vector (see ainterrupt systemo chapter). nevertheless ccf0 bit shares the general ewc interrupt request with the counter overflow flags (cfx; x = 0, 1, 2, 3, 4). all ccfx (x = 0, 1, 2, 3, 4) bits are gathered in ccon register as in pca mode. the enable ccfx interrupt bits (eccfx; x = 0, 1, 2, 3, 4) are in the compare/capture module mode registers (ccapmx; x = 0, 1, 2, 3, 4) which works exactly the same as in pca mode. 2 tsc 80251a1 rev. b (20/09/96) ii. 6.12 matra mhs cpn0 cpn2 chn (8 bits) processor in idle mode cfn ewc interrupt ecfn capture/compare modules n timer/counter crn cidl f osc/12 f osc/4 timer 0 p1.2/eci 000 001 010 011 cln (8 bits) cpn1 100 101 110 111 f osc/2 timer 1 reserved brg cmodx (x = 1, 2, 3) ccfn ewcn interrupt module (n = 1, 2, 3, 4) eccfn cof cie ccon ccapmn cp00 cp02 ch0 (8 bits) processor in idle mode cf0 ewc interrupt ecf0 capture/compare module 0 timer/counter cr0 cidl f osc/12 f osc/4 timer 0 p1.2/eci 000 001 010 011 cl0 (8 bits) cp01 100 101 110 111 f osc/2 timer 1 reserved brg ccf0 module 0 eccf0 cmod ccapm0 cof cie ccon figure 6.7. ewc timer/counter in epca mode tsc 80251a1 rev. b (20/09/96) ii. 6.13 matra mhs 6.5. registers ccap0h (0fah) ccap1h (0fbh) ccap2h (0fch) ccap3h (0fdh) ccap4h (0feh) compare/capture module x (x = 0, 1, 2, 3, 4) high registers 7 6 5 4 3 2 1 0 reset value = 0000 0000b figure 6.8. ewc ccapxh registers (x = 0, 1, 2, 3, 4) ccap0l (0eah) ccap1l (0ebh) ccap2l (0ech) ccap3l (0edh) ccap4l (0eeh) compare/capture module x (x = 0, 1, 2, 3, 4) low registers 7 6 5 4 3 2 1 0 reset value = 0000 0000b figure 6.9. ewc ccapxl registers (x = 0, 1, 2, 3, 4) 2 tsc 80251a1 rev. b (20/09/96) ii. 6.14 matra mhs ccapm0 (0dah) ccapm1 (0dbh) ccapm2 (0dch) ccapm3 (0ddh) ccapm4 (0deh) compare/capture module x (x = 0, 1, 2, 3, 4) mode registers ecomx cappx capnx matx togx pwmx eccfx 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 ecomx enable compare mode bit clear to disable the compare function. set to enable the compare function. the compare function is used to implement the software timer, high-speed output, pwm and wdt modes. 5 cappx capture mode (positive) bit clear to disable the capture function triggered by a positive edge on cexx pin. set to enable the capture function triggered by a positive edge on cexx pin. 4 capnx capture mode (negative) bit clear to disable the capture function triggered by a negative edge on cexx pin. set to enable the capture function triggered by a negative edge on cexx pin. 3 matx match bit set by hardware when a match of the pca timer/counter with the compare/capture register sets the ccfx bit in the ccon register, flagging an interrupt. must be cleared by software. 2 togx toggle bit the toggle mode is configured by setting ecomx, matx and togx bits. set by hardware when a match of the pca timer/counter with the compare/capture register toggles the cexx pin. must be cleared by software. 1 pwmx pulse width modulation mode bit set to configure the module for operation as an 8-bit pulse width modulator with output waveform on cexx pin. must be cleared by software. 0 eccfx enable ccfx interrupt bit set to enable compare/capture flag ccfx in ccon register to generate an interrupt request. must be cleared by software. reset value = x000 0000b figure 6.10. ewc ccapmx (x = 0, 1, 2, 3, 4) registers tsc 80251a1 rev. b (20/09/96) ii. 6.15 matra mhs ccon (0d8h) timer/counter control register cf cr ccf4 ccf3 ccf2 ccf1 ccf0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 cf pca timer/counter overflow flag set by hardware when the pca timer/counter rolls over. this generates a pca interrupt request if the ecf interrupt enable bit in cmod register is set. cf can be set by hardware or software but must be cleared by software. 6 cr pca timer/counter run control bit clear to turn the pca timer/counter off. set to turn the pca timer/counter on. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 ccf4 pca module 4 compare/capture flag set by hardware when a match or capture occurs. this generates a pca interrupt request if the eccf4 interrupt enable bit in the corresponding ccapm4 register is set. must be cleared by software. 3 ccf3 pca module 3 compare/capture flag set by hardware when a match or capture occurs. this generates a pca interrupt request if the eccf3 interrupt enable bit in the corresponding ccapm3 register is set. must be cleared by software. 2 ccf2 pca module 2 compare/capture flag set by hardware when a match or capture occurs. this generates a pca interrupt request if the eccf2 interrupt enable bit in the corresponding ccapm2 register is set. must be cleared by software. 1 ccf1 pca module 1 compare/capture flag set by hardware when a match or capture occurs. this generates a pca interrupt request if the eccf1 interrupt enable bit in the corresponding ccapm1 register is set. must be cleared by software. 0 ccf0 pca module 0 compare/capture flag set by hardware when a match or capture occurs. this generates a pca interrupt request if the eccf0 interrupt enable bit in the corresponding ccapm0 register is set. must be cleared by software. reset value = 00x0 0000b figure 6.11. ewc ccon register 2 tsc 80251a1 rev. b (20/09/96) ii. 6.16 matra mhs ch0=ch (0f9h) ch1 (0f4h) ch2 (0f5h) ch3 (0f6h) ch4 (0f7h) counter x (x = 0, 1, 2, 3, 4) high registers 7 6 5 4 3 2 1 0 reset value = 0000 0000b figure 6.12. ewc chx registers (x = 0, 1, 2, 3, 4) cie (0e3h) timer/counter interrupt enable register ecf4 ecf3 ecf2 ecf1 ecf0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 ecf4 enable counter 4 overflow bit clear to disable the interrupt generated by cf4 bit in cof register. set to enable cf4 bit in cof register to generate an interrupt. 3 ecf3 enable counter 3 overflow bit clear to disable the interrupt generated by cf3 bit in cof register. set to enable cf3 bit in cof register to generate an interrupt. 2 ecf2 enable counter 2 overflow bit clear to disable the interrupt generated by cf2 bit in cof register. set to enable cf2 bit in cof register to generate an interrupt. 1 ecf1 enable counter 1 overflow bit clear to disable the interrupt generated by cf1 bit in cof register. set to enable cf1 bit in cof register to generate an interrupt. 0 ecf0 enable counter 0 overflow bit clear to disable the interrupt generated by cf0 bit in cof register. set to enable cf0 bit in cof register to generate an interrupt. reset value = xxx0 0000b figure 6.13. ewc cie register tsc 80251a1 rev. b (20/09/96) ii. 6.17 matra mhs cl0=cl (0e9h) cl1 (0e4h) cl2 (0e5h) cl3 (0e6h) cl4 (0e7h) counter x (x = 0, 1, 2, 3, 4) low registers 7 6 5 4 3 2 1 0 reset value = 0000 0000b figure 6.14. ewc clx registers (x = 0, 1, 2, 3, 4) 2 tsc 80251a1 rev. b (20/09/96) ii. 6.18 matra mhs cmod (0d9h) counter mode register cidl wdte cps1 cps0 ecf 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 cidl counter idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 6 wdte watchdog timer enable bit clear to disable the watchdog timer function on ewc module 4. set to enable the watchdog timer function on ewc module 4. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 reserved the value read from this bit is indeterminate. do not set this bit. 3 reserved the value read from this bit is indeterminate. do not set this bit. 2 cps1 ewc count pulse select bits cps1 cps0 clock source 0 0 internal clock, fosc/12 1 cps0 0 1 internal clock, fosc/4 1 0 timer 0 overflow 1 0 external clock at eci/p1.2 pin (max. rate = fosc/8) 0 ecf enable counter overflow interrupt bit clear to disable the interrupt generated by cf bit in ccon register. set to enable cf bit in ccon register to generate an interrupt. figure 6.15. ewc cmod register tsc 80251a1 rev. b (20/09/96) ii. 6.19 matra mhs cmod1 (0dfh) counter 1 mode register cid1 cp12 cp11 cp10 cid0 cp02 cp01 cp00 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 cid1 timer/counter 1 idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 6 cp12 ewc module 1 count pulse select bits cp12 cp11 cp10 clock source 0 0 0 internal clock, fosc/12 5 cp11 , 0 0 1 internal clock, fosc/4 0 1 0 timer 0 overflow 0 1 1 external clock at eci/p1.2 pin (max. rate = fosc/8) 1 00 in te rn a l c l oc k , f osc/ 2 4 cp10 1 0 0 internal clock , fosc/2 1 0 1 timer 1 overflow 1 1 0 reserved 1 1 1 baud rate generator overflow 3 cid0 timer/counter 0 idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 2 cp02 ewc module 0 count pulse select bits cp02 cp01 cp00 clock source 0 0 0 internal clock, fosc/12 1 cp01 , 0 0 1 internal clock, fosc/4 0 1 0 timer 0 overflow 0 1 1 external clock at eci/p1.2 pin (max. rate = fosc/8) 1 00 in te rn a l c l oc k , f osc/ 2 0 cp00 1 0 0 internal clock , fosc/2 1 0 1 timer 1 overflow 1 1 0 reserved 1 1 1 baud rate generator overflow reset value = 0000 0000b figure 6.16. ewc cmod1 register 2 tsc 80251a1 rev. b (20/09/96) ii. 6.20 matra mhs cmod2 (0efh) counter 2 mode register cid3 cp32 cp31 cp30 cid2 cp22 cp21 cp20 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 cid3 timer/counter 3 idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 6 cp32 ewc module 3 count pulse select bits cp32 cp31 cp30 clock source 0 0 0 internal clock, fosc/12 5 cp31 , 0 0 1 internal clock, fosc/4 0 1 0 timer 0 overflow 0 1 1 external clock at eci/p1.2 pin (max. rate = fosc/8) 1 00 in te rn a l c l oc k , f osc/ 2 4 cp30 1 0 0 internal clock , fosc/2 1 0 1 timer 1 overflow 1 1 0 reserved 1 1 1 baud rate generator overflow 3 cid2 timer/counter 2 idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 2 cp22 ewc module 2 count pulse select bits cp22 cp21 cp20 clock source 0 0 0 internal clock, fosc/12 1 cp21 , 0 0 1 internal clock, fosc/4 0 1 0 timer 0 overflow 0 1 1 external clock at eci/p1.2 pin (max. rate = fosc/8) 1 00 in te rn a l c l oc k , f osc/ 2 0 cp20 1 0 0 internal clock , fosc/2 1 0 1 timer 1 overflow 1 1 0 reserved 1 1 1 baud rate generator overflow reset value = 0000 0000b figure 6.17. ewc cmod2 register tsc 80251a1 rev. b (20/09/96) ii. 6.21 matra mhs cmod3 (0ffh) counter 3 mode register cid4 cp42 cp41 cp40 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 reserved the value read from this bit is indeterminate. do not set this bit. 3 cid4 timer/counter 4 idle control bit clear to let the ewc running during idle mode. set to stop the ewc running when idle mode is invoked. 2 cp42 ewc module 4 count pulse select bits cp42 cp41 cp40 clock source 0 0 0 internal clock, fosc/12 1 cp41 , 0 0 1 internal clock, fosc/4 0 1 0 timer 0 overflow 0 1 1 external clock at eci/p1.2 pin (max. rate = fosc/8) 1 00 in te rn a l c l oc k , f osc/ 2 0 cp40 1 0 0 internal clock , fosc/2 1 0 1 timer 1 overflow 1 1 0 reserved 1 1 1 baud rate generator overflow reset value = 0000 0000b figure 6.18. ewc cmod3 register 2 tsc 80251a1 rev. b (20/09/96) ii. 6.22 matra mhs cof (0e1h) timer/counter overflow flag register cf4 cf3 cf2 cf1 cf0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 cf4 ewc timer/counter 4 overflow flag set by hardware when the counter rolls over. cf4 flags an interrupt if ecf4 bit in ecf register is set. cf4 can be set by hardware or software but must be cleared by software 3 cf3 ewc timer/counter 3 overflow flag set by hardware when the counter rolls over. cf3 flags an interrupt if ecf3 bit in ecf register is set. cf3 can be set by hardware or software but must be cleared by software. 2 cf2 ewc timer/counter 2 overflow flag set by hardware when the counter rolls over. cf2 flags an interrupt if ecf2 bit in ecf register is set. cf2 can be set by hardware or software but must be cleared by software. 1 cf1 ewc timer/counter 1 overflow flag set by hardware when the counter rolls over. cf1 flags an interrupt if ecf1 bit in ecf register is set. cf1 can be set by hardware or software but must be cleared by software. 0 cf0 ewc timer/counter 0 overflow flag set by hardware when the counter rolls over. cf0 flags an interrupt if ecf0 bit in ecf register is set. cf0 can be set by hardware or software but must be cleared by software. reset value = xxx0 0000b figure 6.19. ewc cof register tsc 80251a1 rev. b (20/09/96) ii. 6.23 matra mhs crc (0e2h) counter run control register stpm mode cr4 cr3 cr2 cr1 cr0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 stpm stop mode bit clear to stop the counter immediately upon a reset of the cr0 bit. set to stop the counter after the roll-over upon a reset of the cr0 bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 mode pca/epca bit clear to configure the ewc in pca mode (configuration per default, after a hardware reset). set to configure the ewc in epca mode. in that case, cr bit in ccon register is don't care. 4 cr4 ewc timer/counter 4 run bit if the mode bit is cleared, setting this bit is irrelevant. clear to turn the ewc timer/counter 4 off. set to turn the ewc timer/counter 4 on. 3 cr3 ewc timer/counter 3 run bit if the mode bit is cleared, setting this bit is irrelevant. clear to turn the ewc timer/counter 3 off. set to turn the ewc timer/counter 3 on. 2 cr2 ewc timer/counter 2 run bit if the mode bit is cleared, setting this bit is irrelevant. clear to turn the ewc timer/counter 2 off. set to turn the ewc timer/counter 2 on. 1 cr1 ewc timer/counter 1 run bit if the mode bit is cleared, setting this bit is irrelevant. clear to turn the ewc timer/counter 1 off. set to turn the ewc timer/counter 1 on. 0 cr0 ewc timer/counter 0 run bit if the mode bit is cleared, setting this bit is irrelevant. clear to turn the ewc timer/counter 0 off. set to turn the ewc timer/counter 0 on. reset value = 0000 0000b figure 6.20. ewc crc register 2 tsc 80251a1 rev. b (20/09/96) ii. 7.1 matra mhs 7.1. introduction this chapter describes the analog to digital converter (adc) and the relating sfr. this adc is a key for digital processing of real world phenomena when electronic sensors providing a voltage analogy to physical phenomena are used. 7.2. description figure 7.1. shows the adc structure. it consists of a 4input analog multiplexer followed by a sample and hold and an 8bit successive approximation analog/digital (a/d) converter. it only requires an external voltage reference (vref) with no other support component. this pin is next to the analog ground pin (avss) to optimize its decoupling. the analog inputs (an0 to an3) are next to vref which allows to easily shield all the analog pins using an avss guard ring. an0 to an3 are alternate function of port 1. digital inputs on port 1 can be read any time during an a/d conversion. however, special care should be taken in mixing analog and digital signals on these pins, which may cause crosstalk and degrades the adc accuracy. furthermore, if one of these pins is selected to perform a conversion, it will return a digital one when read while the conversion is in progress. the acquisition is controlled by the adc control register (adcon, see figure 7.3. ). the multiplexer selects one of the four possible analog inputs according to the number coded in two address bits (addr1 and addr0). then the adc start bit (adcs) allows to begin an acquisition by setting it to one. it remains set until the end of the conversion, then it automatically reset. this may takes up to 600 oscillator clock periods. this conversion time includes an acquisition time: this is the sum of the times required for the muxed analog signal to settle after the multiplexer command is selected and for the sample and hold procedure to complete. analog mux s/h + sar r/2r dac adat adci adcs addr1 addr0 adc interrupt 70 adcon vref an0/p1.0 an1/p1.1 an2/p1.2 an3/p1.3 figure 7.1. analog digital converter structure 8-bit analog to digital converter 2 tsc 80251a1 rev. b (20/09/96) ii. 7.2 matra mhs no new acquisition can begin while adcs bit is set (i.e. a conversion is in progress) and this bit cannot be reset by software. when a new result is ready in the 8bit adc data register (adat), when the conversion is completed, the adc interrupt bit (adci) is set and an adc interrupt request is sent to the interrupt system (see ainterrupt systemo chapter). this bit must be reset by software when the contents of adat register can be disposed of (i.e. after it has been read by the interrupt service routine). then a new acquisition can be requested (i.e. adcs bit cannot be set while adci bit is set). adci bit and adat register are preserved in idle mode and in powerdown mode (see apower monitoring and managementochapter), hence an already completed conversion is not lost. a conversion in progress will be aborted when entering the idle mode, while it may not be aborted when entering in powerdown mode. therefore, it is recommended to wait for adcs bit is zero before going into this mode, otherwise adci bit and adat register may change and a false interrupt may occur when this mode is exited through an interrupt. after an hardware reset, adcon is set to its default value and the analog to digital converter is inactive. tsc 80251a1 rev. b (20/09/96) ii. 7.3 matra mhs 7.3. registers adat (0c6h) analog data register (8bit, read only) 7 6 5 4 3 2 1 0 reset value = xxxx xxxxb figure 7.2. adat register adcon (0c5h) adc control register adci adcs addr1 addr0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 adci adc interrupt flag set by hardware when an a/d result is ready to be read. an interrupt is invoked if the adc interrupt flag is enabled. must be cleared by software. 3 adcs adc start and status bit cleared by hardware when the a/d conversion is completed, then adci is set. set to start an a/d conversion. 2 reserved the value read from this bit is indeterminate. do not set this bit. 1 addr1 input channel selection bits addr1 addr0 input pin selection 0 0 an0 (p1.0) 0 addr0 () 0 1 an1 (p1.1) 1 0 an2 (p1.2) 1 1 an3 (p1.3) reset value = 0000 0000b figure 7.3. adcon register 2 tsc 80251a1 rev. b (20/09/96) ii. 8.1 matra mhs 8.1. introduction these features can be used to supervise the power supply (vdd) and to start up properly the microcontroller when the power is up. the power monitoring and management consist of the main features listed below and explained hereafter poweron/off reset powerfail detector poweroff flag clock prescaler idle mode powerdown mode all these features are controlled by four 8bit registers, the power management register (powm), the power filter register (pfilt), the power control register (pcon) and the clock reload register (ckrl). 8.2. poweron/off reset the poweron reset ensures a proper starting of the microcontroller. as long as vdd has not reached the v rst+ threshold, the microcontroller is left under reset and the oscillator is not enabled. as soon as vdd has reached v rst+ , the oscillator is enabled and starts up. when the oscillator level on pin xtal1 has reached the trigger level of the digital monostable, the reset counter is incremented by the oscillator. when the counter rolls off, it stops the reset system. this system is not sensitive to the vdd rise time, because the oscillator is only enabled when the power supply (vdd) is stabilized over a reference level. it is not either sensitive to the frequency, because the width of the reset pulse: t rst is proportional to the crystal frequency. so this system guarantees a proper starting of the tsc80251a1 by protecting the reset against random conditions of vdd (see figure 8.3. ). v rst+ vdd vss rst t rst =64xt osc duration of the reset figure 8.1. behavior of the reset when the power supply is switched on power monitoring and management 2 tsc 80251a1 rev. b (20/09/96) ii. 8.2 matra mhs the poweroff reset ensures a proper stopping of the tsc80251a1 when vdd fails or the power supply is switched off. if vdd reaches the v rst+ threshold, the microcontroller is maintained under reset until the power supply is completely off or vdd has reached again the v rst+ threshold. this system avoids the tsc80251a1 running while the power supply is below the vdd specification. it also guarantees a correct behavior of the microcontroller for the external components (see figure 8.4. ). vss v rst vdd v rst+ rst figure 8.2. behavior of the reset when the power supply is switched off 8.3. powerfail detector this mechanism is useful for applications which need to save system variables in a nonvolatile memory. this feature monitors vdd and warns the tsc80251a1 by generating an early warning powerfail interrupt when vdd has dropped below the threshold level v fail . in that case powerfail interrupt enable bit (pfie) in ie1 register has to be set and powerfail disable bit (pfd) has to be cleared. powerfail interrupt enable bit (pfie) should have the highest priority (see is in paragraph 9). if vdd drops below v fail and then recovers and reaches v fail+ a new interrupt is generated and powerfail flag (pff) is set in powm register. the sequence waveform is shown in figure 8.5. to improve the noise immunity on vdd, glitches are filtered through a digital filter to allow only a persistent condition to trigger the internal reset. the filter consists of an 8bit programmable counter incremented by the system clock as shown in figure 8.6. the filtering window is programmable from 0 to 255 x 2t osc and is equal to 8 x 2t osc by default (after reset). tsc 80251a1 rev. b (20/09/96) ii. 8.3 matra mhs flag power fail interrupt v fail v rst+ t rst v rst+ vdd rst (internal) poweroff powerfail flag cleared by the interrupt service routine v fail+ cleared by the interrupt service routine cleared by software figure 8.3. power management timings vdd detector control pff v fail+ osc 2 powerfail pfilt register 8bit counter powerfail interrupt request v fail pfi powm figure 8.4. block diagram of the digital filter figure 8.7. shows the principle of in the vdd filtering. a signal is considered as a glitch when its width is smaller than the time setup in the 8bit pfilt register. in this example filtering period is equal to 6 system clock periods and the a signal is considered as a glitch because its width is less 2 tsc 80251a1 rev. b (20/09/96) ii. 8.4 matra mhs than 6 system clock periods. the b signal is not considered as a glitch and asserts the powerfail interrupt request. interrupt request b vdd v fail+ v fail t filt = 6 x 2 t osc width < t filt (= 6 x 2t osc ) width > t filt (= 6 x 2t osc ) powerfail window a b a a b powerfail figure 8.5. waveforms of the vdd filtering 8.4. poweroff flag the pof bit in pcon register is set to 1 when a hardware reset has been applied during the power is up. this reset is called ocold reseto. if a hardware reset is applied during the microcontroller is running, pof bit is not set. this reset is called owarm reseto. this flag allows to distinguish a cold from a warm reset and initialization. pof bit is useful in powerdown mode when it is completed by a hardware reset. when used, this bit must be cleared by software after acold reseto. 8.5. clock prescaler in order to optimize the consumption and the execution time needed for a specific task , an internal clock prescaler feature has been implemented to program the system clock frequency. it is possible to work at full speed for all tasks requiring quick response time at low frequency for background tasks which do not need cpu power but consumption optimizing. figure 8.9. shows the diagram of the onchip oscillator where the clock programming block clearly appears. the cpu clock can be programmed via 8bit ckrl register and by setting to one cksrc bit in powm register: f osc f xtal 2 ( cxrl 1 ) tsc 80251a1 rev. b (20/09/96) ii. 8.5 matra mhs clock prescaler osc output cksrc ckrl 8bit divider cksrc xtal1 xtal2 cpu idl# pd# figure 8.6. block diagram of the onchip oscillator the onchip oscillator is used to be symbolized by figure 8.7. in all this datasheet. osc osc output figure 8.7. symbolic of the onchip oscillator 8.6. idle mode idle mode is a power reduction mode that reduces the power consumption to about 40% of the typical running power consumption. in this mode, program execution halts. idle mode freezes the clock to the cpu at known states while the peripherals continue to be clocked (see figure 8.9. ). the cpu status before entering idle mode is preserved, i.e., the program counter, program status word register, and register file retain their data for the duration of idle mode. the contents of the sfrs and ram are also retained. the status of the port pins depends upon the location of the program memory: internal program memory: the ale and psen# pins are pulled high and the ports 0, 1, 2 and 3 pins are reading data (see table 8.1. ). external program memory: the ale and psen# pins are pulled high; the port 0 pins are floating and the pins of ports 1, 2 and 3 are reading data (see table 8.1. ). 8.6.1. entering idle mode to enter idle mode, set idl bit in pcon register. the tsc80251a1 enters idle mode upon execution of the instruction that sets idl bit. the instruction that sets idl bit is the last instruction executed. caution : if idl bit and pd bit are set simultaneously, the tsc80251a1 enters powerdown mode. 8.6.2. exiting idle mode there are two ways to exit idle mode: generate an enabled interrupt. hardware clears idl bit in the pcon register which restores the clock to the cpu. execution resumes with the interrupt service routine. upon completion of the 2 tsc 80251a1 rev. b (20/09/96) ii. 8.6 matra mhs interrupt service routine, program execution resumes with the instruction immediately following the instruction that activated idle mode. the general purpose flags (gf1 and gf0 in pcon register) may be used to indicate whether an interrupt occurred during normal operation or during idle mode. when idle mode is exited by an interrupt, the interrupt service routine may examine gf1 and gf0. reset the chip. a logic high on the rst pin clears idl bit in pcon register directly and asynchronously. this restores the clock to the cpu. program execution momentarily resumes with the instruction immediately following the instruction that activated the idle mode and may continue for a number of clock cycles before the internal reset algorithm takes control. reset initializes the tsc80251a1 and vectors the cpu to address ff:0000h. note: during the time that execution resumes, the internal ram cannot be accessed; however, it is possible for the port pins to be accessed. to avoid unexpected outputs at the port pins, the instruction immediately following the instruction that activated idle mode should not write to a port pin or to the external ram. table 8.1. pin conditions in various modes mode program memory ale pin psen# pin port 0 pin port 1 pin port 2 pin port 3 pin reset don't care weak high weak high floating weak high weak high weak high idle internal 1 1 data data data data idle external 1 1 floating data data data powerdown internal 0 0 data data data data powerdown external 0 0 floating data data data 8.7. powerdown mode the powerdown mode places the tsc80251a1 in a very low power state. powerdown mode stops the oscillator and freezes all clock at known states (see figure 8.9. ). the cpu status prior to entering powerdown mode is preserved, i.e., the program counter, program status word register, and register file retain their data for the duration of powerdown mode. in addition, the sfrs and ram contents are preserved. the status of the port pins depends on the location of the program memory: internal program memory: the ale and psen# pins are pulled low and the ports 0, 1, 2 and 3 pins are reading data (see table 8.1. ). external program memory: the ale and psen# pins are pulled low; the port 0 pins are floating and the pins of ports 1, 2 and 3 are reading data (see table 8.1. ). note: vdd may be reduced to as low as 2 v during powerdown to further reduce power dissipation. take care, however, that vdd is not reduced until powerdown is invoked. tsc 80251a1 rev. b (20/09/96) ii. 8.7 matra mhs 8.7.1. entering powerdown mode to enter powerdown mode, set pd bit in pcon register. the tsc80251a1 enters the powerdown mode upon execution of the instruction that sets pd bit. the instruction that sets pd bit is the last instruction executed. 8.7.2. exiting powerdown mode caution: if vdd was reduced during the powerdown mode, do not exit powerdown until vdd is restored to the normal operating level. there are two ways to exit the powerdown mode: generate an enabled external interrupt. hardware clears pd bit in pcon register which starts the oscillator and restores the clocks to the cpu and peripherals. execution resumes with the interrupt service routine. upon completion of the interrupt service routine, program execution resumes with the instruction immediately following the instruction that activated powerdown mode. note: to enable an external interrupt, set ex0 and/or ex1 bit(s) in ie register. the external interrupt used to exit powerdown mode must be configured as level sensitive and must be assigned the highest priority. in addition, the duration of the interrupt must be of sufficient length to allow the oscillator to stabilize. generate a reset. a logic high on the rst pin clears pd bit in pcon register directly and asynchronously. this starts the oscillator and restores the clock to the cpu and peripherals. program execution momentarily resumes with the instruction immediately following the instruction that activated powerdown and may continue for a number of clock cycles before the internal reset algorithm takes control. reset initializes the tsc80251a1 and vectors the cpu to address ff:0000h. note: during the time that execution resumes, the internal ram cannot be accessed; however, it is possible for the port pins to be accessed. to avoid unexpected outputs at the port pins, the instruction immediately following the instruction that activated the powerdown mode should not write to a port pin or to the external ram. 2 tsc 80251a1 rev. b (20/09/96) ii. 8.8 matra mhs 8.8. registers pcon (87h) power configuration register smod1 smodo rpd pof gf1 gf0 pd idl 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 smod1 double baud rate bit set to double the baud rate when timer 1 is used and mode 1, 2 or 3 is selected in scon register. 6 smod0 scon select bit when cleared, read/write accesses to scon.7 are to sm0 bit and read/write accesses to scon.6 are to sm1 bit. when set, read/write accesses to scon.7 are to fe bit and read/write accesses to scon.6 are to ovr bit. see serial port control register (scon). 5 rpd recover for idle/powerdown bit clear to enable only the enable interrupt sources to exit from idle or powerdown mode. set to permit to recover from idle or powerdown modes using external interrupt source. if the interrupt source is not enabled, the program simply continue at the address otherwise it jumps to interrupt service routine. 4 pof poweroff flag set by hardware as vdd rises above 3 v to indicate that the power has been off or vdd had fallen below 3 v and that onchip volatile memory is indeterminated. 3 gf1 general purpose flag 1 one use is to indicate whether an interrupt occured during normal operation or during idle mode. 2 gf0 general purpose flag 0 one use is to indicate whether an interrupt occured during normal operation or during idle mode. 1 pd powerdown mode bit cleared by hardware when an interrupt or reset occurs. set to activate the powerdown mode. if idl and pd are both set, pd takes precedence. 0 idl idle mode bit cleared by hardware when an interrupt or reset occurs. set to activate the idle mode. if idl and pd are both set, pd takes precedence. reset value = 0000 0000b figure 8.8. pcon register tsc 80251a1 rev. b (20/09/96) ii. 8.9 matra mhs pfilt (86h) power filter register (8bit) 7 6 5 4 3 2 1 0 reset value = 0000 1000b figure 8.9. pfilt register powm (8fh) power management register cksrc rstd pfd pff pfi 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 cksrc clock source bit cleared by hardware after a power-up. in that case the cpu clock is the oscillator source divided by two. set to enable the programmable clock. in that case the clock is divided by the value contained in ckrl register. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 reserved the value read from this bit is indeterminate. do not set this bit. 3 rstd reset detector disable bit clear to enable the reset detector. set to disable the reset detector. 2 pfd power-fail disable bit clear to enable the power-fail detector. set to disable the power-fail detector. 1 pff power-fail flag bit cleared by hardware after a reset or when vdd falls from v fail+ to v fail . set by hardware when vdd rises from v fail to v fail+ . this bit may be cleared by software. 0 pfi power-fail interrupt flag bit must be cleared by software. set by hardware when vdd falls from v fail+ to v fail , or when vdd rises from v fail to v fail+ . reset value = 0000 0000b figure 8.10. powm register 2 tsc 80251a1 rev. b (20/09/96) ii. 8.10 matra mhs ckrl (8eh) clock reload register (8bit) 7 6 5 4 3 2 1 0 reset value = 0000 1000b figure 8.11. ckrl register tsc 80251a1 rev. b (20/09/96) ii. 9.1 matra mhs 9.1. introduction the tsc80251a1, like other controloriented computer architectures, employs a program interrupt method. this operation branches to a subroutine and performs some service in response to the interrupt. when the subroutine completes, execution resumes at the point where the interrupt occurred. interrupts may occur as a result of internal tsc80251a1 activity (e.g., timer overflow) or at the initiation of electrical signals external to the microcontroller (e.g., serial port communication). in all cases, interrupt operation is programmed by the system designer, who determines priority of interrupt service relative to normal code execution and other interrupt service routines. thirteen of the fourteen interrupts are enabled or disabled by the system designer and may be manipulated dynamically. a typical interrupt event chain occurs as follows: an internal or external device initiates an interruptrequest signal. this signal, connected to an input pin and periodically sampled by the tsc80251a1, latches the event into a flag buffer. the priority of the flag is compared to the priority of other interrupts by the interrupt handler. a high priority causes the handler to set an interrupt flag. this signals the instruction execution unit to execute a context switch. this context switch breaks the current flow of instruction sequences. the execution unit completes the current instruction prior to a save of the program counter (pc) and reloads the pc with the start address of a software service routine. the software service routine executes assigned tasks and as a final activity performs a reti (return from interrupt) instruction. this instruction signals completion of the interrupt, resets the interruptinprogress priority and reloads the program counter. program operation then continues from the original point of interruption. table 9.1. interrupt system signals mnemonic type description multiplexed with int0# i external interrupt 0 this input sets ie0 bit in tcon register. if it0 bit in tcon register is set, ie0 bit is controlled by a negative edge trigger on int0#. if it0 bit in tcon register is cleared, ie0 bit is controlled by a low level trigger on int0#. p3.2 int1# i external interrupt 1 this input sets ie1 bit in tcon register. if it1 bit in tcon register is set, ie1 bit is controlled by a negative edge trigger on int1#. if it1 bit in tcon register is cleared, ie1 bit is controlled by a low level trigger on int1#. p3.3 interrupt system 2 tsc 80251a1 rev. b (20/09/96) ii. 9.2 matra mhs table 9.2. interrupt system sfrs mnemonic description address ie0 interrupt enable register used to enable and disable the eight lowest programmable interrupts. the reset value of this register is zero (interrupts disabled). s:a8h ie1 interrupt enable register used to enable and disable the eight highest programmable interrupts. the reset value of this register is zero (interrupts disabled). s:b1h ipl0 interrupt priority low register 0 establishes relative fourlevel priority for the eight lowest programmable interrupts. used in conjunction with iph0. s:b8h iph0 interrupt priority high register 0 establishes relative fourlevel priority for the eight lowest programmable interrupts. used in conjunction with ipl0. s:b7h ipl1 interrupt priority low register 1 establishes relative fourlevel priority for the eight lowest programmable interrupts. used in conjunction with iph1. s:b2h iph1 interrupt priority high register 1 establishes relative fourlevel priority for the eight highest programmable interrupts. used in conjunction with ipl1. s:b3h the tsc80251a1 has one software interrupt: trap and thirteen peripheral interrupt sources: two external (int0# and int1#), one for timer 0, one for timer 1, one for serial port, one for pulse measurement unit, five for event and waveform controller, one for analog to digital converter, one for powerfail detector. note: nmi interrupt source is not implemented in this derivative. six interrupt registers are used to control the interrupt system. two 8bit registers are used to enable separately the interrupt sources: ie0 and ie1 (see figure 9.1 and figure 9.2). four 8bit registers are used to establish the priority level of the sixteen sources: ipl0, iph0, ipl1 and iph1 (see figure 9.3, figure 9.4, figure 9.5 and figure 9.6). 9.2. interrupt system priorities each of the thirteen interrupt sources on the tsc80251a1 may be individually programmed to one of four priority levels. this is accomplished by one bit in the interrupt priority high registers (iph0 or iph1, see figure 9.4. and figure 9.5. ) and one in the interrupt priority low registers (ipl0 or ipl1, see figure 9.6. and figure 9.7. ) this provides each interrupt source four possible priority levels select bits (see table 9.3. ). tsc 80251a1 rev. b (20/09/96) ii. 9.3 matra mhs table 9.3. level of priority iphxx iplxx priority level 0 0 0 lowest 0 1 1 1 0 2 1 1 3 highest a lowpriority interrupt is always interrupted by a higher priority interrupt but not by another interrupt of lower priority. higher priority interrupts are serviced before lower priority interrupts. the response to simultaneous occurrence of equal priority interrupts (i.e., sampled within the same four state interrupt cycle) is determined by a hardware prioritywithinlevel resolver (see table 9.4. ). table 9.4. interrupt priority within level interrupt name priority number interrupt address vectors interrupt request flag cleared by hardware (h) or by software (s) trap 1 highest priority not interruptible ff:007bh reserved ff:003bh int0# 3 ff:0003h h if edge, s if level timer 0 4 ff:000bh h if edge, s if level int1# 5 ff:0013h h if edge, s if level timer 1 6 ff:001bh h serial port 7 ff:0023h s a/d converter 8 ff:002bh s ewc0 9 ff:0033h s pmu 10 ff:0043h s ewc1 11 ff:004bh s ewc2 12 ff:0053h s ewc3 13 ff:005bh s ewc4 14 ff:0063h s reserved 15 ff:006bh reserved 16 ff:0073h powerfail 17 lowest priority ff:0083h s 2 tsc 80251a1 rev. b (20/09/96) ii. 9.4 matra mhs 9.3. external interrupts external interrupts int0# and int1# (intn#, n = 0, 1) pins may each be programmed to be leveltriggered or edgetriggered, dependent upon bits it0 and it1 (itn, n = 0, 1) in tcon register. if itn = 0, intn# is triggered by a low level at the pin. if itn = 1, intn# is negativeedge triggered. external interrupts are enabled with bits ex0 and ex1 (exn, n = 0, 1) in ie0 register. events on intn# set the interrupt request flag ien in tcon. a request bit is cleared by hardware vectors to service routines only if the interrupt is edge triggered . if the interrupt is leveltriggered, the interrupt service routine must clear the request bit. external hardware must deassert intn# before the service routine completes, or an additional interrupt is requested. external interrupt pins must be deasserted for at least four state times prior to a request. external interrupt pins are sampled once every four state times (a frame length of 500 ns at 16 mhz). a leveltriggered interrupt pin held low or high for fivestate time period guarantees detection. edgetriggered external interrupts must hold the request pin low for at least five state times. this ensures edge recognition and sets interrupt request bit exn. the cpu clears exn automatically during service routine fetch cycles for edgetriggered interrupts. leveltriggered interrupt 4 states 5 states 4 states 5 states edgetriggered interrupt 4 states 4 states 5 states figure 9.1. minimum pulse timings. tsc 80251a1 rev. b (20/09/96) ii. 9.5 matra mhs 9.4. registers ie0 (0a8h) interrupt enable 0 register ea ec eadc es et1 ex1 et0 ex0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 ea global interrupt enable bit clear to disable all interrupts that are individually disabled by bits 6:0 in ie0 register and bits 6:0 in ie1 register. set to enable all interrupts that are individually enabled by bits 6:0 in ie0 register and bits 6:0 in ie1 register. 6 ec enable counter interrupt bit clear to disable ewc interrupt. set to enable ewc interrupt. 5 eadc enable analog to digital converter interrupt bit clear to disable adc interrupt. set to enable adc interrupt. 4 es enable serial port interrupt bit clear to disable serial port interrupt. set to enable serial port interrupt. 3 et1 enable timer 1 interrupt bit clear to disable timer 1 overflow interrupt. set to enable timer 1 overflow interrupt. 2 ex1 enable external 1 interrupt bit clear to disable external interrupt 1. set to enable external interrupt 1. 1 et0 enable timer 0 interrupt bit clear to disable timer 0 overflow interrupt. set to enable timer 0 overflow interrupt. 0 ex0 enable external 0 interrupt bit clear to disable external interrupt 0. set to enable external interrupt 0. reset value = 0000 0000b figure 9.2. ie0 register 2 tsc 80251a1 rev. b (20/09/96) ii. 9.6 matra mhs ie1 (0b1h) interrupt enable 1 register pfie ec4 ec3 ec2 ec1 pmu 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 pfie power-fail interrupt enable bit clear to disable the power-fail interrupt. set to enable the power-fail interrupt. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 ec4 enable counter 4 interrupt bit clear to disable the ewcn counter 4 interrupt. set to enable the ewcn counter 4 interrupt. 3 ec3 enable counter 3 interrupt bit clear to disable the ewcn counter 3 interrupt. set to enable the ewcn counter 3 interrupt. 2 ec2 enable counter 2 interrupt bit clear to disable the ewcn counter 2 interrupt. set to enable the ewcn counter 2 interrupt. 1 ec1 enable counter 1 interrupt bit clear to disable the ewcn counter 1 interrupt. set to enable the ewcn counter 1 interrupt. 0 epmu enable pulse measurement unit interrupt bit clear to disable the pmu interrupt. set to enable the pmu interrupt. reset value = 0000 0000b figure 9.3. ie1 register tsc 80251a1 rev. b (20/09/96) ii. 9.7 matra mhs iph0 (0b7h) interrupt priority high 0 register iphc iphadc iphs ipht1 iphx1 ipht0 iphx0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit 6 iphc ewc counter interrupt priority level most significant bit iphc iplc priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 5 iphadc adc interrupt priority level most significant bit iphadc ipladc priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 4 iphs serial port interrupt priority level most significant bit iphs ipls priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 3 ipht1 timer 1 interrupt priority level most significant bit ipht1 iplt1 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 2 iphx1 external interrupt 1 priority level most significant bit iphx1 iplx1 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 1 ipht0 timer 0 interrupt priority level most significant bit ipht0 iplt0 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 0 iphx0 external interrupt 0 priority level most significant bit iphx0 iplx0 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority reset value = x000 0000b figure 9.4. iph0 register 2 tsc 80251a1 rev. b (20/09/96) ii. 9.8 matra mhs iph1 (0b1h) interrupt priority high 1 register iphpf iphc4 iphc3 iphc2 iphc1 iphpmu 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 iphpf powerfail interrupt priority level most significant bit iphpf iplpf priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 iphc4 ewc counter 4 interrupt priority level most significant bit iphec4 iplec4 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 3 iphc3 ewc counter 3 interrupt priority level most significant bit iphec3 iplec3 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 2 iphc2 ewc counter 2 interrupt priority level most significant bit iphec2 iplec2 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 1 iphc1 ewc counter 1 interrupt priority level most significant bit iphec1 iplec1 priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority 0 iphpmu pmu interrupt 0 priority level most significant bit iphpmu iplpmu priority level 0 0 0 lowest priority 011 102 1 1 3 highest priority reset value = x000 0000b figure 9.5. iph1 register tsc 80251a1 rev. b (20/09/96) ii. 9.9 matra mhs ipl0 (0b8h) interrupt priority low 0 register iplc ipladc ipls iplt1 iplx1 iplt0 iplx0 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 reserved the value read from this bit is indeterminate. do not set this bit. 6 iplc ewc counter interrupt priority level most significant bit. refer to iphc for priority level. 5 ipladc adc interrupt priority level most significant bit. refer to iphadc for priority level. 4 ipls serial port interrupt priority level most significant bit. refer to iphs for priority level. 3 iplt1 timer 1 interrupt priority level most significant bit. refer to ipht1 for priority level. 2 iplx1 external interrupt 1 priority level most significant bit. refer to iphx1 for priority level. 1 iplt0 timer 0 interrupt priority level most significant bit. refer to ipht0 for priority level. 0 iplx0 external interrupt 0 priority level most significant bit. refer to iphx0 for priority level. reset value = x000 0000b figure 9.6. ipl0 register 2 tsc 80251a1 rev. b (20/09/96) ii. 9.10 matra mhs ipl1 (0b2h) interrupt priority low 1 register iplpf iplc4 iplc3 iplc2 iplc1 iplpmu 7 6 5 4 3 2 1 0 bit number bit mnemonic description 7 iplpf powerfail interrupt priority level most significant bit. refer to iphpf for priority level. 6 reserved the value read from this bit is indeterminate. do not set this bit. 5 reserved the value read from this bit is indeterminate. do not set this bit. 4 iplc4 ewc counter 4 interrupt priority level most significant bit. refer to iphec4 for priority level. 3 iplc3 ewc counter 3 interrupt priority level most significant bit. refer to iphec3 for priority level. 2 iplc2 ewc counter 2 interrupt priority level most significant bit. refer to iphec2 for priority level. 1 iplc1 ewc counter 1 interrupt priority level most significant bit. refer to iphec1 for priority level. 0 iplpmu pmu interrupt priority level most significant bit. refer to iphpmu for priority level. reset value = x000 0000b figure 9.7. ipl1 register tsc 80251a1 section iii electrical and mechanical information 3 tsc 80251a1 rev. b (20/09/96) iii. 1.1 matra mhs table 1.1. absolute maximum ratings ambient temperature under bias commercial . . . . . . . . . . . . . . . . . . . . . . . . . . . industrial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . automotive . . . . . . . . . . . . . . . . . . . . . . . . . . . . storage temperature . . . . . . . . . . . . . . . . . . . . . . voltage on ea#/vpp pin to vss . . . . . . . . . . . . voltage on any other pin to vss . . . . . . . . . . . . i ol per i/o pin . . . . . . . . . . . . . . . . . . . . . . . . . . power dissipation . . . . . . . . . . . . . . . . . . . . . . . . 0 to +70 c 40 to +85 c 0 to +125 c 65 to +150 c 0 to +13.0 v 0.5 to +6.5 v 15 ma 1.5 w note: stresses at or above those listed under aabsolute maximum ratingso may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions may affect device reliability. table 1.2. dc characteristics parameter values applied to all devices unless otherwise indicated. commercial industrial automotive ta = 0 to 70 c vss = 0 v vdd = 5 v 10 % ta = 40 +85 c vss = 0 v vdd = 5 v 10 % ta = 40 +125 c vss = 0 v vdd = 5 v 10 % symbol parameter min typical (4) max units test conditions v il input low voltage (except ea#) 0.5 0.2vdd - 0.1 v v il1 input low voltage (ea#) 0 0.2vdd - 0.3 v v ih input high voltage (except xtal1, rst) 0.2vdd + 0.9 vdd + 0.5 v v ih1 input high voltage (xtal1) 0.7 vdd vdd + 0.5 v v ol output low voltage (ports 1, 2, 3) 0.3 0.45 1.0 v i ol = 100 m a i ol = 1.6 ma i ol = 3.5 ma (1, 2) v rst + reset threshold on 3.7 v v rst reset threshold off 3.3 v dc characteristics 3 tsc 80251a1 rev. b (20/09/96) iii. 1.2 matra mhs test conditions units max typical (4) min parameter symbol v fail + vddfail threshold on 4.2 v v fail vddfail threshold off 4.1 v v ol1 output low voltage (ports 0, ale, psen#) 0.3 0.45 1.0 v i ol = 200 m a i ol = 3.2 ma i ol = 7.0 ma (1, 2) v oh output high voltage (ports 1, 2, 3, ale, psen#) vdd 0.3 vdd 0.7 vdd 1.5 v i oh = 10 m a i oh = 30 m a i oh = 60 m a (3) v oh1 output high voltage (port 0 in external address) vdd 0.3 vdd 0.7 vdd 1.5 v i oh = 200 m a i oh = 3.2 ma i oh = 7.0 ma v oh2 output high voltage (port 2 in external address during page mode) vdd 0.3 vdd 0.7 vdd 1.5 v i oh = 200 m a i oh = 3.2 ma i oh = 7.0 ma i il logical 0 input current (ports 1, 2, 3) - 50 - 75 m a v in = 0.45 v automotive range i li input leakage current (port 0) 10 m a 0.45 tsc 80251a1 rev. b (20/09/96) iii. 1.4 matra mhs +5v xtal2 xtal1 vss vdd ea# p0 tsc80251a1 vdd rst i dl (nc) all other pins are unconnected clock signal figure 1.2. i dl test condition, idle mode +5v xtal2 xtal1 vss vdd ea# p0 tsc80251a1 vdd rst i dd (nc) all other pins are unconnected vdd clock signal figure 1.3. i dd test condition, active mode tsc 80251a1 rev. b (20/09/96) iii. 2.1 matra mhs table 2.1. ac characteristics (capacitive loading = 50 pf) symbol parameter 12 mhz 16 mhz f osc units s ym b o l p arame t er min max min max min max u n it s t osc 1/f osc 83 63 ns t lhll ale pulse width 73 53 t osc -10 ns (2) t av l l address valid to ale low 63 43 t osc - 20 ns (2) t llax address hold after ale low 63 43 t osc - 20 ns t rlrh (1) rd# or psen# pulse width 65 45 t osc - 18 ns (3) t wlwh wr# pulse width 65 45 t osc - 18 ns (3) t llrl (1) ale low to rd# or psen# low 73 53 t osc - 10 ns t rhrl ale high to rd# or psen# high 73 53 t osc - 10 ns t lhax ale high to address hold 147 105 2t osc - 20 ns (2) t rldv (1) rd# or psen# low to valid data/instruction. 33 13 t osc - 50 ns (3) t rhdx (1) data/instruct. hold after rd# or psen# high 0 0 0 ns t rlaz (1) rd#/psen# low to address float 2 2 2 ns t rhdz (1) data/instruct. float after rd# or psen# high 63 43 t osc - 20 ns t rhlh1 (1) rd#/psen# high to ale high (instruction) 68 48 t osc - 15 ns (1) t rhlh2 (1) rd#/psen# high to ale high (data) 235 173 3t osc - 15 ns (1) t whlh wr# high to ale high 235 173 3t osc - 15 ns t avdv1 address (p0) valid to valid data/instruction in 190 128 3t osc - 60 ns (2, 3, 4) t avdv2 address (p2) valid to valid data/instruction in 273 190 4t osc - 60 ns (2, 3, 4,) t avdv3 address (p0) valid to valid instruction in 107 107 2t osc - 60 ns ac characteristics 3 tsc 80251a1 rev. b (20/09/96) iii. 2.2 matra mhs units f osc 16 mhz 12 mhz parameter symbol units max min max min max min parameter symbol t av r l address valid to rd#/psen# low 143 101 2t osc - 24 ns (2) t avwl1 address (p0) valid to wr# low 143 101 2t osc - 24 ns (2) t avwl2 address (p2) valid to wr# low 220 158 3t osc - 30 ns (2) t whqx data hold after wr# high 63 43 t osc - 20 ns t qvwh data valid to wr# high 58 38 t osc - 25 ns (3) t whax wr# high to address hold 147 105 2t osc - 20 ns t xlxl serial port clock cycle time 1000 750 12 t osc ns t qvsh output data setup to clock rising edge 870 620 12 t osc - 133 ns t xhqx output data hold after clock rising edge 720 510 10 t osc - 117 ns t xhdx input data hold after clock rising edge 0 0 0 ns t xhdv clock rising edge to input data valid 700 500 10 t osc - 133 ns notes : 1. specifications for psen# are identical to those for rd#. 2. if a wait state is added by extending ale, add 2t osc. 3. if a wait state is added by extending rd#/psen#/wr#, add 2t osc . 4. if wait states are added as described in both note 2 and note 3, add a total of 4t osc . tsc 80251a1 rev. b (20/09/96) iii. 2.3 matra mhs t rhlh1 t rlrh t llrl t lhll t rldv t rlaz t av l l t llax t rhdx t rhdz t av r l t avdv1 t avdv2 p2 p0 psen# ale the value of this parameter depends on wait states. see the table of ac characteristics. a15:8 t lhax d7:0 a7:0 instruction in figure 2.1. external instruction bus cycle in nonpage mode t rhlh2 t rlrh t llrl t lhll t rldv t rlaz t av l l t llax t rhdx t rhdz t av r l t avdv1 t avdv2 p2 p0 psen# ale the value of this parameter depends on wait states. see the table of ac characteristics. a15:8 t lhax d7:0 a7:0 data in figure 2.2. external data read cycle in nonpage mode 3 tsc 80251a1 rev. b (20/09/96) iii. 2.4 matra mhs t whlh t wlwh t lhll t av l l t llax t av w l 1 t av w l 2 p2 p0 wr# ale the value of this parameter depends on wait states. see the table of ac characteristics. a15:8 t lhax d7:0 t qvwh a7:0 t whax t whqx data out figure 2.3. external write data bus cycle in nonpage mode t rlrh t llrl t lhll t rldv t rlaz t av l l t llax t rhdx t rhdz t av r l t avdv1 t avdv2 p2 p0 psen# ale the value of this parameter depends on wait states. see the table of ac characteristics. a7:0 t lhax d7:0 a15:8 instruction in instruction in t rhlh1 d7:0 a7:0 page miss page hit a page hit (i.e., a code fetch to the same 256-byte apageo as the previous code fetch) requires one state (2t osc ); a page miss requires two states (4t osc ). t avdv3 t rhrl figure 2.4. external instruction bus cycle in page mode tsc 80251a1 rev. b (20/09/96) iii. 2.5 matra mhs t rhlh2 t rlrh t llrl t lhll t rldv t rlaz t av l l t llax t rhdx t rhdz t av r l t avdv1 t avdv2 p2 p0 rd#psen# ale the value of this parameter depends on wait states. see the table of ac characteristics. a7:0 t lhax a15:8 data in d7:0 figure 2.5. external read data bus cycle in page mode t whlh t wlwh t lhll t av l l t llax t av w l 1 t av w l 2 p2 p0 wr# ale the value of this parameter depends on wait states. see the table of ac characteristics. a7:0 t lhax d7:0 t qvwh t whax t whqx data out a15:8 figure 2.6. external write data bus cycle in page mode 3 tsc 80251a1 rev. b (20/09/96) iii. 2.6 matra mhs valid valid valid valid valid valid valid valid 01 23 45 6 7 t xlxl t xhdv t xhdx t qvxh t xhqx t av set ti set ri txd rxd (out) rxd (in) ti and ri are set during s1p1 of the peripheral cycle following the shift of the eight bit. figure 2.7. serial port waveform shift register mode notation for timing parameters name a = address d = data e = enable g = prog# h = high l = low q = data out s = supply (vpp ) v = valid x = no longer valid z = floating tsc 80251a1 rev. b (20/09/96) iii. 3.1 matra mhs table 3.1. a/d converter electrical characteristics commercial industrial automotive ta = 0 to 70 c vss = 0 v vdd = 5 v 10 % f osc = 1 to 16 mhz ta = 40 to +85 c ; vss = 0 v vdd = 5 v 10 % f osc = 1 to 16 mhz ta = 40 to +125 c vss = 0 v vdd = 5 v 10 % f osc = 1 to 12 mhz symbol parameter test conditions min max unit avdd analog supply voltage avdd = vdd 0.2v 4.50 5.50 v ai dd analog supply current: operating port 1 = 0 to avdd 1.20 ma av in analog input voltage avss0.2 avdd+0.2 v v ref reference voltage avss0.2 avdd+0.2 v r ref resistance between v ref and avss 1 10 k w c ia analog input capacitance 15 pf t ads sampling time 108 t osc 6.757 at 16 mhz 9 at 12 mhz 108 at 1 mhz m s t adc conversion time (including sam- pling time) 600 t osc 37.5 at 16 mhz 50 at 12 mhz 600 at 1 mhz m s dle differential nonlinearity 1,2 1 lsb ile integral nonlinearity 1,3 1 lsb ose offest error 1,4 1 lsb ge gain error 1,5 0,40 % m ctc channel to channel matching 1 lsb c t crosstalk between inputs of port 1 6 0 to 100 khz 60 db t osc oscillator clock period com, ind = 62 auto = 83 1000 ns notes: 1. conditions : avdd = 5.v; v ref = 5.12v. adc is monotonic with no missing codes. 2. the differential nonlinearity (dle) is the difference between the actual step width and the ideal step width. (see figure 3.1. ) 3. the integral nonlinearity (ile) is the peak difference between the center of the steps of the actual and the ideal transfer curve after appropriate adjustment of gain and offset error. (see figure 3.1. ) 4. the offset error (ose) is the absolute difference between the straight line which fits the actual transfer curve (after removing gain error), and a straight line which fits the ideal transfer curve. (see figure 3.1. ) 5. the gain error (ge) is the relative difference in percent between the straight line fitting the actual transfer curve (after removing offset error), and the straight line which fits the ideal transfer curve. gain error is constant at every point on the transfer curve. (see figure 3.1. ) 6. this should be considered when both analog and digital signals are simultaneously input to port 1. adc characteristics 3 tsc 80251a1 rev. b (20/09/96) iii. 3.2 matra mhs 4 67 253 254 255 256 1 23 5 1 2 3 4 5 6 7 252 253 254 255 0 (code out) av in (lsb ideal ) (1) (2) offset error os 1 lsb (ideal) (3) (offset error gain error) offset error os offset error ose ose ge (5) (4) (1) example of an actual transfer curve (2) the ideal transfer curve (3) differential nonlinearity (dle) (5) center of a step of the actual transfer curve (4) integral onlinearity (ile) 8 9 8 252 9 figure 3.1. a/d conversion characteristic tsc 80251a1 rev. b (20/09/96) iii. 4.1 matra mhs 4.1. programming modes the tsc87251a1 derivatives in window cqpj are erasable by uv which set all the eprom memory cells to one and allows a reprogrammation. the other tsc87251a1 derivatives are one time programmable as an eprom cell cannot be reset once programmed to 0. table 4.1. shows the hardware setup needed to program the tsc87251a1 eprom areas: the chip has to be maintained under reset and the psen# has to be to forced to 0 until the completion of the programming sequence. the programming address are applied on ports 1 and 3 which are respectively the upper and lower address lines. the programming data are applied on port 2. the eprom programming is done by applying vpp on the ea# pin and by generating 5 pulses on ale/prog# pin for the onchip code memory and 25 for the configuration bytes. table 4.1. eprom programming configuration eprom mode rst ea# psen# ale p0 p2 p1(upper)p3(lower) notes onchip code memory 1 vpp 0 5 pulses 68h data 0000h-5fffh 1 configuration bytes 1 vpp 0 25 pulses 69h data 0080h-0081h 1 notes: 1. the ale/prog# pulse waveform is shown in figure 4.2. rst ea#/vpp ale/prog# psen# vdd p3 p1 vss xtal1 p2 p0 vpp 5 x 100 m s a7:0 a14:8 mode pgm data + 5 v tsc87251a1 vdd 4 to 6 mhz figure 4.1. setup for eprom programming eprom programming 3 tsc 80251a1 rev. b (20/09/96) iii. 4.2 matra mhs vdd mode = 68h or 69h data address p1 = a14:8 p3 = a7:0 p2 = d7:0 ale/prog# ea#/vpp p0 t ehsh t shgl t glgh t ghgl t avgl t dvgl t ghdx 12 3 45 vpp vss t ghax note: the timing is the same for both programming modes excepted the number of programming pulses. only 5 programming pulses are shown here. figure 4.2. timings for eprom programming tsc 80251a1 rev. b (20/09/96) iii. 4.3 matra mhs 4.2. verify algorithm figure 4.3. show the setup needed to verify the tsc80251a1 eprom areas. table 4.2. shows the configuration needed to verify the on-chip code memory and configuration bytes. the 15 addresses must be connected to the ports 3 and 1. ale/prog# and psen# are driven low while port 0 receives the configuration. figure 4.4. shows the timings to apply in orded to execute the eprom verify mode. port 0 drives the verify mode (28h for programming mode). the address to access is driven on port 1 and port 3 while the psen# and ale are driven low. the data is driven on port 2, 48 clock periods after the address is stable. table 4.2. eprom verifying configuration verify eprom rst ea# psen# ale p0 p2 p1(upper) p3(lower) onchip code memory 1 1 0 1 28h data 0000h-5fffh configuration bytes 1 1 0 1 29h data 0080h-0083h ale/prog# rst ea#/vpp psen# vdd p3 p1 vss p0 a7:0 a14:8 mode + 5 v tsc87251a1 vdd pgm data xtal1 p2 4 to 6 mhz figure 4.3. setup for eprom verification 3 tsc 80251a1 rev. b (20/09/96) iii. 4.4 matra mhs t elqv t ehqz address data t aqv > = 48 x t clc p1 = a14:8 p3 = a7:0 p2 = d7:0 p0 mode = 28h or 29h figure 4.4. timings for eprom verification table 4.3. eprom programming & verification characteristics ( ta = 21 to 27 c ; vcc = 5v +/ 0.25v ; vss= 0 ) symbol parameter min max units vpp programming supply voltage 12,75 13 v ipp programming supply current 75 ma t osc oscillator frequency 167 250 ns t avgl address setup to prog# low 48t osc t ghax address hold after prog# low 48t osc t dvgl data setup to prog# low 48t osc t ghdx data hold after prog# 48t osc t ehsh enable high to vpp 48t osc t shgl vpp setup to prog# low 10 s t ghsl vpp hold after prog# 10 s t glgh prog# width 90 110 s t avqv address to data valid 48t osc t elqv enable low to data valid 48t osc t ehqz data float after enable 0 48t osc t ghgl prog high to prog# low 10 s tsc 80c251a1 rev. b (20/09/96) iii. 5.1 matra mhs 5.1. plcc 44 5.1.1. mechanical outline figure 5.1. plastic lead chip carrier table 5.1. plcc chip size mm inch min max min max a 4.20 4.57 .165 .180 a1 2.29 3.04 .090 .120 d 17.40 17.65 .685 .695 d1 16.44 16.66 .647 .656 d2 14.99 16.00 .590 .630 e 17.40 17.65 .685 .695 e1 16.44 16.66 .647 .656 e2 14.99 16.00 .590 .630 e 1.27 bsc .050 bsc g 1.07 1.22 .042 .048 h 1.07 1.42 .042 .056 j 0.51 .020 packages 3 tsc 80c251a1 rev. b (20/09/96) iii. 5.2 matra mhs inch mm max min max min k 0.33 0.53 .013 .021 nd 11 11 ne 11 11 pkg std 00 5.1.2. pin assignment table 5.2. plcc pin assignment pin number pin name pin number pin name 1 avss 23 p2.0/a8 2 vref 24 p2.1/a9 3 p1.0/an0 25 p2.2/a10 4 p1.1/an1 26 p2.3/a11 5 p1.2/eci/an2 27 p2.4/a12 6 p1.3/cex0/an3 28 p2.5/a13 7 p1.4/cex1 29 p2.6/a14 8 p1.5/pmi0/cex2 30 p2.7/a15 9 p1.6/pmi1cex3 21 psen# 10 p1.7/a17/pmi2/cex4 32 ale/prog# 11 rst 33 vss0 12 p3.0/rxd 34 vdd0 13 p3.1/txd 35 ea#/vpp 14 p3.2/int0# 36 p0.7/ad7 15 p3.3/int1# 37 p0.6/ad6 16 p3.4/t0 38 p0.5/ad5 17 p3.5/t1 39 p0.4/ad4 18 p3.6/wr# 40 p0.3/ad3 19 p3.7/a16/rd# 41 p0.2/ad2 20 xtal2 42 p0.1/ad1 21 xtal1 43 p0.0/ad0 22 vss1 44 avdd tsc 80c251a1 rev. b (20/09/96) iii. 5.3 matra mhs 5.2. cqpj 44 with window 5.2.1. mechanical outline figure 5.2. ceramic quad pack j table 5.3. cqpj chip size mm inch min max min max a 4.90 .193 c 0.15 0.25 .006 .010 d e 17.40 17.55 .685 .691 d1 e1 16.36 16.66 .644 .656 e 1.27 typ .050 typ f 0.43 0.53 .017 .021 j 0.86 1.12 .034 .044 q 15.49 16.00 .610 .630 r 0.86 typ .034 typ n1 11 11 n2 11 11 3 tsc 80c251a1 rev. b (20/09/96) iii. 5.4 matra mhs 5.2.2. pin assignment table 5.4. cqpj pin assignment pin number pin name pin number pin name 1 p1.4/cex1 23 p2.6/a14 2 p1.5/pmi0/cex2 24 p2.7/a15 3 p1.6/pmi1cex3 25 psen# 4 p1.7/a17/pmi2/cex4 26 ale/prog# 5 rst 27 vss0 6 p3.0/rxd 28 vdd0 7 p3.1/txd 29 ea#/vpp 8 p3.2/int0# 30 p0.7/ad7 9 p3.3/int1# 31 p0.6/ad6 10 p3.4/t0 32 p0.5/ad5 11 p3.5/t1 33 p0.4/ad4 12 p3.6/wr# 34 p0.3/ad3 13 p3.7/a16/rd# 35 p0.2/ad2 14 xtal2 36 p0.1/ad1 15 xtal1 37 p0.0/ad0 16 vss1 38 avdd 17 p2.0/a8 39 avss 18 p2.1/a9 40 vref 19 p2.2/a10 41 p1.0/an0 20 p2.3/a11 42 p1.1/an1 21 p2.4/a12 43 p1.2/eci/an2 22 p2.5/a13 44 p1.3/cex0/an3 tsc 80c251a1 rev. b (20/09/96) iii. 5.5 matra mhs 5.3. tqfp 44 5.3.1. mechanical outline figure 5.3. thin quad flat pack (plastic) table 5.5. tqfp chip size mm inch min max min max a 1.60 .063 a1 0.64 ref .025 ref a2 0.64 ref .025ref a3 1.35 1.45 .053 .057 d 11.90 12.10 .468 .476 d1 9.90 10.10 .390 .398 e 11.90 12.10 .468 .476 e1 9.90 10.10 .390 .398 j 0.05 .002 6 l 0.45 0.75 .018 .030 e 0.80 bsc .0315 bsc f 0.35 bsc .014 bsc 3 tsc 80c251a1 rev. b (20/09/96) iii. 5.6 matra mhs 5.3.2. pin assignment table 5.6. tqfp pin assignment pin number pin name pin number pin name 1 p1.4/cex1 23 p2.6/a14 2 p1.5/pmi0/cex2 24 p2.7/a15 3 p1.6/pmi1cex3 25 psen# 4 p1.7/a17/pmi2/cex4 26 ale/prog# 5 rst 27 vss0 6 p3.0/rxd 28 vdd0 7 p3.1/txd 29 ea#/vpp 8 p3.2/int0# 30 p0.7/ad7 9 p3.3/int1# 31 p0.6/ad6 10 p3.4/t0 32 p0.5/ad5 11 p3.5/t1 33 p0.4/ad4 12 p3.6/wr# 34 p0.3/ad3 13 p3.7/a16/rd# 35 p0.2/ad2 14 xtal2 36 p0.1/ad1 15 xtal1 37 p0.0/ad0 16 vss1 38 avdd 17 p2.0/a8 39 avss 18 p2.1/a9 40 vref 19 p2.2/a10 41 p1.0/an0 20 p2.3/a11 42 p1.1/an1 21 p2.4/a12 43 p1.2/eci/an2 22 p2.5/a13 44 p1.3/cex0/an3 tsc 80251a1 section iv ordering information 4 tsc 80251a1 rev. b (20/09/96) iv. 1.1 matra mhs tsc 80251a1 xxx customer rom code temic semiconductor microcontroller product division a12 12: 12 mhz version 16: 16 mhz version part number 80251a1: external rom 87251a1: 24kbytes otp/eprom 251a1: 24kbytes maskrom c temperature range c : commercial 0 to 70 c i : industrial 40 to 85 c a: automotive 55 to 125 c packaging b: plcc 44 c: window cqpj 44 (eprom version) d: tqfp 44 b conditioning r : tape & reel d : dry pack b : tape & reel dry pack r a: source mode b: binary mode examples part number description tsc80251a1a16cbr romless, source mode, 16 mhz, plcc 44, 0 to 70 c, tape and reel tsc87251a1a12cb otp, source mode, 12 mhz, plcc 44, 0 to 70 c tsc87251a1a12cbr eprom, source mode, 12 mhz, plcc 44, 0 to 70 c, tape and reel development tools part number description tsc80251a1ska software starter kit keil tsc80251a1skb software starter kit tasking tsc80251a1eka evaluation kit keil tsc80251a1ekb evaluation kit tasking product marking : temic customer p/n temic p/n ? intel'95 yyww lot number m ordering information 4 |
Price & Availability of TSC80251A1-12CB
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |