PSD4256G6V
Flash In-System Programming (ISP) Peripherals for 8-bit or 16-bit MCUs
PRELIMINARY DATA
FEATURES SUMMARY
D UAL BANK FLASH MEMORIES 8 Mbits of Primary Flash Memory (16 uniform sectors, 64Kbyte) 512 Kbits of Secondary Flash Memory with 4 sectors Concurrent operation: READ from one memory while erasing and writing the other 256 KBITS OF SRAM (BATTERY-BACKED) PLD WITH MACROCELLS Over 3000 Gates of PLD: CPLD and DPLD CPLD with 16 Output Macrocells (OMCs) and 24 Input Macrocells (IMCs) DPLD - user defined internal chip select decoding SEVEN I/O PORTS WITH 52 I/O PINS: 52 individually configurable I/O port pins that can be used for the following functions: MCU I/Os PLD I/Os Latched MCU address output Special function I/Os l/O ports may be configured as open-drain outputs IN-SYSTEM PROGRAMMING (ISP) WITH JTAG Built-in JTAG compliant serial port allows full-chip In-System Programmability Efficient manufacturing allow easy product testing and programming Use low cost FlashLINK cable with PC PAGE REGISTER Internal page register that can be used to expand the microcontroller address space by a factor of 256 PROGRAMMABLE POWER MANAGEMENT
Figure 1. Package
TQFP80 (U) 80-lead Thin, Quad Flat
H IGH ENDURANCE: 100,000 Erase/WRITE Cycles of Flash Memory 1,000 Erase/WRITE Cycles of PLD 15 Year Data Retention SINGLE SUPPLY VOLTAGE 3V (+20%/10%) MEMORY SPEED 100ns Flash memory and SRAM access time for VCC = 3V (+20%/10%) 90ns Flash memory and SRAM access time for VCC = 3.3V (+/10%)
June 2004
1/104
This is preliminary information on a new product now in development or undergoing evaluation. Details are subject to change without notice.
PSD4256G6V
TABLE OF CONTENTS
FEATUR ES SUMMARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 SUMMARY DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 In-System Programming (ISP) via JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 P S D so f t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 PSD ARCHITECTURAL OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 M e m o ry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 P L D s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 MCU Bus Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 ISP via JTAG Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 In-System Programming (ISP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 In-Application Programming (IAP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Page Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Power Management Unit (PMU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 DEVELOPMENT SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 PSD REGISTER DESCRIPTION AND ADDRESS OFFSETS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 REGISTER BIT DEFINITION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 DETAILED OPERATION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Memory Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Primary Flash Memory and Secondary Flash memory Description . . . . . R eady/Busy (PE4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . . . 21 . . . . 22 . . . . 22 . . . . 22
INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Power-up Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 R EAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 R EAD Memory Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 R EAD Primary Flash Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 R EAD Memory Sector Protection Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 R eading the Erase/Program Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 D ata Polling (DQ7) - DQ15 for Motorola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Toggle Flag (DQ6) DQ14 for Motorola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Error Flag (DQ5) DQ13 for Motorola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Erase Time-out Flag (DQ3) DQ11 for Motorola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 PROGRAMMING FLASH MEMORY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 D ata Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 D ata Toggle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2/104
PSD 4256G 6V
U nlock Bypass. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ERA SING FLASH MEMORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Flash Bulk Erase . . . . . . . . . . . . . Flash Sector Erase . . . . . . . . . . . Suspend Sector Erase . . . . . . . . R esume Sector Erase . . . . . . . . . . . ... . . ... . . ... . . ... . . .. . . .. . . .. . . .. . . ... . . ... . . ... . . ... . . .. . . .. . . .. . . .. . . ... . . ... . . ... . . ... . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . . . 30 . . . . 30 . . . . 30 . . . . 30
SPECIFIC FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Flash Memory Sector Protect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 R ESET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 R eset (RESET) Pin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 SRA M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 MEMORY SELECT SIGNALS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Memory Select Configuration for MCUs with Separate Program and Data Spaces . . . . . . . . 32 C onfiguration Modes for MCUs with Separate Program and Data Spaces . . . . . . . . . . . . . . . 33 C ombined Space Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 80C31 Memory Map Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 PAGE REGISTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 MEMORY ID REGISTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 PLDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 The Turbo Bit in PSD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 DEC ODE PLD (DPLD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 COMPLEX PLD (CPLD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Output Macrocell (OMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Product Term Allocator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Loading and Reading the Output Macrocells (OMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 The OMC Mask Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 The Output Enable of the OMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Input Macrocells (IMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 External Chip Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 MCU BUS INTERFACE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 PSD Interface to a Multiplexed Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 PSD Interface to a Non-Multiplexed, 16-bit Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 D ata Byte Enable Reference for a 16-bit Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 16-bit MCU Bus Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 80C196 and 80C186 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3/104
PSD4256G6V
MC683xx and MC68HC16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8 0C 51X A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 H 8/300 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 M M C 2001 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 C 16x Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 8-bit MCU Bus Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 8 0C 31 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 8 0C 251 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 8 0C 51X A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6 8H C 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 I/O PORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 General Port Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Port Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 MCU I/O Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 PLD I/O Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 A ddress Out Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 A ddress In Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 D ata Port Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Peripheral I/O Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 JTAG In-System Programming (ISP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 MCU RESET Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Port Configuration Registers (PCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 C ontrol Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 D irection Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 D rive Select Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Port Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 D ata In. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 D ata Out Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Output Macrocells (OMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Mask Macrocell Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Input Macrocells (IMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Enable Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Ports A, B and C Functionality and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Port D Functionality and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Port E Functionality and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Port F Functionality and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Port G Functionality and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 POWER MANAGEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 A utomatic Power-down (APD) Unit and Power-down Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Power-down Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Other Power Saving Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 PLD Power Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 SRAM Standby Mode (Battery Backup). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 PSD Chip Select Input (CSI, PD2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4/104
PSD 4256G 6V
Input Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Input Control Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 RESET TIMING AND DEVICE STATUS AT RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Power-on RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 W arm RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 I/O Pin, Register and PLD Status at RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 R ESET of Flash Memory Erase and Program Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 PROGRAMMING IN-CIRCUIT USING THE JTAG SERIAL INTERFACE . . . . . . . . . . . . . . . . . . . . . . 78 Standard JTAG Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 JTAG Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Security and Flash memory Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 INITIAL DELIVERY STATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 AC/DC PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 MAXIMU M RATING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 DC AND AC PARAMETERS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 PAC KAGE MECHANICAL INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 PAR T NUMBERING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 APPENDIX A.PIN ASSIGNMENTS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 REVISION HISTORY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5/104
PSD4256G6V
SUMMARY DESCRIPTION
The PSD family of memory systems for microcontrollers (MCUs) brings In-System-Programmability (ISP) to Flash memory and programmable logic. The result is a simple and flexible solution for embedded designs. PSD devices combine many of the peripheral functions found in MCU-based applications (8-bit or 16-bit), such as configurable memories, PLD logic, and I/O. PSD devices integrate an optimized Macrocell logic architecture. The Macrocell was created to address the unique requirements of embedded system designs. It allows direct connection between the system address/data bus, and the internal PSD registers, to simplify communication between the MCU and other supporting devices. The PSD family offers two methods to program the PSD Flash memory while the PSD is soldered to the circuit board: In-System Programming (ISP) via JTAG, and In-Application Programming (IAP). In-System Programming (ISP) via JTAG An IEEE 1149.1 compliant JTAG In-System Programming (ISP) interface is included on the PSD enabling the entire device (Flash memories, PLD, configuration) to be rapidly programmed while soldered to the circuit board. This requires no MCU participation, which means the PSD can be programmed anytime, even when completely blank. The innovative JTAG interface to Flash memories is an industry first, solving key problems faced by designers and manufacturing houses, such as: First time programming. H ow do I get firmware into the Flash memory the very first time? JTAG is the answer. Program the blank PSD with no MCU involvement. Inventory build-up of pre-programmed devices. How do I maintain an accurate count of preprogrammed Flash memory and PLD devices based on customer demand? How many and what version? JTAG is the answer. Build your hardware with blank PSDs soldered directly to the board and then custom program just before they are shipped to the customer. No more labels on chips, and no more wasted inventory. Expensive sockets. How do I eliminate the need for expensive and unreliable sockets? JTAG is the answer. Solder the PSD directly to the circuit board. Program first time and subsequent times with JTAG. No need to handle devices and bend the fragile leads. In-Application Programming (IAP) Two independent Flash memory arrays are included so that the MCU can execute code from one while erasing and programming the other. Robust product firmware updates in the filed are possible over any communication channel (e.g., CAN, Ethernet, UART, J1850) using this unique architecture. Designers are relieved of these problems: Simultaneous READ and WRITE to Flash memory. How can the MCU program the same memory from which it executing code? It cannot. The PSD allows the MCU to operate the two Flash memory blocks concurrently, reading code from one while erasing and programming the other during IAP. Complex memory mapping. How can I map these two memories efficiently? A programmable Decode PLD (DPLD) is embedded in the PSD MODULE. The concurrent PSD memories can be mapped anywhere in MCU address space, segment by segment with extremely high address resolution. As an option, the secondary Flash memory can be swapped out of the system memory map when IAP is complete. A built-in page register breaks the MCU address limit. Separate Program and Data space. How can I write to Flash memory while it resides in Program space during field firmware updates? My 80C51XA will not allow it. The PSD provides means to reclassify Flash memory as Data space during IAP, then back to Program space when complete. PSDsoft PSDsoft, a software development tool from ST, guides you through the design process step-bystep making it possible to complete an embedded MCU design capable of ISP/IAP in just hours. Select your MCU and PSDsoft takes you through the remainder of the design with point and click entry, covering PSD selection, pin definitions, programmable logic inputs and outputs, MCU memory map definition, ANSI-C code generation for your MCU, and merging your MCU firmware with the PSD design. When complete, two different device programmers are supported directly from PSDsoft: FlashLINK (JTAG) and PSDpro.
6/104
PSD 4256G 6V
Figure 2. Logic Diagram
VCC
Table 1. Pin Names
PA0-PA7 PB0-PB7 Port-A Port-B Port-C Port-D Port-E Port-F Port-G Address/Data Control Reset Supply Voltage Ground
8 PA0-PA7 8 PB0-PB7 3 CNTL0CNTL2 4 PSD4xxxGx 16 AD0-AD15 8 RESET 8 PG0-PG7 PF0-PF7 8 PE0-PE7 PD0-PD3 8 PC0-PC7
PC0-PC7 PD0-PD3 PE0-PE7 PF0-PF7 PG0-PG7 AD0-AD15 CNTL0-CNTL2 RESET V CC VSS
VSS
AI04916
7/104
PSD4256G6V
Figure 3. TQFP80 Connections
70 GND
69 VCC 68 PB7
80 PD1
79 PD0
67 PB6
66 PB5
65 PB4
64 PB3
63 PB2
62 PB1
PD2 1 PD3 2 AD0 3 AD1 4 AD2 5 AD3 6 AD4 7 GND 8 VCC 9 AD5 10 AD6 11 AD7 12 AD8 13 AD9 14 AD10 15 AD11 16 AD12 17 AD13 18 AD14 19 AD15 20
61 PB0
78 PE7
77 PE6
76 PE5
75 PE4
74 PE3
73 PE2
72 PE1
71 PE0
60 CNTL1 59 CNTL0 58 PA7 57 PA6 56 PA5 55 PA4 54 PA3 53 PA2 52 PA1 51 PA0 50 GND 49 GND 48 PC7 47 PC6 46 PC5 45 PC4 44 PC3 43 PC2 42 PC1 41 PC0
PG0 21
PG1 22
PG2 23
PG3 24
PG4 25
PG5 26
PG6 27
PG7 28
VCC 29 GND 30
PF0 31
PF1 32
PF2 33
PF3 34
PF4 35
PF5 36
PF6 37
PF7 38
RESET 39
CNTL2 40
AI04943
8/104
PSD 4256G 6V
Table 2. TQFP80 Pin Description
Pin Name Pin Type Description This is the lower Address/Data port. Connect your MCU address or address/data bus according to the following rules: If your MCU has a multiplexed address/data bus where the data is multiplexed with the lower address bits, connect AD0-AD7 to this port; If your MCU does not have a multiplexed address/data bus, connect A0-A7 to this port; and If you are using an 80C51XA in burst mode, connect A4/D0 through A11/D7 to this port. ALE or AS latches the address. The PSD drives data out only if the READ signal is active and one of the PSD functional blocks has been selected. The addresses on this port are passed to the PLDs. This is the upper Address/Data port. Connect your MCU address or address/data bus according to the following rules: If your MCU has a multiplexed address/data bus where the data is multiplexed with the address bits, connect A8-A15 or AD8-AD15 to this port; If your MCU does not have a multiplexed address/data bus, connect A8-A15 to this port; and If you are using an 80C51XA in burst mode, connect A12/D8 through A19/D15 to this port. ALE or AS latches the address. The PSD drives data out only if the READ signal is active and one of the PSD functional blocks has been selected. The addresses on this port are passed to the PLDs. The following control signals can be connected to this pin, based on your MCU: WR active Low, WRITE Strobe input R_W active High, READ/active Low WRITE input WRL active Low, WRITE to Low-byte This pin is connected to the PLDs. Therefore, these signals can be used in decode and other logic equations. The following control signals can be connected to this pin, based on your MCU: 1RD active Low, READ Strobe input E E clock input DS active Low, Data Strobe input LDS active Low, Strobe for low data byte This pin is connected to the PLDs. Therefore, these signals can be used in decode and other logic equations. READ or other Control input pin, with multiple configurations. Depending on the MCU interface selected, this pin can be: PSEN Program Select Enable, active Low in code retrieve bus cycle (80C51XA mode); BHE High-byte enable, 16-bit data bus; UDS active Low, Strobe for high data byte, 16-bit data bus mode; SIZ0 Byte enable input; or LSTRB Low Strobe input. This pin is also connected to the PLDs. Active Low input. Resets I/O Ports, PLD Macrocells and some of the Configuration Registers and JTAG registers. Must be Low at Power-up. RESET also aborts any Flash memory Program or Erase cycle that is currently in progress. These pins make up Port A. These port pins are configurable and can have the following functions: MCU I/O standard output or input port; CPLD Macrocell (McellA0-McellA7) outputs; and Latched, transparent or registered PLD inputs (can also be PLD input for address A16 and above)
ADIO0ADIO7
3 -7 10-12
I/O
ADIO8ADIO15
13-20
I/O
CNTL0
59
I
CNTL1
60
I
CNTL2
40
I
RESET
39
I
PA0-PA7
51-58
I/O CMOS or Open Drain
9/104
PSD4256G6V
Pin Name Pin Type I/O CMOS or Open Drain Description These pins make up Port B. These port pins are configurable and can have the following functions: MCU I/O standard output or input port; CPLD Macrocell (McellB0-McellB7) outputs; and Latched, transparent or registered PLD inputs (can also be PLD input for address A16 and above).
PB0-PB7
61-68
PC0-PC7
41-48
These pins make up Port C. These port pins are configurable and can have the following functions: MCU I/O standard output or input port; I/O CMOS External Chip Select (ECS0-ECS7) outputs; and Latched, transparent or registered PLD inputs (can also be PLD input for address A16 and above). I/O CMOS or Open Drain I/O CMOS or Open Drain PD0 pin of Port D. This port pin can be configured to have the following functions: ALE/AS input latches address on ADIO0-ADIO15; AS input latches address on ADIO0-ADIO15 on the rising edge; MCU I/O standard output or input port; and Transparent PLD input (can also be PLD input for address A16 and above). PD1 pin of Port D. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Transparent PLD input (can also be PLD input for address A16 and above); and CLKIN clock input to the CPLD Macrocells, the APD Unit's Power-down counter, and the CPLD AND Array.
PD0
79
PD1
80
PD2
1
PD2 pin of Port D. This port pin can be configured to have the following functions: I/O MCU I/O standard output or input port; CMOS Transparent PLD input (can also be PLD input for address A16 and above); and or Open PSD Chip Select Input (CSI). When Low, the MCU can access the PSD memory and I/O. When High, the PSD memory blocks are disabled to conserve power. The Drain falling edge of this signal can be used to get the device out of Power-down mode. I/O CMOS or Open Drain I/O CMOS or Open Drain I/O CMOS or Open Drain I/O CMOS or Open Drain PD3 pin of Port D. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Transparent PLD input (can also be PLD input for address A16 and above); and WRH for 16-bit data bus, WRITE to high byte, active low. PE0 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and TMS Input for the JTAG Serial Interface. PE1 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and TCK Input for the JTAG Serial Interface. PE2 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and TDI input for the JTAG Serial Interface.
PD3
2
PE0
71
PE1
72
PE2
73
10/104
PSD 4256G 6V
Pin Name Pin Type I/O CMOS or Open Drain I/O CMOS or Open Drain I/O CMOS or Open Drain I/O CMOS or Open Drain I/O CMOS or Open Drain Description PE3 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and TDO output for the JTAG Serial Interface. PE4 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output: TSTAT output for the JTAG Serial Interface; and Ready/Busy output for parallel In-System Programming (ISP). PE5 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and TERR active Low output for the JTAG Serial Interface. PE6 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and VSTBY SRAM standby voltage input for SRAM battery backup. PE7 pin of Port E. This port pin can be configured to have the following functions: MCU I/O standard output or input port; Latched address output; and Battery-on Indicator (VBATON). Goes High when power is being drawn from the external battery.
PE3
74
PE4
75
PE5
76
PE6
77
PE7
78
PF0-PF7
31-38
These pins make up Port F. These port pins are configurable and can have the following functions: MCU I/O standard output or input port; I/O CMOS External Chip Select (ECS0-ECS7) outputs, or inputs to CPLD; Latched address outputs; or Open Address A1-A3 inputs in 80C51XA mode (PF0 is grounded); Drain Data bus port (D0-D7) in a non-multiplexed bus configuration; Peripheral I/O mode; and MCU RESET Mode. I/O CMOS or Open Drain These pins make up Port G. These port pins are configurable and can have the following functions: MCU I/O standard output or input port; Latched address outputs; Data bus port (D8-D15) in a non-multiplexed, 16-bit bus configuration; and MCU RESET Mode. Supply Voltage
PG0-PG7
21-28
VCC
9, 29, 69 8, 30, 49, 50, 70
GND
Ground pins
Note: Signal names that have multiple names or functions are defined using PSDsoft.
11/104
12/104
ADDRESS/ DATA/CONTROL BUS PLD INPUT BUS PAGE REGISTER EMBEDDED ALGORITHM 16 SECTORS 8 MBIT PRIMARY FLASH MEMORY POWER MANGMT UNIT VSTDBY (P E 6 ) 8 SECTOR SELECTS FLASH DECODE PLD (DPLD) 82 SECTOR SELECTS SRAM SELECT ADIO PORT CSIOP RUNTIME CONTROL AND I/O REGISTERS 8 EXT CS TO PORT C or F 16 OUTPUT MACROCELLS PORT A & B 24 INPUT MACROCELLS CLKIN PROG. PORT PORT G CLKIN MACROCELL FEEDBACK OR PORT INPUT PORT F PROG. PORT PORT D PORT A ,B & C PERIP I/O MODE SELECTS PORT A 256 KBIT BATTERY BACKUP SRAM PROG. MCU BUS INTRF. 512 KBIT SECONDARY FLASH MEMORY (BOOT OR DATA) 4 SECTORS PROG. PORT PA0 PA7 PROG. PORT PORT F 82 FLASH ISP CPLD (CPLD) PROG. PORT PORT B PB0 PB7 PROG. PORT PORT C PC0 PC7 PD0 PD3 CLKIN GLOBAL CONFIG. & SECURITY PLD, CONFIGURATION & FLASH MEMORY LOADER JTAG SERIAL CHANNEL PROG. PORT PORT E PE0 PE7
PSD4256G6V
Figure 4. PSD Block Diagram
CNTL0, CNTL1, CNTL2
AD0 AD15
Note: Additional address lines can be brought in to the device via Port A, B, C, D, or F.
PF0 PF7
PG0 PG7
AI04917
PSD 4256G 6V
PSD ARCHITECTURAL OVERVIEW
PSD devices contain several major functional blocks. Figure 4., page 12 shows the architecture of the PSD device family. The functions of each block are described briefly in the following sections. Many of the blocks perform multiple functions and are user configurable. Mem ory Each of the memory blocks is briefly discussed in the following paragraphs. A more detailed discussion can be found in Memory Blocks, page 21. The 8Mbit primary Flash memory is the main memory of the PSD. It is divided into 16 equallysized sectors that are individually selectable. The 512Kbit secondary Flash memory is divided into 4 sectors. Each sector is individually selectable. The 256Kbit SRAM is intended for use as a scratch-pad memory or as an extension to the MCU SRAM. If an external battery is connected to the PSD's Voltage Standby (VSTBY, PE6) signal, data is retained in the event of power failure. Each memory block can be located in a different address space as defined by the user. The access times for all memory types includes the address latching and DPLD decoding time. PLDs The device contains two PLD blocks, the Decode PLD (DPLD) and the Complex PLD (CPLD), as shown in Table 2., page 9, each optimized for a different function. The functional partitioning of the PLDs reduces power consumption, optimizes cost/performance, and eases design entry. The DPLD is used to decode addresses and to generate Sector Select signals for the PSD internal memory and registers. The DPLD has combinatorial outputs, while the CPLD can implement more general user-defined logic functions. The CPLD has 16 Output Macrocells (OMC) and 8 combinatorial outputs. The PSD also has 24 Input Macrocells (IMC) that can be configured as inputs to the PLDs. The PLDs receive their inputs from the PLD Input Bus and are differentiated by their output destinations, number of product terms, and Macrocells. The PLDs consume minimal power. The speed and power consumption of the PLD is controlled by the Turbo Bit in PMMR0 and other bits in PMMR2. These registers are set by the MCU at run-time. There is a slight penalty to PLD propagation time when not in the Turbo mode. I/O Ports The PSD has 52 I/O pins divided among seven ports (Port A, B, C, D, E, F, and G). Each I/O pin can be individually configured for different functions. Ports can be configured as standard MCU I/ O ports, PLD I/O, or latched address outputs for MCUs using multiplexed address/data buses. The JTAG pins can be enabled on Port E for InSystem Programming (ISP). MCU Bus Interface The PSD easily interfaces with most 8-bit or 16-bit MCUs, either with multiplexed or non-multiplexed address/data buses. The device is configured to respond to the MCU's control pins, which are also used as inputs to the PLDs. ISP via JTAG Port In-System Programming (ISP) can be performed through the JTAG signals on Port E. This serial interface allows complete programming of the entire PSD MODULE device. A blank device can be completely programmed. The JTAG signals (TMS, TCK, TSTAT, TERR, TDI, TDO) can be multiplexed with other functions on Port E. Table 3 indicates the JTAG pin assignments. Table 3. PLD I/O
Name Decode PLD (DPLD) Complex PLD (CPLD) Inpu ts 82 82 Outp uts 17 24 Product Terms 43 150
Table 4. JTAG Signals on Port E
Port E Pins PE0 PE1 PE2 PE3 PE4 PE5 TM S TC K TD I TD O TSTAT TE R R JTAG Signal
13/104
PSD4256G6V
In-System Programming (ISP) Using the JTAG signals on Port E, the entire PSD device (memory, logic, configuration) can be programmed or erased without the use of the MCU. In-Application Programming (IAP) The primary Flash memory can also be programmed, or re-programmed, in-system by the MCU executing the programming algorithms out of the secondary Flash memory, or SRAM. The secondary Flash memory can be programmed the same way by executing out of the primary Flash memory. Table 5., page 14 indicates which programming methods can program different functional blocks of the PSD. Page Register The 8-bit Page Register expands the address range of the MCU by up to 256 times. The paged address can be used as part of the address space to access external memory and peripherals, or internal memory and I/O. The Page Register can also be used to change the address mapping of the Flash memory blocks into different memory spaces for IAP. Power Management Unit (PMU) The Power Management Unit (PMU) gives the user control of the power consumption on selected functional blocks based on system requirements. The PMU includes an Automatic Power-down (APD) Unit that turns off device functions during MCU inactivity. The APD Unit has a Power-down mode that helps reduce power consumption. The PSDalso has some bits that are configured at run-time by the MCU to reduce power consumption of the CPLD. The Turbo Bit in PMMR0 can be reset to '0' and the CPLD latches its outputs and goes to Standby Mode until the next transition on its inputs. Additionally, bits in PMMR2 can be set by the MCU to block signals from entering the CPLD to reduce power consumption. See POWER MANAGEMENT, page 72 for more details.
Table 5. Methods of Programming Different Functional Blocks of the PSD
Functional Block Primary Flash Memory Secondary Flash memory PLD Array (DPLD and CPLD) PSD Configuration JTAG-ISP Yes Yes Yes Yes Device Programmer Yes Yes Yes Yes IAP Yes Yes No No
14/104
PSD 4256G 6V
DEVELOPMENT SYSTEM
The PSD family is supported by PSDsoft, a Windows-based software development tool (Windows-95, Windows-98, Windows-NT). A PSD design is quickly and easily produced in a point and click environment. The designer does not need to enter Hardware Description Language (HDL) equations, unless desired, to define PSD pin functions and memory map information. The general design flow is shown in Figure 5. PSDsoft is available from our web site (the address is given on the back page of this data sheet) or other distribution channels. Figure 5. PSDsoft Development Tool
Choose MCU and PSD
Automatically configures MCU bus interface and other PSD attributes
PSDsoft directly supports two low cost device programmers form ST: PSDpro and FlashLINK (JTAG). Both of these programmers may be purchased through your local distributor/representative, or directly from our web site using a credit card. The PSD is also supported by third party device programmers. See our web site for the current list.
Define PSD Pin and Node Functions
Point and click definition of PSD pin functions, internal nodes, and MCU system memory map
Define General Purpose Logic in CPLD
Point and click definition of combinatorial and registered logic in CPLD. Access HDL is available if needed
C Code Generation
GENERATE C CODE SPECIFIC TO PSD FUNCTIONS
Merge MCU Firmware with PSD Configuration
A composite object file is created containing MCU firmware and PSD configuration
MCU FIRMWARE HEX OR S-RECORD FORMAT
USER'S CHOICE OF MICROCONTROLLER COMPILER/LINKER
*.OBJ FILE
PSD Programmer
PSDPro, or FlashLINK (JTAG)
*.OBJ FILE AVAILABLE FOR 3rd PARTY PROGRAMMERS (CONVENTIONAL or JTAG-ISC)
AI04919
15/104
PSD4256G6V
PSD REGISTER DESCRIPTION AND ADDRESS OFFSETS
Table 6 shows the offset addresses to the PSD registers relative to the CSIOP base address. The CSIOP space is the 256 bytes of address that is allocated by the user to the internal PSD registers. Table 6. Register Address Offset
Register Name Data In Control Data Out Direction Drive Select Input Macrocell Enable Out Output Macrocells A Output Macrocells B Mask Macrocells A Mask Macrocells B Flash Memory Protection 1 Flash Memory Protection 2 Flash Boot Protection JTAG Enable PMMR0 PMMR2 Page VM Memory_ID0 Memory_ID1
Note: 1. Other registers that are not part of the I/O ports.
Table 6 provides brief descriptions of the registers in CSIOP space. The following sections give a more detailed description.
Port Port Port Port Port Port Port Other(1) A B C D E F G 00 01 10 11 30 32 04 06 08 0A 0C 20 21 22 23 C0 C1 C2 C7 B0 B4 E0 E2 F0 F1 05 07 09 0B 0D 1C 14 16 15 17 19 1A 4C 34 36 38 40 42 44 46 41 43 45 47 49
Description Reads Port pin as input, MCU I/O input mode Selects mode between MCU I/O or Address Out Stores data for output to Port pins, MCU I/O output mode Configures Port pin as input or output Configures Port pins as either CMOS or Open Drain Reads Input Macrocells Reads the status of the output enable to the I/ O Port driver READ reads output of Macrocells A WRITE loads Macrocell Flip-flops READ reads output of Macrocells B WRITE loads Macrocell Flip-flops Blocks writing to the Output Macrocells A Blocks writing to the Output Macrocells B Read only Primary Flash Sector Protection Read only Primary Flash Sector Protection Read only PSD Security and Secondary Flash memory Sector Protection Enables JTAG Port Power Management Register 0 Power Management Register 2 Page Register Places PSD memory areas in Program and/ or Data space on an individual basis. Read only SRAM and Primary memory size Read only Secondary memory type and size
16/104
PSD 4256G 6V
REGISTER BIT DEFINITION
All the registers of the PSD are included here for reference. Detailed descriptions of these registers can be found in the following sections. Table 7. Data-In Registers - Ports A, B, C, D, E, F, and G
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions (Read only registers): READ Port pin status when Port is in MCU I/O input mode.
Table 8. Data-Out Registers - Ports A, B, C, D, E, F, and G
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions: Latched data for output to Port pin when pin is configured in MCU I/O output mode.
Table 9. Direction Registers - Ports A, B, C, D, E, F, and G
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions: Portpin 0 = Port pin is configured in Input mode (default). Portpin 1 = Port pin is configured in Output mode.
Table 10. Control Registers - Ports E, F, and G
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions: Portpin 0 = Port pin is configured in MCU I/O mode (default). Portpin 1 = Port pin is configured in Latched Address Out mode.
Table 11. Drive Registers - Ports A, B, D, E, and G
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions: Portpin 0 = Port pin is configured for CMOS Output driver (default). Portpin 1 = Port pin is configured for Open Drain output driver.
Table 12. Enable-Out Registers - Ports A, B, C, and F
B it 7 Por t pin 7 Bit 6 Port pin 6 Bit 5 Port pin 5 Bit 4 Port pin 4 Bit 3 Port pin 3 Bit 2 Port pin 2 Bit 1 Port pin 1 Bit 0 Por t pin 0
Note: Bit Definitions (Read only registers): Portpin 0 = Port pin is in tri-state driver (default). Portpin 1 = Port pin is enabled.
Table 13. Input Macrocells - Ports A, B, and C
B it 7 IM cell 7 Bit 6 IMcell 6 Bit 5 IMcell 5 Bit 4 IMcell 4 Bit 3 IMcell 3 Bit 2 IMcell 2 Bit 1 IMcell 1 Bit 0 IMcell 0
Note: Bit Definitions (Read only registers): READ Input Macrocell (IMC7-IMC0) status on Ports A, B, and C.
17/104
PSD4256G6V
Table 14. Output Macrocells A Register
B it 7 Mcella 7 Bit 6 Mcella 6 Bit 5 Mcella 5 Bit 4 Mcella 4 Bit 3 Mcella 3 Bit 2 Mcella 2 Bit 1 Mcella 1 Bit 0 Mcella 0
Note: Bit Definitions: WRITE Register: Load MCellA7-MCellA0 with '0' or '1.' READ Register: Read MCellA7-MCellA0 output status.
Table 15. Out Macrocells B Register
B it 7 Mcellb 7 Bit 6 Mcellb 6 Bit 5 Mcellb 5 Bit 4 Mcellb 4 Bit 3 Mcellb 3 Bit 2 Mcellb 2 Bit 1 Mcellb 1 Bit 0 Mcellb 0
Note: Bit Definitions: WRITE Register: Load MCellB7-MCellB0 with '0' or '1.' READ Register: Read MCellB7-MCellB0 output status.
Table 16. Mask Macrocells A Register
B it 7 Mcella 7 Bit 6 Mcella 6 Bit 5 Mcella 5 Bit 4 Mcella 4 Bit 3 Mcella 3 Bit 2 Mcella 2 Bit 1 Mcella 1 Bit 0 Mcella 0
Note: Bit Definitions: McellA_Prot 0 = Allow MCellA flip-flop to be loaded by MCU (default). McellA_Prot 1 = Prevent MCellA flip-flop from being loaded by MCU.
Table 17. Mask Macrocells B Register
B it 7 Mcellb 7 Bit 6 Mcellb 6 Bit 5 Mcellb 5 Bit 4 Mcellb 4 Bit 3 Mcellb 3 Bit 2 Mcellb 2 Bit 1 Mcellb 1 Bit 0 Mcellb 0
Note: Bit Definitions: McellB_Prot 0 = Allow MCellB flip-flop to be loaded by MCU (default). McellB_Prot 1 = Prevent MCellB flip-flop from being loaded by MCU.
Table 18. Flash Memory Protection Register 1
B it 7 Sec7_Prot Bit 6 Sec6_Prot Bit 5 Sec5_Prot Bit 4 Sec4_Prot Bit 3 Sec3_Prot Bit 2 Sec2_Prot Bit 1 Sec1_Prot Bit 0 Sec0_Prot
Note: Bit Definitions (Read only register): Sec_Prot 1 = Primary Flash memory Sector is write protected. Sec_Prot 0 = Primary Flash memory Sector is not write protected.
Table 19. Flash Memory Protections Register 2
B it 7 Sec15_Prot Bit 6 Sec14_Prot Bit 5 Sec13_Prot Bit 4 Sec12_Prot Bit 3 Sec11_Prot Bit 2 Sec10_Prot Bit 1 Sec9_Prot Bit 0 Sec8_Prot
Note: Bit Definitions (Read only register): Sec_Prot 1 = Primary Flash memory Sector is write protected. Sec_Prot 0 = Primary Flash memory Sector is not write protected.
Table 20. Flash Boot Protection Register
B it 7 Security_Bit Bit 6 not used Bit 5 not used Bit 4 not used Bit 3 Sec3_Prot Bit 2 Sec2_Prot Bit 1 Sec1_Prot Bit 0 Sec0_Prot
Note: Bit Definitions: Sec_Prot 1 = Secondary Flash memory Sector is write protected. Sec_Prot 0 = Secondary Flash memory Sector is not write protected. Security_Bit 0 = Security Bit in device has not been set. Security_Bit 1 = Security Bit in device has been set.
18/104
PSD 4256G 6V
Table 21. JTAG Enable Register
B it 7 not used Bit 6 not used Bit 5 not used Bit 4 not used Bit 3 not used Bit 2 not used Bit 1 not used Bit 0 JTAGEnable
Note: Bit Definitions: JTAGEnable 1 = JTAG Port is enabled. JTAGEnable 0 = JTAG Port is disabled.
Table 22. Page Register
B it 7 PGR 7 Bit 6 PGR 6 Bit 5 PGR 5 Bit 4 PGR 4 Bit 3 PGR 3 Bit 2 PGR 2 Bit 1 PGR 1 Bit 0 PGR 0
Note: Bit Definitions: Configure Page input to PLD. Default is PGR7-PGR0 = '0.'
Table 23. PMMR0 Register
B it 7 not used (set to 0) Bit 6 not used (set to 0) Bit 5 PLD MCells CLK Bit 4 PLD Array CLK Bit 3 PLD Turbo Bit 2 not used (set to 0) Bit 1 APD Enable Bit 0 not used (set to 0)
Note: The bits of this register are cleared to zero following power-up. Subsequent Reset (RESET) pulses do not clear the registers. Bit Definitions: APD Enable 0 = Automatic Power-down (APD) is disabled. 1 = Automatic Power-down (APD) is enabled. PLD Turbo 0 = PLD Turbo is on. 1 = PLD Turbo is off, saving power. PLD Array CLK 0 = CLKIN to the PLD AND array is connected. Every CLKIN change powers up the PLD when Turbo Bit is off. 1 = CLKIN to the PLD AND array is disconnected, saving power. PLD MCells CLK 0 = CLKIN to the PLD Macrocells is connected. 1 = CLKIN to the PLD Macrocells is disconnected, saving power.
Table 24. PMMR2 Register
B it 7 not used (set to 0) Bit 6 PLD Array WRH Bit 5 PLD Array ALE Bit 4 PLD Array CNTL2 Bit 3 PLD Array CNTL1 Bit 2 PLD Array CNTL0 Bit 1 not used (set to 0) Bit 0 PLD Array Addr
Note: For Bit 4, Bit 3, Bit 2: See Table 35., page 44 for the signals that are blocked on pins CNTL0-CNTL2. Bit Definitions: PLD Array Addr 0 = Address A7-A0 are connected to the PLD array. 1 = Address A7-A0 are blocked from the PLD array, saving power. Note: In X A Mode, A3-A0 come from PF3-PF0, and A7-A4 come from ADIO7-ADIO4. PLD Array CNTL2 0 = CNTL2 input to the PLD AND array is connected. 1 = CNTL2 input to the PLD AND array is disconnected, saving power. PLD Array CNTL1 0 = CNTL1 input to the PLD AND array is connected. 1 = CNTL1 input to the PLD AND array is disconnected, saving power. PLD Array CNTL0 0 = CNTL0 input to the PLD AND array is connected. 1 = CNTL0 input to the PLD AND array is disconnected, saving power. PLD Array ALE 0 = ALE input to the PLD AND array is connected. 1 = ALE input to the PLD AND array is disconnected, saving power. PLD Array WRH 0 = WRH/DBE input to the PLD AND array is connected. 1 = WRH/DBE input to the PLD AND array is disconnected, saving power.
19/104
PSD4256G6V
Table 25. VM Register
B it 7 Peripheral mode Bit 6 not used (set to 0) Bit 5 not used (set to 0) Bit 4 FL_data Bit 3 Boot_data Bit 2 FL_code Bit 1 Boot_code Bit 0 SR_code
Note: On RESET, Bits 1-4 are loaded to configurations that are selected by the user in PSDsoft. Bit 0 and Bit 7 are always cleared on RESET. Bit 0-4 are active only when the device is configured in 8051 Mode. Bit Definitions: SR_code 0 = PSEN cannot access SRAM in 80C51XA modes. 1 = PSEN can access SRAM in 80C51XA modes. Boot_Code 0 = PSEN cannot access Secondary NVM in 80C51XA modes. 1 = PSEN can access Secondary NVM in 80C51XA modes. FL_Code 0 = PSEN cannot access Primary Flash memory in 80C51XA modes. 1 = PSEN can access Primary Flash memory in 80C51XA modes. Boot_data 0 = RD cannot access Secondary NVM in 80C51XA modes. 1 = RD can access Secondary NVM in 80C51XA modes. FL_data 0 = RD cannot access Primary Flash memory in 80C51XA modes. 1 = RD can access Primary Flash memory in 80C51XA modes. Peripheral mode 0 = Peripheral mode of Port F is disabled. 1 = Peripheral mode of Port F is enabled.
Table 26. Memory_ID0 Register
B it 7 S_size 3 Bit 6 S_size 2 Bit 5 S_size 1 Bit 4 S_size 0 Bit 3 F_size 3 Bit 2 F_size 2 Bit 1 F_size 1 Bit 0 F_size 0
Note: Bit Definitions: F_size[3:0]
S_size[3:0]
0h = There is no Primary Flash memory 1h = Primary Flash memory size is 256Kbit 2h = Primary Flash memory size is 512Kbit 3h = Primary Flash memory size is 1Mbit 4h = Primary Flash memory size is 2Mbit 5h = Primary Flash memory size is 4Mbit 6h = Primary Flash memory size is 8Mbit 0h = There is no SRAM 1h = SRAM size is 16Kbit 2h = SRAM size is 32Kbit 3h = SRAM size is 64Kbit 4h = SRAM size is 128Kbit 5h = SRAM size is 256Kbit
Table 27. Memory_ID1 Register
B it 7 not used (set to 0) Bit 6 not used (set to 0) Bit 5 B_type 1 Bit 4 B_type 0 Bit 3 B_size 3 Bit 2 B_size 2 Bit 1 B_size 1 Bit 0 B_size 0
Note: Bit Definitions: F_size[3:0]
S_size[3:0]
0h = There is no Secondary NVM 1h = Secondary NVM size is 128Kbit 2h = Secondary NVM size is 256Kbit 3h = Secondary NVM size is 512Kbit 0h = Secondary NVM is Flash memory 1h = Secondary NVM is EEPROM
20/104
PSD 4256G 6V
DETAILED OPERATION
As shown in Figure 4., page 12, the PSD consists of six major types of functional blocks: Memory Blocks MCU Bus Interface I/O Ports Power Management Unit (PMU) JTAG-ISP Interface The functions of each block are described in the following sections. Many of the blocks perform multiple functions, and are user configurable. Table 28. Memory Block Size and Organization
Primary Flash Memory Sector Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Total Sector Size (Bytes) 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 64K 1024K Sector Select Signal FS0 FS1 FS2 FS3 FS4 FS5 FS6 FS7 FS8 FS9 FS10 FS11 FS12 FS13 FS14 FS15 16 Sectors 64K 4 Sectors 32K Secondary Flash Memory Sector Size (Bytes) 16K 8K 8K 32K Sector Select Signal CSBOOT0 CSBOOT1 CSBOOT2 CSBOOT3 SRAM SRAM Size (Bytes) 32K SRAM Select Signal RS0
Mem ory Blocks The PSD has the following memory blocks: Primary Flash memory Secondary Flash memory S RA M The Memory Select signals for these blocks originate from the Decode PLD (DPLD) and are userdefined in PSDsoft. Table 28 summarizes the sizes and organizations of the memory blocks.
21/104
PSD4256G6V
Primary Flash Memory and Secondary Flash memory Description a Flash memory block is being erased. The output The primary Flash memory is divided evenly into 8 is a '1' (Ready) when no WRITE or Erase cycle is sectors. The secondary Flash memory is divided in progress. into 4 sectors of different size. Each sector of either memory block can be separately protected Mem ory Operation from Program and Erase cycles. The primary Flash memory and secondary Flash Flash memory may be erased on a sector-by-secmemory are addressed through the MCU Bus Intor basis, and programmed word-by-word. Flash terface. The MCU can access these memories in sector erasure may be suspended while data is one of two ways: read from other sectors of the block and then re The MCU can execute a typical bus WRITE or sumed after reading. READ operation just as it would if accessing a During a Program or Erase cycle in Flash memory, RAM or ROM device using standard bus the status can be output on the Ready/Busy pin cycles. (PE4). This pin is set up using PSDsoft. The MCU can execute a specific instruction Memory Block Select Signals that consists of several WRITE and READ The DPLD generates the Select signals for all the operations. This involves writing specific data internal memory blocks (see PLDs, page 35). patterns to special addresses within the Flash Each of the sectors of the primary Flash memory memory to invoke an embedded algorithm. has a Select signal (FS0-FS15) which can contain These instructions are summarized in Table up to three product terms. Each of the sectors of 29., page 23. the secondary Flash memory has a Select signal Typically, the MCU can read Flash memory using (CSBOOT0-CSBOOT3) which can contain up to READ operations, just as it would read a ROM dethree product terms. Having three product terms vice. However, Flash memory can only be erased for each Select signal allows a given sector to be and programmed using specific instructions. For mapped in different areas of system memory. example, the MCU cannot write a single byte diWhen using a MCU with separate Program and rectly to Flash memory as one would write a byte Data space (80C51XA), these flexible Select sigto RAM. To program a word into Flash memory, nals allow dynamic re-mapping of sectors from the MCU must execute a Program instruction, then one memory space to the other before and after test the status of the Programming event. This staIAP. The SRAM block has a single Select signal tus test is achieved by a READ operation or polling (RS0). Ready/Busy (PE4). Ready/Busy (PE4) Flash memory can also be read by using special This signal can be used to output the Ready/Busy instructions to retrieve particular Flash device instatus of the PSD. The output is a '0' (Busy) when formation (sector protect status and ID). a Flash memory block is being written to, or when
22/104
PSD 4256G 6V
Table 29. 16-bit Instructions
Instruction(14) READ(5) READ Main Flash ID(6, 13) READ Sector Protection(6,8,13) Program a Flash Word(13) Flash Sector Erase(7,13) Flash Bulk Erase(13) Suspend Sector Erase(11) Resume Sector Erase(12) RESET(6) Unlock Bypass Unlock Bypass Program(9) Unlock Bypass Reset(10) FS0-FS15 or CSBOOT0CSBOOT3 1 1 Cycle 1 "Read" RD @ RA AAh@ XAAAh AAh@ XAAAh AAh@ XAAAh AAh@ XAAAh AAh@ XAAAh B0h@ XXXXh 30h@ XXXXh F0h@ XXXXh AAh@ XAAAh A0h@ XXXXh 90h@ XXXXh 55h@ X554h PD@ PA 00h@ XXXXh 20h@ XAAAh 55h@ X554h 55h@ X554h 55h@ X554h 55h@ X554h 55h@ X554h 90h@ XAAAh 90h@ XAAAh A0h@ XAAAh 80h@ XAAAh 80h@ XAAAh Read ID @ XX02h Read 00h or 01h @ XX04h PD@ PA AAh@ XAAAh AAh@ XAAAh 55h@ X554h 55h@ X554h 30h@ SA 10h@ XAAAh 30h(7)@ next SA Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7
1
1 1 1 1 1 1 1 1 1
Note: 1. All bus cycles are WRITE bus cycles, except the ones with the "Read" label 2. All values are in hexadecimal: X = "Don't care." Addresses of the form XXXXh, in this table, must be even addresses RA = Address of the memory location to be read RD = Data read from location RA during the READ cycle PA = Address of the memory location to be programmed. Addresses are latched on the falling edge of WRITE Strobe (WR, CNTL0). PA is an even address for PSD in word programming mode. PD = Data word to be programmed at location PA. Data is latched on the rising edge of WRITE Strobe (WR, CNTL0) SA = Address of the sector to be erased or verified. The Sector Select (FS0-FS15 or CSBOOT0-CSBOOT3) of the sector to be erased, or verified, must be Active (High). 3. Sector Select (FS0 to FS15 or CSBOOT0 to CSBOOT3) signals are active High, and are defined in PSDsoft. 4. Only address bits A11-A0 are used in instruction decoding. 5. No Unlock or instruction cycles are required when the device is in the READ Mode 6. The RESET instruction is required to return to the READ Mode after reading the Flash ID, or after reading the Sector Protection Status, or if the Error Flag Bit (DQ5/DQ13) goes High. 7. Additional sectors to be erased must be written at the end of the Sector Erase instruction within 80s. 8. The data is 00h for an unprotected sector, and 01h for a protected sector. In the fourth cycle, the Sector Select is active, and (A1,A0) = (1,0). 9. The Unlock Bypass instruction is required prior to the Unlock Bypass Program instruction. 10. The Unlock Bypass Reset Flash instruction is required to return to reading memory data when the device is in the Unlock Bypass mode. 11. The system may perform READ and Program cycles in non-erasing sectors, read the Flash ID or read the Sector Protection Status when in the Suspend Sector Erase mode. The Suspend Sector Erase instruction is valid only during a Sector Erase cycle. 12. The Resume Sector Erase instruction is valid only during the Suspend Sector Erase mode. 13. The MCU cannot invoke these instructions while executing code from the same Flash memory as that for which the instruction is intended. The MCU must retrieve, for example, the code from the secondary Flash memory when reading the Sector Protection Status of the primary Flash memory. 14. All WRITE bus cycles in an instruction are byte-WRITE to an even address (XAAAh or X554h). A Flash memory Program bus cycle writes a word to an even address.
23/104
PSD4256G6V
Table 30. 8-bit Instructions
Instruction(14) READ(5) READ Main Flash ID(6, 13) READ Sector Protection(6,8,13) Program a Flash Word(13) Flash Sector Erase(7,13) Flash Bulk Erase(13) Suspend Sector Erase(11) Resume Sector Erase(12) RESET(6) Unlock Bypass Unlock Bypass Program(9) Unlock Bypass Reset(10) FS0-FS7 or CSBOOT0CSBOOT3 1 1 Cycle 1 "Read" RD @ RA AAh@ 555h AAh@ 555h AAh@ 555h AAh@ 555h AAh@ 555h B0h@ XXXh 30h@ XXXh F0h@ XXXh AAh@ 555h A0h@ XXXh 90h@ XXXh 55h@ AAAh PD@ PA 00h@ XXXh 20h@ 555h 55h@ AAAh 55h@ AAAh 55h@ AAAh 55h@ AAAh 55h@ AAAh 90h@ 555h 90h@ 555h A0h@ 555h 80h@ 555h 80h@ 555h RE AD ID@ 01h Read 00h or 01h @ 02h PD@ PA AAh@ 555h AAh@ 555h 55h@ AAAh 55h@ AAAh 30h@ SA 10h@ 555h 30h(7)@ next SA Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Cycle 7
1
1 1 1 1 1 1 1 1 1
Note: 1. All bus cycles are WRITE bus cycles, except the ones with the "Read" label 2. All values are in hexadecimal: X = "Don't care." Addresses of the form XXXh, in this table, must be even addresses RA = Address of the memory location to be read RD = Data read from location RA during the READ cycle PA = Address of the memory location to be programmed. Addresses are latched on the falling edge of WRITE Strobe (WR, CNTL0). PA is an even address for PSD in word programming mode. PD = Data word to be programmed at location PA. Data is latched on the rising edge of WRITE Strobe (WR, CNTL0) SA = Address of the sector to be erased or verified. The Sector Select (FS0-FS7 or CSBOOT0-CSBOOT3) of the sector to be erased, or verified, must be Active (High). 3. Sector Select (FS0 to FS7 or CSBOOT0 to CSBOOT3) signals are active High, and are defined in PSDsoft. 4. Only address bits A11-A0 are used in instruction decoding. 5. No Unlock or instruction cycles are required when the device is in the READ Mode 6. The RESET instruction is required to return to the READ Mode after reading the Flash ID, or after reading the Sector Protection Status, or if the Error Flag Bit (DQ5/DQ13) goes High. 7. Additional sectors to be erased must be written at the end of the Sector Erase instruction within 80s. 8. The data is 00h for an unprotected sector, and 01h for a protected sector. In the fourth cycle, the Sector Select is active, and (A1,A0) = (1,0). 9. The Unlock Bypass instruction is required prior to the Unlock Bypass Program instruction. 10. The Unlock Bypass Reset Flash instruction is required to return to reading memory data when the device is in the Unlock Bypass mode. 11. The system may perform READ and Program cycles in non-erasing sectors, read the Flash ID or read the Sector Protection Status when in the Suspend Sector Erase mode. The Suspend Sector Erase instruction is valid only during a Sector Erase cycle. 12. The Resume Sector Erase instruction is valid only during the Suspend Sector Erase mode. 13. The MCU cannot invoke these instructions while executing code from the same Flash memory as that for which the instruction is intended. The MCU must retrieve, for example, the code from the secondary Flash memory when reading the Sector Protection Status of the primary Flash memory. 14. All WRITE bus cycles in an instruction are byte-WRITE to an even address (555h or AAAh). A Flash memory Program bus cycle writes a word to an even address.
24/104
PSD 4256G 6V
INSTRUCTIONS
An instruction consists of a sequence of specific operations. Each received byte is sequentially decoded by the PSD and not executed as a standard WRITE operation. The instruction is executed when the correct number of bytes are properly received and the time between two consecutive bytes is shorter than the time-out period. Some instructions are structured to include READ operations after the initial WRITE operations. The instruction must be followed exactly. Any invalid combination of instruction bytes or time-out between two consecutive bytes while addressing Flash memory resets the device logic into READ Mode (Flash memory is read like a ROM device). The PSD supports the instructions summarized in Table 29., page 23: Erase memory by chip or sector Suspend or resume sector erase Program a Word R ESET to READ Mode R EAD Primary Flash Identifier value R EAD Sector Protection Status B y pas s These instructions are detailed in Table 29., page 23. For efficient decoding of the instructions, the first two bytes of an instruction are the coded cycles and are followed by an instruction byte or confirmation byte. The coded cycles consist of writing the data AAh to address XAAAh during the first cycle and data 55h to address X554h during the second cycle (unless the Bypass instruction feature is used, as described later). Address signals A15-A12 are "Don't care" during the instruction WRITE cycles. However, the appropriate Sector Select signal (FS0-FS15, or CSBOOT0-CSBOOT3) must be selected. The primary and secondary Flash memories have the same instruction set (except for READ Primary Flash Identifier). The Sector Select signals determine which Flash memory is to receive and execute the instruction. The primary Flash memory is selected if any one of its Sector Select signals (FS0-FS15) is High, and the secondary Flash memory is selected if any one of its Sector Select signals (CSBOOT0-CSBOOT3) is High. Power-up Condition The PSD internal logic is reset upon Power-up to the READ Mode. Sector Select (FS0-FS15 and CSBOOT0-CSBOOT3) must be held Low, and WRITE Strobe (WR/WRL, CNTL0) High, during Power-up for maximum security of the data contents and to remove the possibility of data being written on the first edge of WRITE Strobe (WR/ WRL, CNTL0). Any WRITE cycle initiation is locked when VCC is below VLKO. REA D Under typical conditions, the MCU may read the primary Flash memory, or secondary Flash memory, using READ operations just as it would a ROM or RAM device. Alternately, the MCU may use READ operations to obtain status information about a Program or Erase cycle that is currently in progress. Lastly, the MCU may use instructions to read special data from these memory blocks. The following sections describe these READ functions. REA D Memory Contents Primary Flash memory and secondary Flash memory are placed in the READ Mode after Power-up, chip reset, or a Reset Flash instruction (see Table 29., page 23). The MCU can read the memory contents of the primary Flash memory, or the secondary Flash memory by using READ operations any time the READ operation is not part of an instruction. REA D Primary Flash Identifier The primary Flash memory identifier is read with an instruction composed of 4 operations: 3 specific WRITE operations and a READ operation (see Table 29., page 23). The identifier for the primary Flash memory is E9h. The secondary Flash memory does not support this instruction. REA D Memory Sector Protection Status The Flash memory Sector Protection Status is read with an instruction composed of four operations: three specific WRITE operations and a READ operation (see Table 29., page 23). The READ operation produces 01h if the Flash memory sector is protected, or 00h if the sector is not protected. The sector protection status for all NVM blocks (primary Flash memory, or secondary Flash memory) can be read by the MCU accessing the Flash Protection and Flash Boot Protection registers in PSD I/O space. See Flash Memory Sector Protect, page 31 for register definitions.
25/104
PSD4256G6V
Reading the Erase/Program Status Bits The PSD provides several status bits to be used by the MCU to confirm the completion of an Erase or Program cycle of Flash memory. These status bits minimize the time that the MCU spends performing these tasks and are defined in Table 31. The status byte resides in an even location, and can be read as many times as needed. Also note Table 31. Status Bits
DQ7 Data Polling DQ6 Toggle Flag DQ5 Error Flag DQ4 X DQ3 Erase Timeout DQ2 X DQ1 X DQ 0 X
that DQ15-DQ8 is an even byte for Motorola MCUs with a 16-bit data bus. For Flash memory, the MCU can perform a READ operation to obtain these status bits while an Erase or Program instruction is being executed by the embedded algorithm. See PROGRAMMING FLASH MEMORY, page 28 for details.
Table 32. Status Bits for Motorola 16-bit MCU
DQ15 Data Polling DQ14 Toggle Flag DQ13 Error Flag DQ12 X DQ11 Erase Timeout DQ10 X DQ9 X DQ 8 X
Notes:X = Not guaranteed value, can be read either '1' or '0.' DQ15-DQ0 represent the Data Bus bits, D15-D0. FS0-FS15/CSBOOT0-CSBOOT3 are active High.
26/104
PSD 4256G 6V
Data Polling (DQ7) - DQ15 for Motorola When erasing or programming in Flash memory, the Data Polling Bit (DQ7/DQ15) outputs the complement of the bit being entered for programming/ writing on the DQ7/DQ15 Bit. Once the Program instruction or the WRITE operation is completed, the true logic value is read on the Data Polling Bit (DQ7/DQ15) (in a READ operation). D ata Polling is effective after the fourth WRITE pulse (for a Program instruction) or after the sixth WRITE pulse (for an Erase instruction). It must be performed at the address being programmed or at an address within the Flash memory sector being erased. D uring an Erase cycle, the Data Polling Bit (DQ7/DQ15) outputs a '0.' After completion of the cycle, the Data Polling Bit (DQ7/DQ15) outputs the last bit programmed (it is a '1' after erasing). If the location to be programmed is in a protected Flash memory sector, the instruction is ignored. If all the Flash memory sectors to be erased are protected, the Data Polling Bit (DQ7/ D Q15) is reset to '0' for about 100s, and then returns to the value from the previously addressed location. No erasure is performed. Toggle Flag (DQ6) DQ14 for Motorola The PSD offers another way for determining when the Flash memory Program cycle is completed. During the internal WRITE operation and when either FS0-FS15 or CSBOOT0-CSBOOT3 is true, the Toggle Flag Bit (DQ6/DQ14) toggles from 0 to '1' and '1' to '0' on subsequent attempts to read any word of the memory. When the internal cycle is complete, the toggling stops and the data read on the Data Bus D0-D7 is the value from the addressed memory location. The device is now accessible for a new READ or WRITE operation.
The cycle is finished when two successive READs yield the same output data. The Toggle Flag Bit (DQ6/DQ14) is effective after the fourth WRITE pulse (for a Program instruction) or after the sixth WRITE pulse (for an Erase instruction). If the location to be programmed belongs to a protected Flash memory sector, the instruction is ignored. If all the Flash memory sectors selected for erasure are protected, the Toggle Flag Bit (DQ6/DQ14) toggles to '0' for about 100s and then returns to the value from the previously addressed location. Error Flag (DQ5) DQ13 for Motorola During a normal Program or Erase cycle, the Error Flag Bit (DQ5/DQ13) is reset to '0.' This bit is set to '1' when there is a failure during a Flash memory Program, Sector Erase, or Bulk Erase cycle. In the case of Flash memory programming, the Error Flag Bit (DQ5/DQ13) indicates the attempt to program a Flash memory bit, or bits, from the programmed state, 0, to the erased state, '1,' which is not a valid operation. The Error Flag Bit (DQ5/ DQ13) may also indicate a Time-out condition while attempting to program a word. In case of an error in a Flash memory Sector Erase or Word Program cycle, the Flash memory sector in which the error occurred or to which the programmed location belongs must no longer be used. Other Flash memory sectors may still be used. The Error Flag Bit (DQ5/DQ13) is reset after a RESET instruction. A RESET instruction is required after detecting an error on the Error Flag Bit ( D Q5/ D Q13) . Erase Time-out Flag (DQ3) DQ11 for Motorola The Erase Time-out Flag Bit (DQ3/DQ11) reflects the time-out period allowed between two consecutive Sector Erase instructions. The Erase Time-out Flag Bit (DQ3/DQ11) is reset to '0' after a Sector Erase cycle for a period of 100s + 20% unless an additional Sector Erase instruction is decoded. After this period, or when the additional Sector Erase instruction is decoded, the Erase Time-out Flag Bit (DQ3/DQ11) is set to '1.'
27/104
PSD4256G6V
PROGRAMMING FLASH MEMORY
Flash memory must be erased prior to being programmed. The MCU may erase Flash memory all at once or by-sector. Although erasing Flash memory occurs on a sector or device basis, programming Flash memory occurs on a word basis. The primary and secondary Flash memories require the MCU to send an instruction to program a word or to erase sectors (see Table 29., page 23). Once the MCU issues a Flash memory Program or Erase instruction, it must check the status bits for completion. The embedded algorithms that are invoked inside the PSD support several means to provide status to the MCU. Status may be checked using any of three methods: Data Polling, Data Toggle, or Ready/Busy (PE4) signal. Data Polling Polling on the Data Polling Bit (DQ7/DQ15) is a method of checking whether a Program or Erase cycle is in progress or has completed. Figure 6 shows the Data Polling algorithm. When the MCU issues a Program instruction, the embedded algorithm within the PSD begins. The MCU then reads the location of the word to be programmed in Flash memory to check the status. The Data Polling Bit (DQ7/DQ15) becomes the complement of the corresponding bit of the original data word to be programmed. The MCU continues to poll this location, comparing data and monitoring the Error Flag Bit (DQ5/DQ13). When the Data Polling Bit (DQ7/DQ15) matches the corresponding bit of the original data, and the Error Flag Bit (DQ5/DQ13) remains '0,' the embedded algorithm is complete. If the Error Flag Bit (DQ5/DQ13) is '1,' the MCU should test the Data Polling Bit (DQ7/ DQ15) again since the Data Polling Bit (DQ7/ DQ15) may have changed simultaneously with the Error Flag Bit (DQ5/DQ13) (see Figure 6). The Error Flag Bit (DQ5/DQ13) is set if either an internal time-out occurred while the embedded algorithm attempted to program the location or if the MCU attempted to program a '1' to a bit that was not erased (not erased is logic '0'). It is suggested (as with all Flash memories) to read the location again after the embedded programming algorithm has completed, to compare the word that was written to the Flash memory with the word that was intended to be written. When using the Data Polling method during an Erase cycle, Figure 6 still applies. However, the Data Polling Bit (DQ7/DQ15) is '0' until the Erase cycle is complete. A '1' on the Error Flag Bit (DQ5/ DQ13) indicates a time-out condition on the Erase cycle, a 0 indicates no error. The MCU can read any even location within the sector being erased to get the Data Polling Bit (DQ7/DQ15) and the Error Flag Bit (DQ5/DQ13). PSDsoft generates ANSI C code functions that implement these Data Polling algorithms. Figure 6. Data Polling Flowchart
START
READ DQ5 and DQ7 (DQ13 and DQ15) at Valid Even Address
DQ7 (DQ15) = Data7 (Data15) No
Yes
No
DQ5 (DQ13) =1 Yes READ DQ7 (DQ15)
DQ7 (DQ15) = Data7 (Data15) No Program or Erase Cycle failed
Yes
Program or Erase Cycle is complete
Issue RESET instruction
AI04920
28/104
PSD 4256G 6V
Data Toggle Checking the Toggle Flag Bit (DQ6/DQ14) is another method of determining whether a Program or Erase cycle is in progress or has completed. Figure 7 shows the Data Toggle algorithm. When the MCU issues a Program instruction, the embedded algorithm within the PSD begins. The MCU then reads the location to be programmed in Flash memory to check the status. The Toggle Flag Bit (DQ6/DQ14) toggles each time the MCU reads this location until the embedded algorithm is complete. The MCU continues to read this location, checking the Toggle Flag Bit (DQ6/DQ14) and monitoring the Error Flag Bit (DQ5/DQ13). When the Toggle Flag Bit (DQ6/DQ14) stops toggling (two consecutive READs yield the same value), and the Error Flag Bit (DQ5/DQ13) remains '0,' the embedded algorithm is complete. If the Error Flag Bit (DQ5/DQ13) is '1,' the MCU should test the Toggle Flag Bit (DQ6/DQ14) again, since the Toggle Flag Bit (DQ6/DQ14) may have changed simultaneously with the Error Flag Bit (DQ5/DQ13) (see Figure 7). The Error Flag Bit (DQ5/DQ13) is set if either an internal time-out occurred while the embedded algorithm attempted to program, or if the MCU attempted to program a '1' to a bit that was not erased (not erased is logic '0'). It is suggested (as with all Flash memories) to read the location again after the embedded programming algorithm has completed, to compare the word that was written to Flash memory with the word that was intended to be written. When using the Data Toggle method after an Erase cycle, Figure 7 still applies. the Toggle Flag Bit (DQ6/DQ14) toggles until the Erase cycle is complete. A '1' on the Error Flag Bit (DQ5/DQ13) indicates a time-out condition on the Erase cycle, a '0' indicates no error. The MCU can read any even location within the sector being erased to get the Toggle Flag Bit (DQ6/DQ14) and the Error Flag Bit (DQ5/DQ13). PSDsoft generates ANSI C code functions which implement these Data Toggling algorithms. Unlock Bypass The Unlock Bypass instruction allows the system to program words to the Flash memories faster than using the standard Program instruction. The Unlock Bypass mode is entered by first initiating two Unlock cycles. This is followed by a third WRITE cycle containing the Unlock Bypass command, 20h (as shown in Table 29., page 23). The Flash memory then enters the Unlock Bypass mode. A two-cycle Unlock Bypass Program instruction is all that is required to program in this mode. The first cycle in this instruction contains the Unlock
Bypass Program command, A0h. The second cycle contains the program address and data. Additional data is programmed in the same manner. This mode dispense with the initial two Unlock cycles required in the standard Program instruction, resulting in faster total programming time. During the unlock bypass mode, only the Unlock Bypass Program and Unlock Bypass Reset instructions are valid. To exit the Unlock Bypass mode, the system must issue the two-cycle Unlock Bypass Reset instruction. The first cycle must contain the data 90h; the second cycle the data 00h. Addresses are "Don't care" for both cycles. The Flash memory then returns to READ Mode. Figure 7. Data Toggle Flowchart
START
READ DQ5 and DQ6 (DQ13 and DQ14) at Valid Even Address
DQ6 (DQ14) = Toggle Yes
No
No
DQ5 (DQ13) =1 Yes READ DQ6 (DQ14)
DQ6 (DQ14) = Toggle Yes Program or Erase Cycle failed
No
Program or Erase Cycle is complete
Issue RESET instruction
AI04921
29/104
PSD4256G6V
ERASING FLASH MEMORY
Flash Bulk Erase The Flash Bulk Erase instruction uses six WRITE operations followed by a READ operation of the status register, as described in Table 29., page 23. If any byte of the Bulk Erase instruction is wrong, the Bulk Erase instruction aborts and the device is reset to the READ Memory mode. During a Bulk Erase, the memory status may be checked by reading the Error Flag Bit (DQ5/ DQ13), the Toggle Flag Bit (DQ6/DQ14), and the Data Polling Bit (DQ7/DQ15), as detailed in PROGRAMMING FLASH MEMORY, page 28. The Error Flag Bit (DQ5/DQ13) returns a '1' if there has been an Erase Failure (maximum number of Erase cycles have been executed). It is not necessary to program the memory with 00h because the PSD automatically does this before erasing to 0FFh. During execution of the Bulk Erase instruction, the Flash memory does not accept any instructions. Flash Sector Erase The Sector Erase instruction uses six WRITE operations, as described in Table 29., page 23. Additional Flash Sector Erase confirm commands and Flash memory sector addresses can be written subsequently to erase other Flash memory sectors in parallel, without further coded cycles, if the additional commands are transmitted in a shorter time than the time-out period of about 100s. The input of a new Sector Erase command restarts the time-out period. The status of the internal timer can be monitored through the level of the Erase Time-out Flag Bit (DQ3/DQ11). If the Erase Time-out Flag Bit (DQ3/ DQ11) is '0,' the Sector Erase instruction has been received and the time-out period is counting. If the Erase Time-out Flag Bit (DQ3/DQ11) is '1,' the time-out period has expired and the PSD is busy erasing the Flash memory sector(s). Before and during Erase time-out, any instruction other than Suspend Sector Erase and Resume Sector Erase, abort the cycle that is currently in progress, and reset the device to READ Mode. It is not necessary to program the Flash memory sector with 00h as the PSD does this automatically before erasing. During a Sector Erase, the memory status may be checked by reading the Error Flag Bit (DQ5/ DQ13), the Toggle Flag Bit (DQ6/DQ14), and the Data Polling Bit (DQ7/DQ15), as detailed in PROGRAMMING FLASH MEMORY, page 28. During execution of the Erase cycle, the Flash memory accepts only RESET and Suspend Sector Erase instructions. Erasure of one Flash memory sector may be suspended, in order to read data from another Flash memory sector, and then resumed. Suspend Sector Erase When a Sector Erase cycle is in progress, the Suspend Sector Erase instruction can be used to suspend the cycle by writing 0B0h to any even address when an appropriate Sector Select (FS0FS15 or CSBOOT0-CSBOOT3) is High. (See Table 29., page 23). This allows reading of data from another Flash memory sector after the Erase cycle has been suspended. Suspend Sector Erase is accepted only during the Flash Sector Erase instruction execution and defaults to READ Mode. A Suspend Sector Erase instruction executed during an Erase time-out period, in addition to suspending the Erase cycle, terminates the time out period. The Toggle Flag Bit (DQ6/DQ14) stops toggling when the PSD internal logic is suspended. The status of this bit must be monitored at an address within the Flash memory sector being erased. The Toggle Flag Bit (DQ6/DQ14) stops toggling between 0.1s and 15s after the Suspend Sector Erase instruction has been executed. The PSD is then automatically set to READ Mode. If an Suspend Sector Erase instruction was executed, the following rules apply: Attempting to read from a Flash memory sector that was being erased outputs invalid data. R eading from a Flash memory sector that was not being erased is valid. The Flash memory cannot be programmed, and only responds to Resume Sector Erase and RESET instructions (READ is an operation and is allowed). If a RESET instruction is received, data in the Flash memory sector that was being erased is invalid. Resume Sector Erase If a Suspend Sector Erase instruction was previously executed, the Erase cycle may be resumed with this instruction. The Resume Sector Erase instruction consists of writing 030h to any even address while an appropriate Sector Select (FS0FS15 or CSBOOT0-CSBOOT3) is High. (See Table 29., page 23.)
30/104
PSD 4256G 6V
SPECIFIC FEATURES
Flash Memory Sector Protect Each sector of Primary or Secondary Flash memory can be separately protected against Program and Erase cycles. Sector Protection provides additional data security because it disables all Program or Erase cycles. This mode can be activated (or deactivated) through the JTAG-ISP Port or a Device Programmer. Sector protection can be selected for each sector using the PSDsoft program. This automatically protects selected sectors when the device is programmed through the JTAG Port or a Device Programmer. Flash memory sectors can be unprotected to allow updating of their contents using the JTAG Port or a Device Programmer. The MCU can read (but cannot change) the sector protection bits. Any attempt to program or erase a protected Flash memory sector is ignored by the device. The Verify operation results in a READ of the protected data. This allows a guarantee of the retention of the Protection status. The sector protection status can be read by the MCU through the Flash memory protection and Secondary Flash memory protection registers (in the CSIOP block) or use the READ Sector Protection instruction. See Table 18 to Table 20. , page 18. RESET The RESET instruction consists of one WRITE cycle (see Table 29., page 23). It can also be optionally preceded by the standard two WRITE decoding cycles (writing AAh to AAAh, and 55h to 554h). The RESET instruction must be executed after: R eading the Flash Protection Status or Flash ID An Error condition has occurred (and the device has set the Error Flag Bit (DQ5/DQ13) to '1') during a Flash memory Program or Erase cycle. The RESET instruction immediately puts the Flash memory back into normal READ Mode. However, if there is an error condition (with the Error Flag Bit (DQ5/DQ13) set to '1') the Flash memory will return to the READ Mode in 25s after the RESET instruction is issued. The RESET instruction is ignored when it is issued during a Program or Bulk Erase cycle of the Flash memory. The RESET instruction aborts any ongoing Sector Erase cycle, and returns the Flash memory to the normal READ Mode in 25s. Reset (RESET) Pin A pulse on the Reset (RESET) pin aborts any cycle that is in progress, and resets the Flash memory to the READ Mode. When the reset occurs during a Program or Erase cycle, the Flash memory takes up to 25 s to return to the READ Mode. It is recommended that the Reset (RESET) pulse (except for Power On Reset, as described in Power-on RESET, page 76) be at least 25s so that the Flash memory is always ready for the MCU to retrieve the bootstrap instructions after the RESET cycle is complete.
SRAM
The SRAM is enabled when SRAM Select (RS0) from the DPLD is High. SRAM Select (RS0) can contain up to three product terms, allowing flexible memory mapping. The SRAM can be backed up using an external battery. The external battery should be connected to the Voltage Standby (VSTBY, PE6) line. If you have an external battery connected to the PSD, the contents of the SRAM are retained in the event of a power loss. The contents of the SRAM are retained so long as the battery voltage remains at 2V or greater. If the supply voltage falls below the battery voltage, an internal power switch-over to the battery occurs. PE7 can be configured as an output that indicates when power is being drawn from the external battery. This Battery-on Indicator (VBATON, PE7) signal is High when the supply voltage falls below the battery voltage and the battery on Voltage Standby (VSTBY, PE6) is supplying power to the internal SRAM. SRAM Select (RS0), Voltage Standby (VSTBY, PE6) and Battery-on Indicator (VBATON, PE7) are all configured using PSDsoft.
31/104
PSD4256G6V
MEMORY SELECT SIGNALS
The Primary Flash Memory Sector Select (FS0FS15), Secondary Flash Memory Sector Select (CSBOOT0-CSBOOT3) and SRAM Select (RS0) signals are all outputs of the DPLD. They are defined using PSDsoft. The following rules apply to the equations for these signals: 1. Primary Flash memory and secondary Flash memory Sector Select signals must not be larger than the physical sector size. 2. Any primary Flash memory sector must not be mapped in the same memory space as another Flash memory sector. 3. A secondary Flash memory sector must not be mapped in the same memory space as another secondary Flash memory sector. 4. SRAM, I/O, and Peripheral I/O spaces must not overlap. 5. A secondary Flash memory sector may overlap a primary Flash memory sector. In case of overlap, priority is given to the secondary Flash memory sector. 6. SRAM, I/O, and Peripheral I/O spaces may overlap any other memory sector. Priority is given to the SRAM, I/O, or Peripheral I/O. Example FS0 is valid when the address is in the range of 8000h to BFFFh, CSBOOT0 is valid from 8000h to 9FFFh, and RS0 is valid from 8000h to 87FFh. Any address in the range of RS0 always accesses the SRAM. Any address in the range of CSBOOT0 greater than 87FFh (and less than 9FFFh) automatically addresses secondary Flash memory segment 0. Any address greater than 9FFFh accesses the primary Flash memory segment 0. You can see that half of the primary Flash memory segment 0 and one-fourth of secondary Flash memory segment 0 cannot be accessed in this example. Also note that an equation that defined FS1 to anywhere in the range of 8000h to BFFFh would not be valid. Figure 8 shows the priority levels for all memory components. Any component on a higher level can overlap and has priority over any component on a lower level. Components on the same level must not overlap. Level 1 has the highest priority and level 3 has the lowest. Mem ory Select Configuration for MCUs with Separate Program and Data Spaces The 80C31 and compatible family of MCUs can be configured to have separate address spaces for Program memory (selected using Program Select Enable (PSEN, CNTL2)) and Data memory (selected using READ Strobe (RD, CNTL1)). Any of the memories within the PSD can reside in either space or both spaces. This is controlled through manipulation of the VM register that resides in the CSIOP space. The VM register is set using PSDsoft to have an initial value. It can subsequently be changed by the MCU so that memory mapping can be changed on-the-fly. For example, you may wish to have SRAM and primary Flash memory in the Data space at Boot-up, and secondary Flash memory in the Program space at Boot-up, and later swap the secondary Flash memory and primary Flash memory. This is easily done with the VM register by using PSDsoft to configure it for Boot-up and having the MCU change it when desired. Table 25., page 20 describes the VM Register. Figure 8. Priority Level of Memory and I/O Components
Highest Priority
Level 1 SRAM, I/O, or Peripheral I/O Level 2 Secondary Non-Volatile Memory Level 3 Primary Flash Memory Lowest Priority
AI02867D
32/104
PSD 4256G 6V
Configuration Modes for MCUs with Separate Program and Data Spaces Separate Space Modes. Program space is separated from Data space. For example, Program Select Enable (PSEN, CNTL2) is used to access the program code from the primary Flash memory, while READ Strobe (RD, CNTL1) is used to access data from the secondary Flash memory, SRAM and I/O Port blocks. This configuration requires the VM register to be set to 0Ch (see Figure 9) . Figure 9. 8031 Memory Modules Separate Space Combined Space Modes The Program and Data spaces are combined into one memory space that allows the primary Flash memory, secondary Flash memory, and SRAM to be accessed by either Program Select Enable (PSEN, CNTL2) or READ Strobe (RD, CNTL1). For example, to configure the primary Flash memory in Combined space, Bits 2 and 4 of the VM register are set to 1 (see Figure 10). 80C31 Memory Map Example See the Application Notes for examples.
DPLD
RS0 CSBOOT0-3 FS0-FS15
Primary Flash Memory
Secondary Flash Memory
SRAM
CS OE
CS OE
CS OE
PSEN RD
AI04922
Figure 10. 8031 Memory Modules Combined Space
DPLD
RS0 CSBOOT0-3 FS0-FS15
Primary Flash Memory
Secondary Flash Memory
SRAM
RD
CS OE
CS OE
CS OE
VM REG BIT 3
VM REG BIT 4
PSEN
VM REG BIT 1
VM REG BIT 2
RD
VM REG BIT 0
AI04923
33/104
PSD4256G6V
PAGE REGISTER
The 8-bit Page Register increases the addressing capability of the MCU by a factor of up to 256. The contents of the register can also be read by the MCU. The outputs of the Page Register (PGR0PGR7) are inputs to the DPLD decoder and can be included in the Sector Select (FS0-FS15, CSBOOT0-CSBOOT3), and SRAM Select (RS0) equations. If memory paging is not needed, or if not all eight page register bits are needed for memory paging, Figure 11. Page Register
RESET
these bits may be used in the CPLD for general logic. See Application Note AN1154. Table 22., page 19 and Figure 11 show the Page Register. The eight flip-flops in the register are connected to the internal data bus (D0-D7). The MCU can write to or read from the Page Register. The Page Register can be accessed at address location CSIOP + E0h.
D0 D1 D0 - D7 D2 D3 D4 D5 D6 R/W D7
Q0 Q1 Q2 Q3 Q4 Q5
PGR0 PGR1 PGR2 PGR3 PGR4 PGR5 PGR6 DPLD AND CPLD
INTERNAL SELECTS AND LOGIC
Q6 PGR7 Q7
PAGE REGISTER
PLD
AI02871B
MEMORY ID REGISTERS
The 8-bit "Read only" Memory Status Registers are included in the CSIOP space. The user can determine the memory configuration of the PSD device by reading the Memory ID0 and Memory ID1 registers. The content of the registers is defined as shown in Table 26 and Table 27. , page 20.
34/104
PSD 4256G 6V
PLDS
The PLDs bring programmable logic functionality to the PSD. After specifying the logic for the PLDs using PSDsoft, the logic is programmed into the device and available upon Power-up. The PSD contains two PLDs: the Decode PLD (DPLD), and the Complex PLD (CPLD). The PLDs are briefly discussed in the next few paragraphs, and in more detail in the following sections. Figure 12., page 36 shows the configuration of the PLDs. The DPLD performs address decoding for internal components, such as memory, registers, and I/O ports Select signals. The CPLD can be used for logic functions, such as loadable counters and shift registers, state machines, and encoding and decoding logic. These logic functions can be constructed using the 16 Output Macrocells (OMC), 24 Input Macrocells (IMC), and the AND Array. The CPLD can also be used to generate External Chip Select (ECS0ECS2) signals. The AND Array is used to form product terms. These product terms are specified using PSDsoft. An Input Bus consisting of 82 signals is connected to the PLDs. The signals are shown in Table 33. The Turbo Bit in PSD The PLDs in the PSD3200 Family can minimize power consumption by switching to standby when inputs remain unchanged for an extended time of about 70ns. Resetting the Turbo Bit to '0' (Bit 3 of the PMMR0 register) automatically places the PLDs into standby if no inputs are changing. Turning the Turbo mode off increases propagation delays while reducing power consumption. See POWER MANAGEMENT, page 72, on how to set the Turbo Bit. Additionally, five bits are available in the PMMR2 register to block MCU control signals from entering the PLDs. This reduces power consumption and can be used only when these MCU control signals are not used in PLD logic equations. Each of the two PLDs has unique characteristics suited for its applications. They are described in the following sections. Table 33. DPLD and CPLD Inputs
Input Source MCU Address Bus(1) MCU Control Signals Reset Power-down Por t A Input Macrocells Por t B Input Macrocells Por t C Input Macrocells Por t D Inputs Por t F Inputs Page Register Macrocell A Feedback Macrocell B Feedback Flash memory Program Status Bit Input Name A15-A0 CNTL0-CNTL2 RST PDN PA7-PA0 PB7-PB0 PC7-PC0 PD3-PD0 PF7-PF0 PGR7-PGR0 MCELLA.FB7-FB0 MCELLB.FB7-FB0 Ready/Busy Number of Signals 16 3 1 1 8 8 8 4 8 8 8 8 1
Note: 1. The address inputs are A19-A4 in 80C51XA mode.
35/104
PSD4256G6V
Figure 12. PLD Diagram
8 DATA BUS
PAGE REGISTER
DECODE PLD
82
16 4 3 1 2 1
PRIMARY FLASH MEMORY SELECTS SECONDARY NON-VOLATILE MEMORY SELECTS SRAM SELECT CSIOP SELECT PERIPHERAL SELECTS JTAG SELECT
PLD INPUT BUS
16
OUTPUT MACROCELL FEEDBACK
DIRECT MACROCELL ACCESS FROM MCU DATA BUS
CPLD
82 PT ALLOC.
16 OUTPUT MACROCELL
MCELLA TO PORT A MCELLB TO PORT B
8
I/O PORTS
24 INPUT MACROCELL (PORT A,B,C)
8 8
EXTERNAL CHIP SELECTS TO PORT C or PORT F
DIRECT MACROCELL INPUT TO MCU DATA BUS 24 INPUT MACROCELL and INPUT PORTS
12
PORT D and PORT F INPUTS
AI04924B
36/104
PSD 4256G 6V
DECODE PLD (DPLD)
The DPLD, shown in Figure 13, is used for decoding the address for internal and external components. The DPLD can be used to generate the following decode signals: 8 Sector Select (FS0-FS15) signals for the primary Flash memory (three product terms each) 4 Sector Select (CSBOOT0-CSBOOT3) signals for the secondary Flash memory (three product terms each) Figure 13. DPLD Logic Array
3 3 3 3 (INPUTS) I /O PORTS (PORT A,B,C,F) MCELLA.FB [7:0] (FEEDBACKS) MCELLB.FB [7:0] (FEEDBACKS) PGR0 - PGR7 A[15: 0] * PD[3: 0] (ALE,CLKIN,CSI) PDN (APD OUTPUT) CNTRL[2:0] (READ/WRITE CONTROL SIGNALS) RESET RD_BSY (32) 3 (8) 3 (8) 3 (8) 3 (16) 3 (4) 3 (1) 3 (3) (1) 3 (1) 1 1 1 1 CSIOP PSEL0 PSEL1 JTAGSEL
AI04925B
1 internal SRAM Select (RS0) signal (three product terms) 1 internal CSIOP Select (PSD Configuration Register) signal 1 JTAG Select signal (enables JTAG-ISP on Port E) 2 internal Peripheral Select signals (Peripheral I/O mode).
CSBOOT 0 CSBOOT 1 CSBOOT 2 CSBOOT 3 4 SECONDARY FLASH MEMORY SECTOR SELECTS
3
FS0 FS15 16 PRIMARY FLASH MEMORY SECTOR SELECTS
RS0
SRAM SELECT I/O DECODER SELECT PERIPHERAL I/O MODE SELECT
Note: 1. The address inputs are A19-A4 when in 80C51XA mode 2. Additional address lines can be brought in the PSD via Port A, B, C, D, or F.
37/104
PSD4256G6V
COMPLEX PLD (CPLD)
The CPLD can be used to implement system logic functions, such as loadable counters and shift registers, system mailboxes, handshaking protocols, state machines, and random logic. The CPLD can also be used to generate eight External Chip Select (ECS0-ECS7), routed to Port C or Port F. Although External Chip Select (ECS0-ECS7) can be produced by any Output Macrocell (OMC), these eight External Chip Select (ECS0-ECS7) on Port C or Port F do not consume any Output Macrocells (OMC). As shown in Figure 14, the CPLD has the following blocks: 24 Input Macrocells (IMC) 16 Output Macrocells (OMC) Product Term Allocator Figure 14. Macrocell and I/O Port
PLD INPUT BUS
AND Array capable of generating up to 196 product terms Four I/O Ports. Each of the blocks are described in the sections that follow. The Input Macrocells (IMC) and Output Macrocells (OMC) are connected to the PSD internal data bus and can be directly accessed by the MCU. This enables the MCU software to load data into the Output Macrocells (OMC) or read data from both the Input and Output Macrocells (IMC and OMC). This feature allows efficient implementation of system logic and eliminates the need to connect the data bus to the AND Array as required in most standard PLD macrocell architectures.
PRODUCT TERMS FROM OTHER MACROCELLS
MCU ADDRESS / DATA BUS
CPLD MACROCELLS
PT PRESET PRODUCT TERM ALLOCATOR MCU DATA IN
DATA LOAD CONTROL
I/O PORTS
LATCHED ADDRESS OUT DATA WR I/O PIN D Q
MCU LOAD
MUX
AND ARRAY
UP TO 10 PRODUCT TERMS
POLARITY SELECT PR DI LD PT CLOCK D/T Q
MUX
MACROCELL OUT TO MCU
CPLD OUTPUT
SELECT
COMB. /REG SELECT
PLD INPUT BUS
GLOBAL CLOCK CLOCK SELECT PT CLEAR
MUX
D/T/JK FF SELECT
CK CL
PDR
INPUT
D WR
Q
DIR REG.
PT OUTPUT ENABLE (OE) MACROCELL FEEDBACK I/O PORT INPUT
INPUT MACROCELLS
MUX
QD
MUX
PT INPUT LATCH GATE/CLOCK ALE/AS
QD G
AI04945
38/104
PSD 4256G 6V
Output Macrocell (OMC) Eight of the Output Macrocells (OMC) are connected to Ports A pins and are named as McellA0McellA7. The other eight Macrocells are connected to Ports B pins and are named as McellB0McellB7. The Output Macrocell (OMC) architecture is shown in Figure 15., page 41. As shown in the figure, there are native product terms available from the AND Array, and borrowed product terms available (if unused) from other Output Macrocells (OMC). The polarity of the product term is controlled by the XOR gate. The Output Macrocell (OMC) can implement either sequential logic, using the flip-flop element, or combinatorial logic.
The multiplexer selects between the sequential or combinatorial logic outputs. The multiplexer output can drive a port pin and has a feedback path to the AND Array inputs. The flip-flop in the Output Macrocell (OMC) block can be configured as a D, T, JK, or SR type in the PSDsoft program. The flip-flop's clock, preset, and clear inputs may be driven from a product term of the AND Array. Alternatively, the external CLKIN (PD1) signal can be used for the clock input to the flip-flop. The flip-flop is clocked on the rising edge of CLKIN (PD1). The preset and clear are active High inputs. Each clear input can use up to two product terms.
Table 34. Output Macrocell Port and Data Bit Assignments
Out put Macrocell Mce llA0 Mce llA1 McellA2 McellA3 McellA4 McellA5 McellA6 McellA7 Mce llB0 Mce llB1 McellB2 McellB3 McellB4 McellB5 McellB6 McellB7 Port Assignment Port A0 Port A1 Port A2 Port A3 Port A4 Port A5 Port A6 Port A7 Port B0 Port B1 Port B2 Port B3 Port B4 Port B5 Port B6 Port B7 Native Product Terms 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 Maximum Borrowed Product Terms 6 6 6 6 6 6 6 6 5 5 5 5 6 6 6 6 16-bit MCU Loading or Reading(1) D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 Motorola 16-bit MCU for Loading or Reading D8 D9 D10 D11 D12 D13 D14 D15 D0 D1 D2 D3 D4 D5 D6 D7
Note: 1. D7-D0 are used for loading or reading in 8-bit mode.
39/104
PSD4256G6V
Product Term Allocator The CPLD has a Product Term Allocator. PSDsoft, uses the Product Term Allocator to borrow and place product terms from one Macrocell to another. The following list summarizes how product terms are allocated: McellA0-McellA7 all have three native product terms and may borrow up to six more McellB0-McellB3 all have four native product terms and may borrow up to five more McellB4-McellB7 all have four native product terms and may borrow up to six more. Each Macrocell may only borrow product terms from certain other Macrocells. Product terms already in use by one Macrocell are not available for another Macrocell. If an equation requires more product terms than are available to it, then "external" product terms are required, which consume other Output Macrocells (OMC). If external product terms are used, extra delay is added for the equation that required the extra product terms. This is called product term expansion. PSDsoft performs this expansion as needed . Loading and Reading the Output Macrocells (OMC) The Output Macrocells (OMC) block occupies a memory location in the MCU address space, as defined by the CSIOP (see Figure 21 to Figure 30 for examples of the basic connections between the PSD and some popular MCUs). The PSD Control input pins are labeled as to the MCU function for which they are configured. The MCU bus interface is specified using the PSDsoft Express Configuration. The flip-flops in each of the 16 Output Macrocells (OMC) can be loaded from the data bus by a MCU. Loading the Output Macrocells (OMC) with data from the MCU takes priority over internal functions. As such, the preset, clear, and clock inputs to the flip-flop can be overridden by the MCU.
The ability to load the flip-flops and read them back is useful in such applications as loadable counters and shift registers, mailboxes, and handshaking protocols. Data is loaded to the Output Macrocells (OMC) on the trailing edge of WRITE Strobe (WR/WRL, CNTL0). The OMC Mask Register There is one Mask Register for each of the two groups of eight Output Macrocells (OMC). The Mask Registers can be used to block the loading of data to individual Output Macrocells (OMC). The default value for the Mask Registers is 00h, which allows loading of the Output Macrocells (OMC). When a given bit in a Mask Register is set to a 1, the MCU is blocked from writing to the associated Output Macrocells (OMC). For example, suppose McellA0-McellA3 are being used for a state machine. You would not want a MCU WRITE to McellA to overwrite the state machine registers. Therefore, you would want to load the Mask Register for McellA (Mask Macrocell A) with the value 0Fh. The Output Enable of the OMC The Output Macrocells (OMC) can be connected to an I/O port pin as a PLD output. The output enable of each port pin driver is controlled by a single product term from the AND Array, ORed with the Direction Register output. The pin is enabled upon Power-up if no output enable equation is defined and if the pin is declared as a PLD output in PSDsoft. If the Output Macrocell (OMC) output is declared as an internal node and not as a port pin output in the PSDabel file, then the port pin can be used for other I/O functions. The internal node feedback can be routed as an input to the AND Array.
40/104
PSD 4256G 6V
Figure 15. CPLD Output Macrocell
MASK REG. MACROCELL CS RD
INTERNAL DATA BUS
PT ALLOCATOR
WR DIRECTION REGISTER ENABLE (.OE) PRESET(.PR) COMB/REG SELECT
AND ARRAY
PT PT DIN PR
PLD INPUT BUS
MUX PT LD POLARITY SELECT CLEAR (.RE) PT CLK CLKIN MUX IN CLR PROGRAMMABLE FF (D / T/JK /SR) PORT DRIVER Q
I/O PIN
FEEDBACK (.FB) PORT INPUT INPUT MACROCELL
AI04946
41/104
PSD4256G6V
Input Macrocells (IMC) The CPLD has 24 Input Macrocells (IMC), one for each pin on Ports A, B, and C. The architecture of the Input Macrocells (IMC) is shown in Figure 16. The Input Macrocells (IMC) are individually configurable, and can be used as a latch, register, or to pass incoming Port signals prior to driving them onto the PLD input bus. The outputs of the Input Macrocells (IMC) can be read by the MCU through the internal data bus. The enable for the latch and clock for the register are driven by a multiplexer whose inputs are a product term from the CPLD AND Array or the MCU Address Strobe (ALE/AS). Each product term output is used to latch or clock four Input Macrocells (IMC). Port inputs 3-0 can be controlled by one product term and 7-4 by another. Configurations for the Input Macrocells (IMC) are specified by PSDsoft (see Application Note AN1171). Outputs of the Input Macrocells (IMC) can be read by the MCU via the IMC buffer. See Figure 21., page 48 to Figure 30., page 58 for examples of the basic connections between the PSD and some popular MCUs. The PSD Control input pins are labeled as to the MCU function for which they are configured. The MCU bus interface is
specified using the I/O Ports. (See I/O Ports, page 13.) Input Macrocells (IMC) can use Address Strobe (ALE/AS, PD0) to latch address bits higher than A15. Any latched addresses are routed to the PLDs as inputs. Input Macrocells (IMC) are particularly useful with handshaking communication applications where two processors pass data back and forth through a common mailbox. Figure 18., page 43 shows a typical configuration where the Master MCU writes to the Port A Data Out Register. This, in turn, can be read by the Slave MCU via the activation of the "Slave-READ" output enable product term. The Slave can also write to the Port A Input Macrocells (IMC) and the Master can then read the Input Macrocells (IMC) directly. Note that the "Slave-READ" and "Slave-Wr" signals are product terms that are derived from the Slave MCU inputs READ Strobe (RD, CNTL1), WRITE Strobe (WR/WRL, CNTL0), and Slave_CS.
Figure 16. Input Macrocell
INTERNAL DATA BUS
INPUT MACROCELL _ RD ENABLE ( .OE ) OUTPUT MACROCELLS A AND MACROCELLS B
DIRECTION REGISTER
PT AND ARRAY
PLD INPUT BUS
I/O PIN PT
PORT DRIVER
MUX
Q
D MUX
PT ALE/AS
D FF FEEDBACK Q D G LATCH INPUT MACROCELL
AI04926
42/104
PSD 4256G 6V
External Chip Select The CPLD also provides eight External Chip Select (ECS0-ECS7) outputs that can be used to select external devices. Each External Chip Select (ECS0-ECS7) consists of one product term that can be configured active High or Low. Figure 17. External Chip Select Signal
The output enable of the pin is controlled by either the output enable product term or the Direction Register. (See Figure 17.)
Port C or Port F CPLD AND ARRAY
PLD INPUT BUS
ENABLE (.OE) PT
DIRECTION REGISTER
ECS PT
ECS To Port C or F
PORT PIN
POLARITY BIT
AI04927
Figure 18. Handshaking Communication Using Input Macrocells
PSD
SLAVE CS RD WR SLAVE READ PORT A DATA OUT REGISTER MCU - RD MCU - WR MASTER MCU D [ 7:0] PORT A INPUT MACROCELL Q MCU - RD D CPLD MCU - WR D [ 7:0] D Q PORT A
SLAVE MCU
SLAVE WR
AI02877C
43/104
PSD4256G6V
MCU BUS INTERFACE
The "no-glue logic" MCU Bus Interface block can be directly connected to most popular 8-bit and 16bit MCUs and their control signals. Key MCUs, Table 35. 16-bit MCUs and Their Control Signals
M CU 68302, 68306, MMC2001 68330, 68331, 68332, 68340 68LC302, MMC2001 68HC16 68HC912 68HC812 3 80196 80196SP 80186 80C161, 80C164-80C167 80C51XA H8/300 CNT L0 R/W R/W WEL R/W R/W R/W WR WRL WR WR WRL W RL CNTL 1 LDS DS OE DS E E RD RD RD RD RD RD CN TL2 UDS SIZ0 -- SIZ0 LSTRB LSTRB BHE (Note 1) BHE BHE PSEN (Note 1) PD 3 (Note 1) (Note 1) WEH (Note 1) DB E (Note 1) (Note 1) W RH (Note 1) (Note 1) W RH W RH PD02 AS AS AS AS E (Note 1) ALE ALE ALE ALE ALE AS ADIO0 -- A0 -- A0 A0 A0 A0 A0 A0 A0 A4/D0 A0 PF3-PF0 (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) A3-A1 --
with their bus types and control signals, are shown in Tables 35 and 36. The MCU interface type is specified using the PSDsoft.
Note: 1. Unused CNTL2 pin can be configured as CPLD input. Other unused pins (PD3-PD0, PF3-PF0) can be configured for other I/O functions. 2. ALE/AS input is optional for MCUs with a non-multiplexed bus. 3. This configuration is for MC68HC812A4_EC at 5MHz, 3V only.
Table 36. 8-bit MCUs and Their Control Signals
M CU 8031/8051 80C51XA 80C251 80C251 80198 68HC11 68HC05C0 68HC912 Z80 Z8 68330 CNT L0 WR WR WR WR WR R/W WR R/W WR R/W R/W CNTL 1 RD RD PSEN RD RD E RD E RD DS DS CN TL2 PSEN PSEN (Note 1) PSEN (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) PD 7 (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) DB E (Note 1) (Note 1) (Note 1) PD02 ALE ALE ALE ALE ALE AS AS AS (Note 1) AS AS ADIO0 A0 A4 A0 A0 A0 A0 A0 A0 A0 A0 A0 PF3-PF0 (Note 1) A3-A0 (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) (Note 1) A3-A1
Note: 1. Unused CNTL2 pin can be configured as CPLD input. Other unused pins (PD3-PD0, PF3-PF0) can be configured for other I/O functions. 2. ALE/AS input is optional for MCUs with a non-multiplexed bus. 3. This configuration is for MC68HC812A4_EC at 5MHz, 3V only.
44/104
PSD 4256G 6V
PSD Interface to a Multiplexed Bus Figure 19 shows an example of a system using an MCU with a multiplexed bus and a PSD4256G6V. The ADIO port on the PSD is connected directly to the MCU address/data bus. Address Strobe (ALE/ AS, PD0) latches the address signals internally. Latched addresses can be brought out to Port E, F
or G. The PSD drives the ADIO data bus only when one of its internal resources is accessed and READ Strobe (RD, CNTL1) is active. Should the system address bus exceed sixteen bits, Ports A, B, C, or F may be used as additional address inputs.
Figure 19. An Example of a Typical Multiplexed Bus Interface
MCU
AD [ 7:0]
PSD
PORT F A [ 7: 0] (OPTIONAL)
AD[15:8]1
or A[15:8]
ADIO PORT
PORT G WR RD BHE WR (CNTRL0) RD (CNTRL1) BHE (CNTRL2) RST ALE ALE (PD0) PORT D RESET PORT A
A [ 15: 8] (OPTIONAL)
A [ 23:16] (OPTIONAL)
AI04928B
Note: 1. AD[15:8] is for 16-bit MCU
45/104
PSD4256G6V
PSD Interface to a Non-Multiplexed, 16-bit Bus Figure 20 shows an example of a system using an MCU with a 16-bit, non-multiplexed bus and a PSD4256G6V. The address bus is connected to the ADIO Port, and the data bus is connected to Ports F and G. Ports F and G are in tri-state mode
when the PSD is not accessed by the MCU. Should the system address bus exceed sixteen bit, Ports A, B, or C may be used for additional address inputs.
Figure 20. An Example of a Typical Non-Multiplexed Bus Interface
MCU
D [ 15: 0]
PSD
PORT F D [ 7:0]
ADIO PORT A [ 15: 0]
PORT G WR RD BHE WR (CNTRL0) RD (CNTRL1) BHE (CNTRL2) RST PORT A
D[15:8]1
A [ 23:16] (OPTIONAL)
ALE
ALE (PD0) PORT D
RESET
AI04929B
Note: 1. D[15:8] is for 16-bit MCU
46/104
PSD 4256G 6V
Data Byte Enable Reference for a 16-bit Bus MCUs have different data byte orientations. Tables 37 to 40 show how the PSD3200 Family interprets byte/word operations in different bus WRITE configurations. Even-byte refers to locations with address A0 equal to 0, and odd byte as locations with A0 equal to 1. Table 37. 16-Bit Data Bus with BHE
BHE 0 0 1 A0 0 1 0 D15-D 8 Odd Byte Odd Byte -- D7-D 0 Even Byte -- Even Byte
16-bit MCU Bus Interface Examples Figure 21., page 48 to Figure 26., page 54 show examples of the basic connections between the PSD3200 Family and some popular MCUs. The PSD3200 Family Control input pins are labeled as to the MCU function for which they are configured. The MCU bus interface is specified using PSDsoft. The Voltage Standby (VSTBY, PE6) line should be held at Ground if not in use. Table 38. 16-Bit Data Bus with WRH and WRL
WRH 0 0 1 W RL 0 1 0 D15-D 8 Odd Byte Odd Byte -- D7-D 0 Even Byte -- Even Byte
Table 39. 16-Bit Data Bus with SIZ0, A0 (Motorola MCU)
SIZ0 0 1 1 A0 0 0 1 D15-D8 Even Byte Even Byte -- D7-D0 Odd Byte -- Odd Byte
Table 40. 16-Bit Data Bus with LDS, UDS (Motorola MCU)
WRH 0 1 0 W RL 0 0 1 D15-D 8 Even Byte Even Byte -- D7-D 0 Odd Byte -- Odd Byte
47/104
PSD4256G6V
80C196 and 80C186 In Figure 21, the Intel 80C196 MCU, which has a 16-bit multiplexed address/data bus, is shown connected to a PSD3200 Family. The READ Strobe (RD, CNTL1), and WRITE Strobe (WR/ WRL, CNTL0) signals are connected to the CNTL pins.
When BHE is not used, the PSD can be configured to receive WRL and WRITE Enable High-byte (WRH/DBE, PD3) from the MCU. Higher address inputs (A16-A19) can be routed to Ports A, B, or C as input to the PLD. The AMD 80186 family has the same bus connection to the PSD as the 80C196.
Figure 21. Interfacing the PSD with an 80C196
A19-A16 AD15-AD0 VCC
A[ 19:16] AD[ 15:0 ]
80C196NT
19 X1 P3.0/AD0 P3.1/AD1 P3.2/AD2 P3.3/AD3 P3.4/AD4 P3.5/AD5 P3.6/AD6 P3.7/AD7 P4.0/AD8 P4.1/AD9 P4.2/AD10 P4.3/AD11 P4.4/AD12 P4.5/AD13 P4.6/AD14 P4.7/AD15 EP.0/A16 EP.1/A17 EP.2/A18 EP.3/A19 WR/WRL/P5.2 RD/P5.3 BHE/WRH/P5.5 ALE/ADV/P5.0 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20 14 13 12 11 9 7 8 4 A16 A17 A18 A19 WR RD BHE ALE 59 60 40 AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 AD8 AD9 AD10 AD11 AD12 AD13 AD14 AD15 3 4 5 6 7 10 11 12 13 14 15 16 17 18 19 20
PSD
ADIO0 ADIO1 ADIO2 ADIO3 ADIO4 ADIO5 ADIO6 ADIO7 ADIO8 ADIO9 ADIO10 ADIO11 ADIO12 ADIO13 ADIO14 ADIO15
9 VCC
29 VCC
69 VCC PF0 PF1 PF2 PF3 PF4 PF5 PF6 PF7 31 32 33 34 35 36 37 38
18 32 49 6 48 44 45 46 47 58 59 60 61 62 63 64 65
X2 NMI VREF VPP ANGND ACH4/P0.4/PMD.0 ACH5/P0.5/PMD.1 ACH6/P0.6/PMD.2 ACH7/P0.7/PMD.3
PG0 PG1 PG2 PG3 PG4 PG5 PG6 PG7 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7
21 22 23 24 25 26 27 28 51 52 53 54 55 56 57 58 61 62 63 64 65 66 67 68 41 42 43 44 45 46 47 48 A16 A17 A18 A19
P6.0/EPA8 P6.1/EPA9 P6.2/T1CLK P6.3/T1DIR P6.4/SC0 P6.5/SD0 P6.6/SC1 P6.7/SD1
CNTL0 (WR) CNTL1 (RD) CNTL2 (BHE) PD0 (ALE) PD1 (CLKIN) PD2 (CSI) PD3 (WRH)
36 37 38 39 40 41 42 43 57 56 55 54 53 52 51 50
P2.0/TX/PVR P2.1/RXD/PALE P2.2/EXINT/PROG P2.3/INTB P2.4/INTINTOUT P2.5/HLD P2.6/HLDA/CPVER P2.7/CLKOUT/PAC
EA
33
79 80 1 2
31 RESET
RESET
39
RESET
P1.0/EPA0/T2CLK P1.1/EPA1 P1.2/EPA2/T2DIR P1.3/EPA3 BUSWIDTH/P5.7 P1.4/EPA4 P1.5/EPA5 P1.6/EPA6 P1.7/EPA7
READY/P5.6
2
< |