|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
1/95 preliminary data november 2003 this is preliminary information on a new product now in development or undergoing evaluation. details are subject to change wit hout notice. rev. 2.0 psd834f2v flash psd, 3.3v supply, for 8-bit mcus 2 mbit + 256 kbit dual flash memories and 64 kbit sram features summary n flash in-system programmable (isp) peripheral for 8-bit mcus n 3.3 v10% single supply voltage n 2 mbit of primary flash memory (8 uniform sectors, 32k x 8) n 256 kbit secondary flash memory (4 uniform sectors) n 64 kbit of battery-backed sram n over 3,000 gates of pld: dpld and cpld n 27 reconfigurable i/o ports n enhanced jtag serial port n programmable power management n high endurance: C 100,000 erase/write cycles of flash memory C 1,000 erase/write cycles of pld figure 1. packages plcc52 (j) pqfp52 (m)
psd834f2v 2/95 table of contents summary description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 psd architectural overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 page register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 plds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 i/o ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 mcu bus interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 jtag port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 in-system programming (isp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 power management unit (pmu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 development system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 psd register description and address offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 detailed operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 memory blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 primary flash memory and secondary flash memory description . . . . . . . . . . . . . . . . . . . . . 15 memory block select signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 power-down instruction and power-up mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 programming flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 erasing flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 specific features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 sram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 sector select and sram select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 page register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3/95 psd834f2v plds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 the turbo bit in psd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 decode pld (dpld) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 complex pld (cpld) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 output macrocell (omc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 product term allocator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 input macrocells (imc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 mcu bus interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 i/o ports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 general port architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 port operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 mcu i/o mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 pld i/o mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 address out mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 address in mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 data port mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 peripheral i/o mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 jtag in-system programming (isp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 port configuration registers (pcr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 0 port data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 ports a and b C functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 port d structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 port d C functionality and structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 port d structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 pld power management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 psd chip select input (csi, pd2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 input clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 input control signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 psd834f2v 4/95 reset timing and device status at reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 warm reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 i/o pin, register and pld status at reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 reset of flash memory erase and program cycles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 programming in-circuit using the jtag serial interface . . . . . . . . . . . . . . . . . . . . . . 63 standard jtag signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 jtag extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 security and flash memory protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 initial delivery state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 ac/dc parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 maximum rating. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 dc and ac parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 package mechanical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 part numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 pqfq52 pin assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 plcc52 pin assignments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5/95 psd834f2v summary description the psd family of memory systems for microcon- trollers (mcus) brings in-system-programmability (isp) to flash memory and programmable logic. the result is a simple and flexible solution for em- bedded designs. psd devices combine many of the peripheral functions found in mcu based ap- plications. the cpld in the psd devices features an opti- mized macrocell logic architecture. the psd mac- rocell was created to address the unique requirements of embedded system designs. it al- lows direct connection between the system ad- dress/data bus, and the internal psd registers, to simplify communication between the mcu and other supporting devices. the psd device includes a jtag serial program- ming interface, to allow in-system programming (isp) of the entire device . this feature reduces de- velopment time, simplifies the manufacturing flow, and dramatically lowers the cost of field upgrades. using sts special fast-jtag programming, a de- sign can be rapidly programmed into the psd in as little as seven seconds. the innovative psd family solves key problems faced by designers when managing discrete flash memory devices, such as: C first-time in-system programming (isp) C complex address decoding C simulataneous read and write to the device. the jtag serial interface block allows in-system programming (isp), and eliminates the need for an external boot eprom, or an external program- mer. to simplify flash memory updates, program execution is performed from a secondary flash memory while the primary flash memory is being updated. this solution avoids the complicated hardware and software overhead necessary to im- plement iap. st makes available a software development tool, psdsoft express, that generates ansi-c compli- ant code for use with your target mcu. this code allows you to manipulate the non-volatile memory (nvm) within the psd. code examples are also provided for: C flash memory iap via the uart of the host mcu C memory paging to execute code across several psd memory pages C loading, reading, and manipulation of psd macrocells by the mcu. psd834f2v 6/95 key features n a simple interface to 8-bit microcontrollers that use either multiplexed or non-multiplexed busses. the bus interface logic uses the control signals generated by the microcontroller automatically when the address is decoded and a read or write is performed. a partial list of the mcu families supported include: C intel 8031, 80196, 80186, 80c251, and 80386ex C motorola 68hc11, 68hc16, 68hc12, and 683xx C philips 8031 and 8051xa C zilog z80 and z8 n internal 2 mbit flash memory. this is the main flash memory. it is divided into 8 equal-sized blocks that can be accessed with user-specified addresses. n internal secondary 256 kbit flash boot memory. it is divided into 4 equal-sized blocks that can be accessed with user-specified addresses. this secondary memory brings the ability to execute code and update the main flash concurrently . n internal 64 kbit sram. the srams contents can be protected from a power failure by connecting an external battery. n cpld with 16 output macrocells (omcs) and 24 input macrocells (imcs). the cpld may be used to efficiently implement a variety of logic functions for internal and external control. examples include state machines, loadable shift registers, and loadable counters. n decode pld (dpld) that decodes address for selection of internal memory blocks. n 27 individually configurable i/o port pins that can be used for the following functions: C mcu i/os Cpld i/os C latched mcu address output C special function i/os. C 16 of the i/o ports may be configured as open-drain outputs. n standby current as low as 25a. n built-in jtag compliant serial port allows full- chip in-system programmability (isp). with it, you can program a blank device or reprogram a device in the factory or the field. n internal page register that can be used to expand the microcontroller address space by a factor of 256. n internal programmable power management unit (pmu) that supports a low power mode called power down mode. the pmu can automatically detect a lack of microcontroller activity and put the psd into power-down mode. n erase/write cycles: C flash memory C 100,000 minimum C pld C 1,000 minimum C data retention: 15 year minimum (for main flash memory, boot, pld and configuration bits) 7/95 psd834f2v figure 2. psd block diagram prog. mcu bus intrf. adio port cntl0, cntl1, cntl2 ad0 C ad15 clkin (pd1) clkin clkin pld input bus prog. port port a prog. port port b power mangmt unit 2 mbit primary flash memory 8 sectors vstdby pa0 C pa7 pb0 C pb7 prog. port port c prog. port port d pc0 C pc7 pd0 C pd2 address/data/control bus port a ,b & c 3 ext cs to port d 24 input macrocells port a ,b & c 73 73 256 kbit secondary non-volatile memory (boot or data) 4 sectors 64 kbit battery backup sram runtime control and i/o registers sram select perip i/o mode selects macrocell feedback or port input csiop flash isp cpld (cpld) 16 output macrocells flash decode pld ( dpld ) pld, configuration & flash memory loader jtag serial channel ( pc2 ) page register embedded algorithm sector selects sector selects global config. & security ai05793 8 psd834f2v 8/95 psd architectural overview psd devices contain several major functional blocks. figure 2 shows the architecture of the psd device family. the functions of each block are de- scribed briefly in the following sections. many of the blocks perform multiple functions and are user configurable. memory each of the memory blocks is briefly discussed in the following paragraphs. a more detailed discus- sion can be found in the section entitled memo- ry blocks on page 15. the 2 mbit (256k x 8) flash memory is the primary memory of the psd. it is divided into 8 equally- sized sectors that are individually selectable. the 256 kbit (32k x 8) secondary flash memory is divided into 4 equally-sized sectors. each sector is individually selectable. the 64 kbit 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 voltage stand-by (vstby, pc2), data is retained in the event of power failure. each sector of memory can be located in a differ- ent address space as defined by the user. the ac- cess times for all memory types includes the address latching and dpld decoding time. 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 in- ternal memory and i/o. the page register can also be used to change the address mapping of sectors of the flash memories into different mem- ory spaces for iap. plds the device contains two plds, the decode pld (dpld) and the complex pld (cpld), as shown in table 1, each optimized for a different function. the functional partitioning of the plds reduces power consumption, optimizes cost/performance, and eases design entry. table 1. pld i/o the dpld is used to decode addresses and to generate sector select signals for the psd inter- nal memory and registers. the dpld has combi- natorial outputs. the cpld has 16 output macrocells (omc) and 3 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 the pmmr2. these registers are set by the mcu at run-time. there is a slight penalty to pld propaga- tion time when invoking the power management features. i/o ports the psd has 27 individually configurable i/o pins distributed over the four ports (port a, b, c, and d). 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 ad- dress outputs for mcus using multiplexed ad- dress/data buses. the jtag pins can be enabled on port c for in- system programming (isp). ports a and b can also be configured as a data port for a non-multiplexed bus. mcu bus interface psd interfaces easily with most 8-bit mcus that have either multiplexed or non-multiplexed ad- dress/data buses. the device is configured to re- spond to the mcus control signals, which are also used as inputs to the plds. for examples, please see the section entitled mcu bus interface exam- ples on page 41. name inputs outputs product terms decode pld (dpld) 73 17 42 complex pld (cpld) 73 19 140 9/95 psd834f2v jtag port in-system programming (isp) can be performed through the jtag signals on port c. this serial in- terface allows complete programming of the entire psd 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 c. table 2 indicates the jtag pin assignments. in-system programming (isp) using the jtag signals on port c, the entire psd device can be programmed or erased without the use of the mcu. the primary flash memory can also be programmed in-system by the mcu executing the programming algorithms out of the secondary memory, or sram. the secondary memory can be programmed the same way by executing out of the primary flash memory. the pld or other psd configuration blocks can be programmed through the jtag port or a device programmer. table 3 indicates which programming methods can program different functional blocks of the psd. 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 psd also has some bits that are configured at run-time by the mcu to reduce power consump- tion of the cpld. the turbo bit in pmmr0 can be reset to '0' and the cpld latches its outputs and goes to sleep 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. please see the sec- tion entitled power management on page 56 for more details. table 2. jtag signals on port c table 3. methods of programming different functional blocks of the psd port c pins jtag signal pc0 tms pc1 tck pc3 tstat pc4 terr pc5 tdi pc6 tdo functional block jtag programming device programmer iap primary flash memory yes yes yes secondary flash memory yes yes yes pld array (dpld and cpld) yes yes no psd configuration yes yes no psd834f2v 10/95 development system the psd family is supported by psdsoft express, a windows-based software development tool. 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 3. psdsoft express is available from our web site (the ad- dress is given on the back page of this data sheet) or other distribution channels. psdsoft express 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. figure 3. psdsoft express development tool psd configuration psd fitter psd simulator psd programmer *.obj file pld description configure mcu bus interface and other psd attributes logic synthesis and fitting psdsilos iii device simulation (optional) psdpro, or flashlink (jtag) address translation and memory mapping psdabel modify abel template file or generate new file psd tools generate c code specific to psd functions user's choice of microcontroller compiler/linker *.obj and *.svf files available for 3rd party programmers (conventional or jtag-isc) firmware hex or s-record format ai04918 11/95 psd834f2v pin description table 4 describes the signal names and signal functions of the psd. table 4. pin description (for the plcc52 package - note 1) pin name pin type description adio0-7 30-37 i/o this is the lower address/data port. connect your mcu address or address/data bus according to the following rules: 1. 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. 2. if your mcu does not have a multiplexed address/data bus, or you are using an 80c251 in page mode, connect a0-a7 to this port. 3. 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 was selected. the addresses on this port are passed to the plds. adio8-15 39-46 i/o this is the upper address/data port. connect your mcu address or address/data bus according to the following rules: 1. if your mcu has a multiplexed address/data bus where the data is multiplexed with the lower address bits, connect a8-a15 to this port. 2. if your mcu does not have a multiplexed address/data bus, connect a8-a15 to this port. 3. if you are using an 80c251 in page mode, connect ad8-ad15 to this port. 4. 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 was selected. the addresses on this port are passed to the plds. cntl0 47 i the following control signals can be connected to this port, based on your mcu: 1. wr C active low write strobe input. 2. r_w C active high read/active low write input. this port is connected to the plds. therefore, these signals can be used in decode and other logic equations. cntl1 50 i the following control signals can be connected to this port, based on your mcu: 1. rd C active low read strobe input. 2. e C e clock input. 3. ds C active low data strobe input. 4. psen C connect psen to this port when it is being used as an active low read signal. for example, when the 80c251 outputs more than 16 address bits, psen is actually the read signal. this port is connected to the plds. therefore, these signals can be used in decode and other logic equations. cntl2 49 i this port can be used to input the psen (program select enable) signal from any mcu that uses this signal for code exclusively. if your mcu does not output a program select enable signal, this port can be used as a generic input. this port is connected to the plds. reset 48 i resets i/o ports, pld macrocells and some of the configuration registers. must be low at power-up. psd834f2v 12/95 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 29 28 27 25 24 23 22 21 i/o these pins make up port a. these port pins are configurable and can have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellab0-7) outputs. 3. inputs to the plds. 4. latched address outputs (see table 5). 5. address inputs. for example, pa0-3 could be used for a0-a3 when using an 80c51xa in burst mode. 6. as the data bus inputs d0-d7 for non-multiplexed address/data bus mcus. 7. d0/a16-d3/a19 in m37702m2 mode. 8. peripheral i/o mode. note: pa0-pa3 can only output cmos signals with an option for high slew rate. however, pa4-pa7 can be configured as cmos or open drain outputs. pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 7 6 5 4 3 2 52 51 i/o these pins make up port b. these port pins are configurable and can have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellab0-7 or mcellbc0-7) outputs. 3. inputs to the plds. 4. latched address outputs (see table 5). note: pb0-pb3 can only output cmos signals with an option for high slew rate. however, pb4-pb7 can be configured as cmos or open drain outputs. pc0 20 i/o pc0 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc0) output. 3. input to the plds. 4. tms input 2 for the jtag serial interface. this pin can be configured as a cmos or open drain output. pc1 19 i/o pc1 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc1) output. 3. input to the plds. 4. tck input 2 for the jtag serial interface. this pin can be configured as a cmos or open drain output. pc2 18 i/o pc2 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc2) output. 3. input to the plds. 4. vstby C sram stand-by voltage input for sram battery backup. this pin can be configured as a cmos or open drain output. pc3 17 i/o pc3 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc3) output. 3. input to the plds. 4. tstat output 2 for the jtag serial interface. 5. ready/busy output for parallel in-system programming (isp). this pin can be configured as a cmos or open drain output. pc4 14 i/o pc4 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc4) output. 3. input to the plds. 4. terr output 2 for the jtag serial interface. 5. battery-on indicator (vbaton). goes high when power is being drawn from the external battery. this pin can be configured as a cmos or open drain output. pin name pin type description 13/95 psd834f2v note: 1. the pin numbers in this table are for the plcc package only. see the package information, on page 90 onwards, for pin nu mbers on other package types. 2. these functions can be multiplexed with other functions. psd register description and address offset 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 al- located by the user to the internal psd registers. table 6 provides brief descriptions of the registers in csiop space. the following section gives a more detailed description. pc5 13 i/o pc5 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc5) output. 3. input to the plds. 4. tdi input 2 for the jtag serial interface. this pin can be configured as a cmos or open drain output. pc6 12 i/o pc6 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc6) output. 3. input to the plds. 4. tdo output 2 for the jtag serial interface. this pin can be configured as a cmos or open drain output. pc7 11 i/o pc7 pin of port c. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. cpld macrocell (mcellbc7) output. 3. input to the plds. 4. dbe C active low data byte enable input from 68hc912 type mcus. this pin can be configured as a cmos or open drain output. pd0 10 i/o pd0 pin of port d. this port pin can be configured to have the following functions: 1. ale/as input latches address output from the mcu. 2. mcu i/o C write or read from a standard output or input port. 3. input to the plds. 4. cpld output (external chip select). pd1 9 i/o pd1 pin of port d. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. input to the plds. 3. cpld output (external chip select). 4. clkin C clock input to the cpld macrocells, the apd units power-down counter, and the cpld and array. pd2 8 i/o pd2 pin of port d. this port pin can be configured to have the following functions: 1. mcu i/o C write to or read from a standard output or input port. 2. input to the plds. 3. cpld output (external chip select). 4. 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. v cc 15, 38 supply voltage gnd 1, 16, 26 ground pins pin name pin type description psd834f2v 14/95 table 5. i/o port latched address output assignments (note 1) note: 1. see the section entitled i/o ports, on page 46, on how to enable the latched address output function. 2. n/a = not applicable table 6. register address offset note: 1. other registers that are not part of the i/o ports. mcu port a port b port a (3:0) port a (7:4) port b (3:0) port b (7:4) 8051xa (8-bit) n/a address a7-a4 address a11-a8 n/a 80c251 (page mode) n/a n/a address a11-a8 address a15-a12 all other 8-bit multiplexed address a3-a0 address a7-a4 address a3-a0 address a7-a4 8-bit non-multiplexed bus n/a n/a address a3-a0 address a7-a4 register name port a port b port c port d other 1 description data in 00 01 10 11 reads port pin as input, mcu i/o input mode control 02 03 selects mode between mcu i/o or address out data out 04 05 12 13 stores data for output to port pins, mcu i/o output mode direction 06 07 14 15 configures port pin as input or output drive select 08 09 16 17 configures port pins as either cmos or open drain on some pins, while selecting high slew rate on other pins. input macrocell 0a 0b 18 reads input macrocells enable out 0c 0d 1a 1b reads the status of the output enable to the i/o port driver output macrocells ab 20 20 read C reads output of macrocells ab write C loads macrocell flip-flops output macrocells bc 21 21 read C reads output of macrocells bc write C loads macrocell flip-flops mask macrocells ab 22 22 blocks writing to the output macrocells ab mask macrocells bc 23 23 blocks writing to the output macrocells bc primary flash protection c0 read only C primary flash sector protection secondary flash memory protection c2 read only C psd security and secondary flash memory sector protection jtag enable c7 enables jtag port pmmr0 b0 power management register 0 pmmr2 b4 power management register 2 page e0 page register vm e2 places psd memory areas in program and/or data space on an individual basis. 15/95 psd834f2v detailed operation as shown in figure 2, the psd consists of six ma- jor types of functional blocks: n memory blocks n pld blocks n mcu bus interface n i/o ports n power management unit (pmu) n jtag interface the functions of each block are described in the following sections. many of the blocks perform multiple functions, and are user configurable. memory blocks the psd has the following memory blocks: C primary flash memory C secondary flash memory Csram the memory select signals for these blocks origi- nate from the decode pld (dpld) and are user- defined in psdsoft express. primary flash memory and secondary flash memory description the primary flash memory is divided evenly into eight equal sectors. the secondary flash memory is divided into four equal sectors. each sector of either memory block can be separately protected from program and erase cycles. flash memory may be erased on a sector-by-sec- tor basis. flash sector erasure may be suspended while data is read from other sectors of the block and then resumed after reading. during a program or erase cycle in flash memory, the status can be output on ready/busy (pc3). this pin is set up using psdsoft express configu- ration. memory block select signals the dpld generates the select signals for all the internal memory blocks (see the section entitled plds, on page 27). each of the eight sectors of the primary flash memory has a select signal (fs0-fs7) which can contain up to three product terms. each of the four sectors of the secondary flash memory has a select signal (csboot0- csboot3) which can contain up to three product terms. having three product terms for each select signal allows a given sector to be mapped in differ- ent areas of system memory. when using a mcu with separate program and data space, these flexible select signals allow dynamic re-mapping of sectors from one memory space to the other. ready/busy (pc3). this signal can be used to output the ready/busy status of the psd. the out- put on ready/busy (pc3) is a 0 (busy) when flash memory is being written to, or when flash memory is being erased. the output is a 1 (ready) when no write or erase cycle is in progress. memory operation. the primary flash memory and secondary flash memory are addressed through the mcu bus interface. the mcu can ac- cess these memories in one of two ways: n the mcu can execute a typical bus write or read operation just as it would if accessing a ram or rom device using standard bus cycles. n the mcu can execute a specific instruction that consists of several write and read operations. this involves writing specific data patterns to special addresses within the flash memory to invoke an embedded algorithm. these instructions are summarized in table 7. typically, the mcu can read flash memory using read operations, just as it would read a rom de- vice. however, flash memory can only be altered using specific erase and program instructions. for example, the mcu cannot write a single byte di- rectly to flash memory as it would write a byte to ram. to program a byte into flash memory, the mcu must execute a program instruction, then test the status of the program cycle. this status test is achieved by a read operation or polling ready/busy (pc3). flash memory can also be read by using special instructions to retrieve particular flash device in- formation (sector protect status and id). psd834f2v 16/95 table 7. instructions note: 1. all bus cycles are write bus cycles, except the ones with the read label 2. all values are in hexadecimal: x = dont 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-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 express. 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 protecti on sta- tus, or if the error flag (dq5/dq13) bit 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 bypa ss mode. 11. the system may perform read and program cycles in non-erasing sectors, read the flash id or read the sector protection statu s 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 i s intended. the mcu must fetch, for example, the code from the secondary flash memory when reading the sector protection status of the primary flash memory. instruction fs0-fs7 or csboot0- csboot3 cycle 1 cycle 2 cycle 3 cycle 4 cycle 5 cycle 6 cycle 7 read 5 1 read rd @ ra read main flash id 6 1 aah@ x555h 55h@ xaaah 90h@ x555h read identifier (a6,a1,a0 = 0,0,1) read sector protection 6,8,13 1 aah@ x555h 55h@ xaaah 90h@ x555h read identifier (a6,a1,a0 = 0,1,0) program a flash byte 13 1 aah@ x555h 55h@ xaaah a0h@ x555h pd@ pa flash sector erase 7,13 1 aah@ x555h 55h@ xaaah 80h@ x555h aah@ xaaah 55h@ xaaah 30h@ sa 30h 7 @ next sa flash bulk erase 13 1 aah@ x555h 55h@ xaaah 80h@ x555h aah@ xaaah 55h@ xaaah 10h@ x555h suspend sector erase 11 1 b0h@ xxxxh resume sector erase 12 1 30h@ xxxxh reset 6 1 f0h@ xxxxh unlock bypass 1 aah@ x555h 55h@ xaaah 20h@ x555h unlock bypass program 9 1 a0h@ xxxxh pd@ pa unlock bypass reset 10 1 90h@ xxxxh 00h@ xxxxh 17/95 psd834f2v instructions an instruction consists of a sequence of specific operations. each received byte is sequentially de- coded by the psd and not executed as a standard write operation. the instruction is executed when the correct number of bytes are properly re- ceived and the time between two consecutive bytes is shorter than the time-out period. some in- structions are structured to include read opera- tions after the initial write operations. the instruction must be followed exactly. any in- valid 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 7: flash memory: n erase memory by chip or sector n suspend or resume sector erase n program a byte n reset to read mode n read primary flash identifier value n read sector protection status n bypass these instructions are detailed in table 7. for ef- ficient 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 x555h during the first cycle and data 55h to address xaaah during the sec ond cy- cle. address signals a15-a12 are dont care dur- ing the instruction write cycles. however, the appropriate sector select (fs0-fs7 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 deter- mine which flash memory is to receive and exe- cute the instruction. the primary flash memory is selected if any one of sector select (fs0-fs7) is high, and the secondary flash memory is selected if any one of sector select (csboot0- csboot3) is high. power-down instruction and power-up mode power-up mode. the psd internal logic is reset upon power-up to the read mode. sector select (fs0-fs7 and csboot0-csboot3) must be held low, and write strobe (wr , cntl0) high, during power-up for maximum security of the data contents and to remove the possibility of a byte be- ing written on the first edge of write strobe (wr , cntl0). any write cycle initiation is locked when v cc is below v lko . read under typical conditions, the mcu may read the primary flash memory or the 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. read 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 7). 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. read primary flash identifier. the primary flash memory identifier is read with an instruction composed of 4 operations: 3 specific write oper- ations and a read operation (see table 7). dur- ing the read operation, address bits a6, a1, and a0 must be '0,' '0,' and '1,' respectively, and the ap- propriate sector select (fs0-fs7) must be high. the identifier for the device is e7h. read memory sector protection status. the primary flash memory sector protection status is read with an instruction composed of 4 operations: 3 specific write operations and a read opera- tion (see table 7). during the read operation, ad- dress bits a6, a1, and a0 must be '0,' '1,' and '0,' respectively, while sector select (fs0-fs7 or csboot0-csboot3) designates the flash memory sector whose protection has to be veri- fied. 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 mem- ory) can also be read by the mcu accessing the flash protection registers in psd i/o space. see the section entitled flash memory sector pro- tect, on page 22, for register definitions. psd834f2v 18/95 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 pro- gram cycle of flash memory. these status bits minimize the time that the mcu spends perform- ing these tasks and are defined in table 8. the status bits can be read as many times as needed. 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 the section entitled programming flash memory, on page 19, for de- tails. data polling flag (dq7). when erasing or pro- gramming in flash memory, the data polling flag (dq7) bit outputs the complement of the bit being entered for programming/writing on the dq7 bit. once the program instruction or the write oper- ation is completed, the true logic value is read on the data polling flag (dq7) bit (in a read opera- tion). n data 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. n during an erase cycle, the data polling flag (dq7) bit outputs a '0.' after completion of the cycle, the data polling flag (dq7) bit outputs the last bit programmed (it is a '1' after erasing). n if the byte to be programmed is in a protected flash memory sector, the instruction is ignored. n if all the flash memory sectors to be erased are protected, the data polling flag (dq7) bit is reset to '0' for about 100s, and then returns to the previous addressed byte. no erasure is performed. toggle flag (dq6). the psd offers another way for determining when the flash memory program cycle is completed. during the internal write op- eration and when either the fs0-fs7 or csboot0-csboot3 is true, the toggle flag (dq6) bit toggles from '0' to '1' and '1' to '0' on sub- sequent attempts to read any byte of the memory. when the internal cycle is complete, the toggling stops and the data read on the data bus d0-d7 is the addressed memory byte. 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. n the toggle flag (dq6) bit is effective after the fourth write pulse (for a program instruction) or after the sixth write pulse (for an erase instruction). n if the byte to be programmed belongs to a protected flash memory sector, the instruction is ignored. n if all the flash memory sectors selected for erasure are protected, the toggle flag (dq6) bit toggles to '0' for about 100s and then returns to the previous addressed byte. error flag (dq5). during a normal program or erase cycle, the error flag (dq5) bit is to '0.' this bit is set to '1' when there is a failure during flash memory byte program, sector erase, or bulk erase cycle. in the case of flash memory programming, the er- ror flag (dq5) bit indicates the attempt to program a flash memory bit from the programmed state, '0,' to the erased state, '1,' which is not valid. the error flag (dq5) bit may also indicate a time-out condition while attempting to program a byte. in case of an error in a flash memory sector erase or byte program cycle, the flash memory sector in which the error occurred or to which the pro- grammed byte belongs must no longer be used. other flash memory sectors may still be used. the error flag (dq5) bit is reset after a reset flash instruction. erase time-out flag (dq3). the erase time- out flag (dq3) bit reflects the time-out period al- lowed between two consecutive sector erase in- structions. the erase time-out flag (dq3) bit is reset to '0' after a sector erase cycle for a time pe- riod of 100s + 20% unless an additional sector erase instruction is decoded. after this time peri- od, or when the additional sector erase instruction is decoded, the erase time-out flag (dq3) bit is set to '1.' table 8. status bit note: 1. x = not guaranteed value, can be read either 1 or 0. 2. dq7-dq0 represent the data bus bits, d7-d0. 3. fs0-fs7 and csboot0-csboot3 are active high. functional block fs0-fs7/csboot0- csboot3 dq7 dq6 dq5 dq4 dq3 dq2 dq1 dq0 flash memory v ih data polling toggle flag error flag x erase time- out xxx 19/95 psd834f2v programming flash memory flash memory must be erased prior to being pro- grammed. a byte of flash memory is erased to all 1s (ffh), and is programmed by setting selected bits to '0.' the mcu may erase flash memory all at once or by-sector, but not byte-by-byte. howev- er, the mcu may program flash memory byte-by- byte. the primary and secondary flash memories re- quire the mcu to send an instruction to program a byte or to erase sectors (see table 7). once the mcu issues a flash memory program or erase instruction, it must check for 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 (pc3). data polling. polling on the data polling flag (dq7) bit is a method of checking whether a pro- gram or erase cycle is in progress or has complet- ed. figure 4 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 byte to be pro- grammed in flash memory to check status. the data polling flag (dq7) bit of this location be- comes the complement of b7 of the original data byte to be programmed. the mcu continues to poll this location, comparing the data polling flag (dq7) bit and monitoring the error flag (dq5) bit. when the data polling flag (dq7) bit matches b7 of the original data, and the error flag (dq5) bit remains '0,' the embedded algorithm is complete. if the error flag (dq5) bit is '1,' the mcu should test the data polling flag (dq7) bit again since the data polling flag (dq7) bit may have changed simultaneously with the error flag (dq5) bit (see figure 4). the error flag (dq5) bit is set if either an internal time-out occurred while the embedded algorithm attempted to program the byte or if the mcu at- tempted 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 program- ming algorithm has completed, to compare the byte that was written to the flash memory with the byte that was intended to be written. when using the data polling method during an erase cycle, figure 4 still applies. however, the data polling flag (dq7) bit is '0' until the erase cy- cle is complete. a '1' on the error flag (dq5) bit in- dicates a time-out condition on the erase cycle; a '0' indicates no error. the mcu can read any loca- tion within the sector being erased to get the data polling flag (dq7) bit and the error flag (dq5) bit. psdsoft express generates ansi c code func- tions which implement these data polling algo- rithms. figure 4. data polling flowchart read dq5 & dq7 at valid address start read dq7 fail pass ai01369b dq7 = data yes no yes no dq5 = 1 dq7 = data yes no psd834f2v 20/95 data toggle. checking the toggle flag (dq6) bit is a method of determining whether a program or erase cycle is in progress or has completed. figure 5 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 of the byte to be pro- grammed in flash memory to check status. the toggle flag (dq6) bit of this location toggles each time the mcu reads this location until the embed- ded algorithm is complete. the mcu continues to read this location, checking the toggle flag (dq6) bit and monitoring the error flag (dq5) bit. when the toggle flag (dq6) bit stops toggling (two con- secutive reads yield the same value), and the er- ror flag (dq5) bit remains '0,' the embedded algorithm is complete. if the error flag (dq5) bit is '1,' the mcu should test the toggle flag (dq6) bit again, since the toggle flag (dq6) bit may have changed simultaneously with the error flag (dq5) bit (see figure 5). figure 5. data toggle flowchart the error flag (dq5) bit is set if either an internal time-out occurred while the embedded algorithm attempted to program the byte, or if the mcu at- tempted 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 program- ming algorithm has completed, to compare the byte that was written to flash memory with the byte that was intended to be written. when using the data toggle method after an erase cycle, figure 5 still applies. the toggle flag (dq6) bit toggles until the erase cycle is complete. a 1 on the error flag (dq5) bit indicates a time-out condition on the erase cycle; a 0 indicates no er- ror. the mcu can read any location within the sec- tor being erased to get the toggle flag (dq6) bit and the error flag (dq5) bit. psdsoft express generates ansi c code func- tions which implement these data toggling algo- rithms. unlock bypass. the unlock bypass instructions allow the system to program bytes 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 by- pass code, 20h (as shown in table 7). the flash memory then enters the unlock bypass mode. a two-cycle unlock bypass program in- struction is all that is required to program in this mode. the first cycle in this instruction contains the unlock bypass program code, a0h. the sec- ond cycle contains the program address and data. additional data is programmed in the same man- ner. these instructions dispense with the initial two unlock cycles required in the standard pro- gram instruction, resulting in faster total flash memory programming. during the unlock bypass mode, only the unlock bypass program and unlock bypass reset flash instructions are valid. to exit the unlock bypass mode, the system must issue the two-cycle unlock bypass reset flash in- struction. the first cycle must contain the data 90h; the second cycle the data 00h. addresses are dont care for both cycles. the flash memory then returns to read mode. read dq5 & dq6 start read dq6 fail pass ai01370b dq6 = toggle no no yes yes dq5 = 1 no yes dq6 = toggle 21/95 psd834f2v erasing flash memory flash bulk erase. the flash bulk erase instruc- tion uses six write operations followed by a read operation of the status register, as de- scribed in table 7. if any byte of the bulk erase in- struction is wrong, the bulk erase instruction aborts and the device is reset to the read flash memory status. during a bulk erase, the memory status may be checked by reading the error flag (dq5) bit, the toggle flag (dq6) bit, and the data polling flag (dq7) bit, as detailed in the section entitled pro- gramming flash memory, on page 19. the error flag (dq5) bit 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 be- fore erasing to 0ffh. during execution of the bulk erase instruction, the flash memory does not accept any instructions. flash sector erase. the sector erase instruc- tion uses six write operations, as described in table 7. additional flash sector erase codes and flash memory sector addresses can be written subsequently to erase other flash memory sec- tors in parallel, without further coded cycles, if the additional bytes are transmitted in a shorter time than the time-out period of about 100s. the input of a new sector erase code restarts the time-out period. the status of the internal timer can be monitored through the level of the erase time-out flag (dq3) bit. if the erase time-out flag (dq3) bit is '0,' the sector erase instruction has been received and the time-out period is counting. if the erase time- out flag (dq3) bit 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 instructions abort the cycle that is currently in progress, and re- set 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 (byte=ffh). during a sector erase, the memory status may be checked by reading the error flag (dq5) bit, the toggle flag (dq6) bit, and the data polling flag (dq7) bit, as detailed in the section entitled pro- gramming flash memory, on page 19. 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 re- sumed. suspend sector erase. when a sector erase cycle is in progress, the suspend sector erase in- struction can be used to suspend the cycle by writ- ing 0b0h to any address when an appropriate sector select (fs0-fs7 or csboot0-csboot3) is high. (see table 7). this allows reading of data from another flash memory sector after the erase cycle has been suspended. suspend sector erase is accepted only during an erase cycle and defaults to read mode. a suspend sector erase instruction executed during an erase time-out pe- riod, in addition to suspending the erase cycle, ter- minates the time out period. the toggle flag (dq6) bit 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 (dq6) bit 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 exe- cuted, the following rules apply: C attempting to read from a flash memory sector that was being erased outputs invalid data. C reading from a flash sector that was not being erased is valid. C the flash memory cannot be programmed, and only responds to resume sector erase and reset flash instructions (read is an operation and is allowed). C if a reset flash 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 address while an appropriate sector select (fs0-fs7 or csboot0-csboot3) is high. (see table 7.) psd834f2v 22/95 specific features flash memory sector protect. each primary and secondary flash memory sector can be sepa- rately protected against program and erase cy- cles. sector protection provides additional data security because it disables all program or erase cycles. this mode can be activated through the jtag port or a device programmer. sector protection can be selected for each sector using the psdsoft express configuration pro- gram. this automatically protects selected sectors when the device is programmed through the jtag port or a device programmer. flash memory sec- tors can be unprotected to allow updating of their contents using the jtag port or a device pro- grammer. 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 pro- tection status. the sector protection status can be read by the mcu through the flash memory protection and psd/ee protection registers (in the csiop block). see table 9 and table 10. table 9. sector protection/security bit definition C flash protection register note: 1. bit definitions: sec_prot 1 = primary flash memory or secondary flash memory sector is write protected. sec_prot 0 = primary flash memory or secondary flash memory sector is not write protected. table 10. sector protection/security bit definition C psd/ee protection register note: 1. 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. 1 = security bit in device has been set. reset flash. the reset flash instruction con- sists of one write cycle (see table 7). it can also be optionally preceded by the standard two write decoding cycles (writing aah to 555h and 55h to aaah). it must be executed after: C reading the flash protection status or flash id C an error condition has occurred (and the device has set the error flag bit (dq5) to '1') during a flash memory program or erase cycle. the reset flash instruction puts the flash memo- ry back into normal read mode. if an error condi- tion has occurred (and the device has set the error flag bit (dq5) to '1') the flash memory is put back into normal read mode within 25 m s of the reset flash instruction having been issued. the reset flash instruction is ignored when it is issued dur- ing a program or bulk erase cycle of the flash memory. the reset flash instruction aborts any on-going sector erase cycle, and returns the flash memory to the normal read mode within 25 m s. reset (reset ) signal. a pulse on reset (re- set ) aborts any cycle that is in progress, and re- sets the flash memory to the read mode. when the reset occurs during a program or erase cycle, the flash memory takes up to 25 m s to return to the read mode. it is recommended that the reset (reset ) pulse (except for power on reset, as described on page 61) be at least 25 m s so that the flash memory is always ready for the mcu to fetch the bootstrap instructions after the reset cy- cle is complete. bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 sec7_prot sec6_prot sec5_prot sec4_prot sec3_prot sec2_prot sec1_prot sec0_prot bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 security_bit not used not used not used sec3_prot sec2_prot sec1_prot sec0_prot 23/95 psd834f2v sram the sram is enabled when sram select (rs0) from the dpld is high. sram select (rs0) can contain up to two product terms, allowing flexible memory mapping. the sram can be backed up using an external battery. the external battery should be connected to voltage stand-by (vstby, pc2). if you have an external battery connected to the psd, the con- tents of the sram are retained in the event of a power loss. the contents of the sram are re- tained so long as the battery voltage remains at 2 v or greater. if the supply voltage falls below the battery voltage, an internal power switch-over to the battery occurs. pc4 can be configured as an output that indicates when power is being drawn from the external bat- tery. battery-on indicator (vbaton, pc4) is high with the supply voltage falls below the battery volt- age and the battery on voltage stand-by (vstby, pc2) is supplying power to the internal sram. sram select (rs0), voltage stand-by (vstby, pc2) and battery-on indicator (vbaton, pc4) are all configured using psdsoft express configu- ration. sector select and sram select sector select (fs0-fs7, csboot0-csboot3) and sram select (rs0) are all outputs of the dpld. they are setup by writing equations for them in psdabel. 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 seg- ment 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 de- fined fs1 to anywhere in the range of 8000h to bfffh would not be valid. figure 6 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 one has the highest priority and level 3 has the lowest. figure 6. priority level of memory and i/o components level 1 sram, i /o, or peripheral i /o level 2 secondary non-volatile memory highest priority lowest priority level 3 primary flash memory ai02867d psd834f2v 24/95 memory select configuration for mcus with separate program and data spaces. the 8031 and compatible family of mcus, which includes the 80c51, 80c151, 80c251, and 80c51xa, 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 express 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 pri- mary flash memory in the data space at boot-up, and secondary flash memory in the program space at boot-up, and later swap the primary and secondary flash memories. this is easily done with the vm register by using psdsoft express configuration to configure it for boot-up and hav- ing the mcu change it when desired. table 11 describes the vm register. table 11. vm register 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 7). figure 7. 8031 memory modules C separate space bit 7 pio_en bit 6 bit 5 bit 4 primary fl_data bit 3 secondary ee_data bit 2 primary fl_code bit 1 secondary ee_code bit 0 sram_code 0 = disable pio mode not used not used 0 = rd cant access flash memory 0 = rd cant access secondary flash memory 0 = psen cant access flash memory 0 = psen cant access secondary flash memory 0 = psen cant access sram 1= enable pio mode not used not used 1 = rd access flash memory 1 = rd access secondary flash memory 1 = psen access flash memory 1 = psen access secondary flash memory 1 = psen access sram primary flash memory dpld secondary flash memory sram rs0 csboot0-3 fs0-fs7 cs cs cs oe oe rd psen oe ai02869c 25/95 psd834f2v combined space modes. the program and data spaces are combined into one memory space that allows the primary flash memory, sec- ondary 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 b2 and b4 of the vm register are set to 1 (see figure 8). figure 8. 8031 memory modules C combined space primary flash memory dpld secondary flash memory sram rs0 csboot0-3 fs0-fs7 rd cs cs cs rd oe oe vm reg bit 2 psen vm reg bit 0 vm reg bit 1 vm reg bit 3 vm reg bit 4 oe ai02870c psd834f2v 26/95 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 (pgr0- pgr7) are inputs to the dpld decoder and can be included in the sector select (fs0-fs7, csboot0-csboot3), and sram select (rs0) equations. if memory paging is not needed, or if not all 8 page register bits are needed for memory paging, then these bits may be used in the cpld for general logic. see application note an1154 . figure 9 shows 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. figure 9. page register reset d0-d7 r/w d0 q0 q1 q2 q3 q4 q5 q6 q7 d1 d2 d3 d4 d5 d6 d7 page register pgr0 pgr1 pgr2 pgr3 dpld and cpld internal selects and logic pld pgr4 pgr5 pgr6 pgr7 ai02871b 27/95 psd834f2v plds the plds bring programmable logic functionality to the psd. after specifying the logic for the plds using the psdabel tool in psdsoft express, 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 section entitled decode pld (dpld), on page 29, and the section entitled complex pld (cpld), also on page 30. figure 10 shows the configuration of the plds. the dpld performs address decoding for select signals for internal components, such as memory, registers, and i/o ports. the cpld can be used for logic functions, such as loadable counters and shift registers, state ma- chines, 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 (ecs0- ecs2) signals. the and array is used to form product terms. these product terms are specified using psdabel. an input bus consisting of 73 signals is connected to the plds. the signals are shown in table 12. the turbo bit in psd the plds in the psd can minimize power con- sumption by switching off when inputs remain un- changed for an extended time of about 70ns. resetting the turbo bit to '0' (bit 3 of pmmr0) au- tomatically places the plds into standby if no in- puts are changing. turning the turbo mode off increases propagation delays while reducing pow- er consumption. see the section entitled power management, on page 56, on how to set the turbo bit. additionally, five bits are available in pmmr2 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 12. dpld and cpld inputs note: 1. the address inputs are a19-a4 in 80c51xa mode. input source input name number of signals mcu address bus 1 a15-a0 16 mcu control signals cntl2-cntl0 3 reset rst 1 power-down pdn 1 port a input macrocells pa7-pa0 8 port b input macrocells pb7-pb0 8 port c input macrocells pc7-pc0 8 port d inputs pd2-pd0 3 page register pgr7-pgr0 8 macrocell ab feedback mcellab.fb7- fb0 8 macrocell bc feedback mcellbc.fb7- fb0 8 secondary flash memory program status bit ready/busy 1 psd834f2v 28/95 figure 10. pld diagram pld input bus 8 input macrocell & input ports direct macrocell input to mcu data bus csiop select sram select secondary non-volatile memory selects decode pld page register peripheral selects jtag select cpld pt alloc. macrocell alloc. mcellab mcellbc direct macrocell access from mcu data bus 24 input macrocell (port a,b,c) 16 output macrocell i/o ports primary flash memory selects 3 port d inputs to port a or b to port b or c a ta u s 8 8 8 4 1 1 2 1 external chip selects to port d 3 73 16 73 24 output macrocell feedback ai0287 2 29/95 psd834f2v decode pld (dpld) the dpld, shown in figure 11, is used for decod- ing the address for internal and external compo- nents. the dpld can be used to generate the following decode signals: n 8 sector select (fs0-fs7) signals for the primary flash memory (three product terms each) n 4 sector select (csboot0-csboot3) signals for the secondary flash memory (three product terms each) n 1 internal sram select (rs0) signal (two product terms) n 1 internal csiop select (psd configuration register) signal n 1 jtag select signal (enables jtag on port c) n 2 internal peripheral select signals (peripheral i/o mode). figure 11. dpld logic array (inputs) (24) (8) (16) (1) pdn (apd output) i /o ports (port a,b,c) (8) pgr0 - pgr7 (8) mcellab.fb [7:0] (feedbacks) mcellbc.fb [7:0] (feedbacks) a [ 15:0 ] * (3) (3) pd [ 2:0 ] (ale,clkin,csi) cntrl [ 2:0 ] ( read/write control signals) (1) (1) reset rd_bsy rs0 csiop psel0 psel1 8 primary flash memory sector selects sram select i/o decoder select peripheral i/o mode select csboot 0 csboot 1 csboot 2 csboot 3 fs0 fs7 3 3 3 3 3 3 3 3 3 3 3 3 2 jtagsel ai02873d fs1 fs2 fs3 fs6 fs5 fs4 1 1 1 1 psd834f2v 30/95 complex pld (cpld) the cpld can be used to implement system logic functions, such as loadable counters and shift reg- isters, system mailboxes, handshaking protocols, state machines, and random logic. the cpld can also be used to generate three external chip se- lect (ecs0-ecs2), routed to port d. although external chip select (ecs0-ecs2) can be produced by any output macrocell (omc), these three external chip select (ecs0-ecs2) on port d do not consume any output macrocells (omc). as shown in figure 10, the cpld has the following blocks: n 24 input macrocells (imc) n 16 output macrocells (omc) n macrocell allocator n product term allocator n and array capable of generating up to 137 product terms n 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 sys- tem logic and eliminates the need to connect the data bus to the and array as required in most standard pld macrocell architectures. 31/95 psd834f2v figure 12. macrocell and i/o port i/o ports cpld macrocells input macrocells latched address out mux mux mux mux mux d d q q q g d qd wr wr pdr data product term allocator dir reg. select input product terms from other macrocells polarity select up to 10 product terms clock select pr di ld d/t ck cl q d/t/jk ff select pt clear pt clock global clock pt output enable ( oe ) macrocell feedback i/o port input ale/as pt input latch gate/clock mcu load pt preset mcu data in comb. /reg select macrocell to i/o port alloc. cpld output to other i/o ports pld input bus pld input bus mcu address / data bus macrocell out to mcu data load control and array cpld output i/o pin ai02874 psd834f2v 32/95 output macrocell (omc) eight of the output macrocells (omc) are con- nected to ports a and b pins and are named as mcellab0-mcellab7. the other eight macrocells are connected to ports b and c pins and are named as mcellbc0-mcellbc7. if an mcellab out- put is not assigned to a specific pin in psdabel, the macrocell allocator block assigns it to either port a or b. the same is true for a mcellbc output on port b or c. table 13 shows the macrocells and port assignment. the output macrocell (omc) architecture is shown in figure 13. 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 im- plement 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 psdabel program. the flip-flops clock, preset, and clear inputs may be driven from a product term of the and array. alternatively, clkin (pd1) 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 13. output macrocell port and data bit assignments output macrocell port assignment native product terms maximum borrowed product terms data bit for loading or reading mcellab0 port a0, b0 3 6 d0 mcellab1 port a1, b1 3 6 d1 mcellab2 port a2, b2 3 6 d2 mcellab3 port a3, b3 3 6 d3 mcellab4 port a4, b4 3 6 d4 mcellab5 port a5, b5 3 6 d5 mcellab6 port a6, b6 3 6 d6 mcellab7 port a7, b7 3 6 d7 mcellbc0 port b0, c0 4 5 d0 mcellbc1 port b1, c1 4 5 d1 mcellbc2 port b2, c2 4 5 d2 mcellbc3 port b3, c3 4 5 d3 mcellbc4 port b4, c4 4 6 d4 mcellbc5 port b5, c5 4 6 d5 mcellbc6 port b6, c6 4 6 d6 mcellbc7 port b7, c7 4 6 d7 33/95 psd834f2v product term allocator the cpld has a product term allocator. the ps- dabel compiler uses the product term allocator to borrow and place product terms from one macro- cell to another. the following list summarizes how product terms are allocated: n mcellab0-mcellab7 all have three native product terms and may borrow up to six more n mcellbc0-mcellbc3 all have four native product terms and may borrow up to five more n mcellbc4-mcellbc7 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 al- ready 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 macro- cells (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 express performs this expansion as needed. loading and reading the output macrocells (omc). the output macrocells (omc) block oc- cupies a memory location in the mcu address space, as defined by the csiop block (see the section entitled i/o ports, on page 46). 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 func- tions. 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 can be loaded to the output macrocells (omc) on the trailing edge of write strobe (wr , cntl0) (edge loading) or during the time that write strobe (wr , cntl0) is active (level load- ing). the method of loading is specified in psdsoft express configuration. psd834f2v 34/95 figure 13. cpld output macrocell pt allocator mask reg. pt clk pt pt pt clkin feedback ( .fb ) port input and array pld input bus mux mux polarity select ld in clr q pr din comb/reg select port driver input macrocell i/o pin macrocell allocator internal data bus d [ 7:0 ] direction register clear ( .re ) programmable ff ( d / t/jk /sr ) wr enable ( .oe ) preset ( .pr ) rd macrocell cs ai02875b 35/95 psd834f2v 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 out- put 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 mcellab0- mcellab3 are being used for a state machine. you would not want an mcu write to mcellab to overwrite the state machine registers. therefore, you would want to load the mask register for mcellab (mask macrocell ab) with the value 0fh. the output enable of the omc. the output macrocells (omc) block 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 prod- uct term from the and array, ored with the di- rection 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 psd- soft express. if the output macrocell (omc) output is declared as an internal node and not as a port pin output in the psdabel file, 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. 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 14. the input macrocells (imc) are individually config- urable, 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 con- trolled by one product term and 7-4 by another. configurations for the input macrocells (imc) are specified by equations written in psdabel (see ap- plication note an1171 ). outputs of the input mac- rocells (imc) can be read by the mcu via the imc buffer. see the section entitled i/o ports, on page 46. 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 15 shows a typical con- figuration 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 mac- rocells (imc) and the master can then read the in- put 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 , cntl0), and slave_cs. psd834f2v 36/95 figure 14. input macrocell output macrocells bc and macrocell ab pt pt feedback and array pld input bus port driver i/o pin internal data bus d [ 7: 0 ] direction register mux mux ale/as pt q q d d g latch input macrocell enable ( .oe ) d ff input macrocell _ rd ai02876b 37/95 psd834f2v figure 15. handshaking communication using input macrocells master mcu mcu-rd mcu-rd mcu-wr slave C wr slave C cs mcu-wr d [ 7:0 ] d [ 7:0 ] cpld dq qd port a data out register port a input macrocell port a slave C read slave mcu rd wr ai02877c psd psd834f2v 38/95 mcu bus interface the no-glue logic mcu bus interface block can be directly connected to most popular mcus and their control signals. key 8-bit mcus, with their bus types and control signals, are shown in table 14. the interface type is specified using the psd- soft express configuration. psd interface to a multiplexed 8-bit bus. fig- ure 16 shows an example of a system using a mcu with an 8-bit multiplexed bus and a psd. 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 a or b. 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 d may be used as additional address inputs. table 14. mcus and their control signals note: 1. unused cntl2 pin can be configured as cpld input. other unused pins (pc7, pd0, pa3-0) can be configured for other i/o fu nc- tions. 2. ale/as input is optional for mcus with a non-multiplexed bus mcu data bus width cntl0 cntl1 cntl2 pc7 pd0 2 adio0 pa3-pa0 pa7-pa3 8031 8 wr rd psen (note 1 ) ale a0 (note 1 ) (note 1 ) 80c51xa 8 wr rd psen (note 1 ) ale a4 a3-a0 (note 1 ) 80c251 8 wr psen (note 1 ) (note 1 ) ale a0 (note 1 ) (note 1 ) 80c251 8 wr rd psen (note 1 ) ale a0 (note 1 ) (note 1 ) 80198 8 wr rd (note 1 ) (note 1 ) ale a0 (note 1 ) (note 1 ) 68hc11 8 r/w e (note 1 ) (note 1 ) as a0 (note 1 ) (note 1 ) 68hc912 8 r/w e (note 1 ) dbe as a0 (note 1 ) (note 1 ) z80 8 wr rd (note 1 ) (note 1 ) (note 1 ) a0 d3-d0 d7-d4 z8 8 r/w ds (note 1 ) (note 1 ) as a0 (note 1 ) (note 1 ) 68330 8 r/w ds (note 1 ) (note 1 ) as a0 (note 1 ) (note 1 ) m37702m2 8 r/w e (note 1 ) (note 1 ) ale a0 d3-d0 d7-d4 39/95 psd834f2v figure 16. an example of a typical 8-bit multiplexed bus interface mcu wr rd bhe ale reset ad [ 7:0 ] a [ 15:8 ] a [ 15: 8 ] a [ 7: 0 ] adio port port a port b port c wr ( cntrl0 ) rd ( cntrl1 ) bhe ( cntrl2 ) rst ale ( pd0 ) port d ( optional ) ( optional ) psd ai02878c psd834f2v 40/95 psd interface to a non-multiplexed 8-bit bus. figure 17 shows an example of a system using a mcu with an 8-bit non-multiplexed bus and a psd. the address bus is connected to the adio port, and the data bus is connected to port a. port a is in tri-state mode when the psd is not access- ed by the mcu. should the system address bus exceed sixteen bits, ports b, c, or d may be used for additional address inputs. data byte enable reference. mcus have differ- ent data byte orientations. table 15 shows how the psd interprets byte/word operations in differ- ent 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 15. 8-bit data bus figure 17. an example of a typical 8-bit non-multiplexed bus interface bhe a0 d7-d0 x 0 even byte x 1 odd byte mcu wr rd bhe ale reset d [ 7:0 ] a [ 15:0 ] a [ 23:16 ] d [ 7:0 ] adio port port a port b port c wr ( cntrl0 ) rd ( cntrl1 ) bhe ( cntrl2 ) rst ale ( pd0 ) port d (optional) psd ai02879c 41/95 psd834f2v mcu bus interface examples figure 18 to figure 21 show 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 ps- dsoft express configuration. 80c31. figure 18 shows the bus interface for the 80c31, which has an 8-bit multiplexed address/ data bus. the lower address byte is multiplexed with the data bus. the mcu control signals pro- gram select enable (psen , cntl2), read strobe (rd , cntl1), and write strobe (wr , cntl0) may be used for accessing the internal memory and i/ o ports blocks. address strobe (ale/as, pd0) latches the address. 80c251. the intel 80c251 mcu features a user- configurable bus interface with four possible bus configurations, as shown in table 16. figure 18. interfacing the psd with an 80c31 table 16. 80c251 configurations configuration 80c251 read/write pins connecting to psd pins page mode 1 wr rd psen cntl0 cntl1 cntl2 non-page mode, 80c31 compatible a7-a0 multiplex with d7-d0 2 wr psen only cntl0 cntl1 non-page mode a7-a0 multiplex with d7-d0 3 wr psen only cntl0 cntl1 page mode a15-a8 multiplex with d7-d0 4 wr rd psen cntl0 cntl1 cntl2 page mode a15-a8 multiplex with d7-d0 ea/vp x1 x2 reset reset int0 int1 t0 t1 p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 p1.6 p1.7 p0.0 p0.1 p0.2 p0.3 p0.4 p0.5 p0.6 p0.7 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pc0 pc2 pc1 pc3 pc4 pc5 pc6 pc7 p2.0 p2.1 p2.2 p2.3 p2.4 p2.5 p2.6 p2.7 adio0 adio1 adio2 adio3 adio4 adio5 adio6 adio7 adio8 adio9 adio10 adio11 adio12 adio13 adio14 adio15 cntl0 (wr) cntl1(rd) cntl2 (psen) pd0-ale pd1 pd2 reset rd wr psen ale/p txd rxd reset 29 28 27 25 24 23 22 21 30 39 31 19 18 9 12 13 14 15 1 2 3 4 5 6 7 8 38 37 36 35 34 33 32 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 47 48 50 49 10 9 8 7 6 5 4 3 2 52 51 psd 80c31 ad7-ad0 ad [ 7:0 ] 21 22 23 24 25 26 27 28 17 16 29 30 a8 a9 a10 a11 a12 a13 a14 a15 rd wr psen ale 11 10 reset 20 19 18 17 14 13 12 11 ai02880c psd834f2v 42/95 the first configuration is 80c31 compatible, and the bus interface to the psd is identical to that shown in figure 18. the second and third configu- rations have the same bus connection as shown in figure 17. there is only one read strobe (psen ) connected to cntl1 on the psd. the a16 con- nection to pa0 allows for a larger address input to the psd. the fourth configuration is shown in fig- ure 19. read strobe (rd ) is connected to cntl1 and program select enable (psen ) is connected to cntl2. the 80c251 has two major operating modes: page mode and non-page mode. in non-page mode, the data is multiplexed with the lower ad- dress byte, and address strobe (ale/as, pd0) is active in every bus cycle. in page mode, data (d7- d0) is multiplexed with address (a15-a8). in a bus cycle where there is a page hit, address strobe (ale/as, pd0) is not active and only addresses (a7-a0) are changing. the psd supports both modes. in page mode, the psd bus timing is iden- tical to non-page mode except the address hold time and setup time with respect to address strobe (ale/as, pd0) is not required. the psd access time is measured from address (a7-a0) valid to data in valid. table 17. interfacing the psd with the 80c251, with one read input note: 1. the a16 and a17 connections are optional. 2. in non-page-mode, ad7-ad0 connects to adio7-adio0. adio0 adio1 adio2 adio3 adio4 adio5 adio6 adio7 adio8 adio9 adio10 adio11 adio12 adio13 adio14 adio15 cntl0 ( wr ) cntl1 ( rd ) cntl 2(psen) pd0- ale pd1 pd2 reset 32 26 43 42 41 40 39 38 37 36 24 25 27 28 29 30 31 33 a0 a1 a2 a3 a4 a5 a6 a7 ad8 ad9 ad10 ad14 ad15 ad13 ad11 ad12 a0 a1 a2 a3 a4 a5 a6 a7 ad8 ad9 ad10 ad11 ad15 ale wr a16 rd ad14 ad12 ad13 14 9 2 3 4 5 6 7 8 21 20 11 13 p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 p1.6 p1.7 p3.0/rxd p3.1/txd p3.2/int0 x2 x1 p3.3/int1 rst ea a16 1 p0.1 p0.0 p0.2 p0.3 p0.4 p0.5 p0.6 p0.7 p2.0 p2.1 p2.2 p2.3 p2.4 p2.5 p2.6 p2.7 ale psen wr rd/a16 pc0 pc1 pc3 pc4 pc5 pc6 pc7 19 18 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 48 8 9 10 49 50 47 29 28 27 25 24 23 22 21 20 19 18 17 14 13 12 11 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 7 6 5 4 3 2 52 51 80c251sb psd reset reset 35 p3.4/t0 p3.5/t1 16 15 17 10 reset pc2 ai02881c a17 1 43/95 psd834f2v figure 19. interfacing the psd with the 80c251, with rd and psen inputs adio0 adio1 adio2 adio3 adio4 adio5 adio6 adio7 adio8 adio9 adio10 adio11 adio12 adio13 adio14 adio15 cntl0 ( wr ) cntl1 ( rd ) cntl 2(psen) pd0- ale pd1 pd2 reset 32 26 43 42 41 40 39 38 37 36 24 25 27 28 29 30 31 33 a0 a1 a2 a3 a4 a5 a6 a7 ad8 ad9 ad10 ad14 ad15 ad13 ad11 ad12 a0 a1 a2 a3 a4 a5 a6 a7 ad8 ad9 ad10 ad11 ad15 ale wr psen rd ad14 ad12 ad13 14 9 2 3 4 5 6 7 8 21 20 11 13 p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 p1.6 p1.7 p3.0/rxd p3.1/txd p3.2/int0 x2 x1 p3.3/int1 rst ea p0.1 p0.0 p0.2 p0.3 p0.4 p0.5 p0.6 p0.7 p2.0 p2.1 p2.2 p2.3 p2.4 p2.5 p2.6 p2.7 ale psen wr rd/a16 pc0 pc1 pc3 pc4 pc5 pc6 pc7 19 18 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 48 8 9 10 49 50 47 29 28 27 25 24 23 22 21 20 19 18 17 14 13 12 11 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 7 6 5 4 3 2 52 51 80c251sb psd reset reset 35 p3.4/t0 p3.5/t1 16 15 17 10 reset pc2 ai02882c psd834f2v 44/95 80c51xa. the philips 80c51xa mcu family sup- ports an 8- or 16-bit multiplexed bus that can have burst cycles. address bits (a3-a0) are not multi- plexed, while (a19-a4) are multiplexed with data bits (d15-d0) in 16-bit mode. in 8-bit mode, (a11- a4) are multiplexed with data bits (d7-d0). the 80c51xa can be configured to operate in 8- bit data mode (as shown in figure 20). the 80c51xa improves bus throughput and per- formance by executing burst cycles for code fetch- es. in burst mode, address a19-a4 are latched internally by the psd, while the 80c51xa changes the a3-a0 signals to fetch up to 16 bytes of code. the psd access time is then measured from ad- dress a3-a0 valid to data in valid. the psd bus timing requirement in burst mode is identical to the normal bus cycle, except the address setup and hold time with respect to address strobe (ale/as, pd0) does not apply. figure 20. interfacing the psd with the 80c51x, 8-bit data bus adio0 adio1 adio2 adio3 ad104 ad105 adio6 adio7 adio8 adio9 adio10 adio11 ad1012 ad1013 adio14 adio15 cntl0 ( wr ) cntl1 ( rd ) cntl 2 (psen) pd0-ale pd1 pd2 reset 31 33 36 2 3 4 5 43 42 41 40 39 38 37 24 25 26 27 28 29 30 a4d0 a5d1 a6d2 a7d3 a8d4 a9d5 a10d6 a11d7 a12 a13 a14 a18 a19 a17 a15 a16 a0 a1 a2 a3 a4d0 a5d1 a6d2 a7d3 a8d4 a9d5 a10d6 a11d7 a12 a16 a17 a18 a19 a15 a13 a14 txd1 t2ex t2 t0 rst ea/wait busw a1 a0/wrh a2 a3 a4d0 a5d1 a6d2 a7d3 a8d4 a9d5 a10d6 a11d7 a12d8 a13d9 a14d10 a15d11 a16d12 a17d13 a18d14 a19d15 psen rd wrl pc0 pc1 pc3 pc4 pc5 pc6 pc7 ale psen rd wr ale 32 19 18 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 48 8 9 10 49 50 47 7 9 8 16 xtal1 xtal2 rxd0 txd0 rxd1 21 20 11 13 6 29 28 27 25 24 23 22 21 20 19 18 17 14 13 12 11 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 7 6 5 4 3 2 52 51 a0 a1 a2 a3 80c51xa psd reset reset 35 17 int0 int1 14 10 15 pc2 ai02883c 45/95 psd834f2v 68hc11. figure 21 shows a bus interface to a 68hc11 where the psd is configured in 8-bit mul- tiplexed mode with e and r/w settings. the dpld can be used to generate the read and wr sig- nals for external devices. figure 21. interfacing the psd with a 68hc11 9 10 11 12 13 14 15 16 adio0 adio1 adio2 adio3 ad104 ad105 adio6 adio7 adio8 adio9 adio10 adio11 ad1012 ad1013 adio14 adio15 cntl0 (r _ w) cntl1(e) cntl 2 pd0 C as pd1 pd2 reset 20 21 22 23 24 25 3 5 4 6 42 41 40 39 38 37 36 35 ad0 ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 a8 a9 a10 a14 a15 a13 a11 a12 ad1 ad2 ad3 ad4 ad5 ad6 ad7 e as r/w xt ex reset irq xirq pa0 pa1 pa2 pe0 pe1 pe2 pe3 pe4 pe5 pe6 pe7 vrh vrl pa3 pa4 pa5 pa6 pa7 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7 pc0 pc1 pc2 pc3 pc4 pc5 pc6 pc7 pc0 pc1 pc3 pc4 pc5 pc6 pc7 pd0 pd1 pd2 pd3 pd4 pd5 moda e as r/w 31 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 48 8 9 10 49 50 47 8 7 17 19 18 34 33 32 43 44 45 46 47 48 49 50 52 51 30 29 28 27 29 28 27 25 24 23 22 21 20 19 18 17 14 13 12 11 pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 7 6 5 4 3 2 52 51 modb 2 68hc11 psd reset reset ad7-ad0 ad7-ad0 pc2 ai02884c psd834f2v 46/95 i/o ports there are four programmable i/o ports: ports a, b, c, and d. each of the ports is eight bits except port d, which is 3 bits. each port pin is individually user configurable, thus allowing multiple functions per port. the ports are configured using psdsoft ex- press configuration or by the mcu writing to on- chip registers in the csiop space. the topics discussed in this section are: n general port architecture n port operating modes n port configuration registers (pcr) n port data registers n individual port functionality. general port architecture the general architecture of the i/o port block is shown in figure 22. individual port architectures are shown in figure 24 to figure 27. in general, once the purpose for a port pin has been defined, that pin is no longer available for other purposes. exceptions are noted. as shown in figure 22, the ports contain an output multiplexer whose select signals are driven by the configuration bits in the control registers (ports a and b only) and psdsoft express configuration. inputs to the multiplexer include the following: n output data from the data out register n latched address outputs n cpld macrocell output n external chip select (ecs0-ecs2) from the cpld. the port data buffer (pdb) is a tri-state buffer that allows only one source at a time to be read. the port data buffer (pdb) is connected to the internal data bus for feedback and can be read by the mcu. the data out and macrocell outputs, direc- tion and control registers, and port pin input are all connected to the port data buffer (pdb). figure 22. general i/o port architecture internal data bus data out reg. dq d g q dq dq wr wr wr address macrocell outputs enable product term ( .oe ) ext cs ale read mux p d b cpld - input control reg. dir reg. input macrocell enable out data in output select output mux port pin data out address ai02885 47/95 psd834f2v the port pins tri-state output driver enable is con- trolled by a two input or gate whose inputs come from the cpld and array enable product term and the direction register. if the enable product term of any of the array outputs are not defined and that port pin is not defined as a cpld output in the psdabel file, then the direction register has sole control of the buffer that drives the port pin. the contents of these registers can be altered by the mcu. the port data buffer (pdb) feedback path allows the mcu to check the contents of the registers. ports a, b, and c have embedded input macro- cells (imc). the input macrocells (imc) can be configured as latches, registers, or direct inputs to the plds. the latches and registers are clocked by address strobe (ale/as, pd0) or a product term from the pld and array. the outputs from the input macrocells (imc) drive the pld input bus and can be read by the mcu. see the section en- titled input macrocell, on page 36. port operating modes the i/o ports have several modes of operation. some modes can be defined using psdabel, some by the mcu writing to the control registers in csiop space, and some by both. the modes that can only be defined using psdsoft express must be programmed into the device and cannot be changed unless the device is reprogrammed. the modes that can be changed by the mcu can be done so dynamically at run-time. the pld i/o, data port, address input, and peripheral i/o modes are the only modes that must be defined before programming the device. all other modes can be changed by the mcu at run-time. see ap- plication note an1171 for more detail. table 18 summarizes which modes are available on each port. table 21 shows how and where the different modes are configured. each of the port operating modes are described in the following sections. mcu i/o mode in the mcu i/o mode, the mcu uses the i/o ports block to expand its own i/o ports. by setting up the csiop space, the ports on the psd are mapped into the mcu address space. the addresses of the ports are listed in table 6. a port pin can be put into mcu i/o mode by writing a 0 to the corresponding bit in the control regis- ter. the mcu i/o direction may be changed by writing to the corresponding bit in the direction register, or by the output enable product term. see the section entitled peripheral i/o mode, on page 49. when the pin is configured as an output, the content of the data out register drives the pin. when configured as an input, the mcu can read the port input through the data in buffer. see fig- ure 22. ports c and d do not have control registers, and are in mcu i/o mode by default. they can be used for pld i/o if equations are written for them in ps- dabel. pld i/o mode the pld i/o mode uses a port as an input to the cplds input macrocells (imc), and/or as an out- put from the cplds output macrocells (omc). the output can be tri-stated with a control signal. this output enable control signal can be defined by a product term from the pld, or by resetting the corresponding bit in the direction register to 0. the corresponding bit in the direction register must not be set to 1 if the pin is defined for a pld input signal in psdabel. the pld i/o mode is specified in psdabel by declaring the port pins, and then writing an equation assigning the pld i/ o to a port. address out mode for mcus with a multiplexed address/data bus, address out mode can be used to drive latched addresses on to the port pins. these port pins can, in turn, drive external devices. either the output enable or the corresponding bits of both the direc- tion register and control register must be set to a 1 for pins to use address out mode. this must be done by the mcu at run-time. see table 20 for the address output pin assignments on ports a and b for various mcus. for non-multiplexed 8-bit bus mode, address sig- nals (a7-a0) are available to port b in address out mode. note: do not drive address signals with address out mode to an external memory device if it is in- tended for the mcu to boot from the external de- vice. the mcu must first boot from psd memory so the direction and control register bits can be set. psd834f2v 48/95 table 18. port operating modes note: 1. can be multiplexed with other i/o functions. table 19. port operating mode settings note: 1. n/a = not applicable 2. the direction of the port a,b,c, and d pins are controlled by the direction register ored with the individual output enable product term (.oe) from the cpld and array. 3. any of these three methods enables the jtag pins on port c. port mode port a port b port c port d mcu i/o yes yes yes yes pld i/o mcellab outputs mcellbc outputs additional ext. cs outputs pld inputs yes no no yes ye s ye s no ye s no yes no yes no no yes yes address out yes (a7 C 0) yes (a7 C 0) or (a15 C 8) no no address in yes yes yes yes data port yes (d7 C 0) no no no peripheral i/o yes no no no jtag isp no no yes 1 no mode defined in psdabel defined in psd configuration control register setting direction register setting vm register setting jtag enable mcu i/o declare pins only n/a 1 0 1 = output, 0 = input (note 2 ) n/a n/a pld i/o logic equations n/a n/a (note 2 ) n/a n/a data port (port a) n/a specify bus type n/a n/a n/a n/a address out (port a,b) declare pins only n/a 1 1 (note 2 ) n/a n/a address in (port a,b,c,d) logic for equation input macrocells n/a n/a n/a n/a n/a peripheral i/o (port a) logic equations (psel0 & 1) n/a n/a n/a pio bit = 1 n/a jtag isp (note 3 ) jtagsel jtag configuration n/a n/a n/a jtag_enable 49/95 psd834f2v table 20. i/o port latched address output assignments note: 1. n/a = not applicable. address in mode for mcus that have more than 16 address sig- nals, the higher addresses can be connected to port a, b, c, and d. the address input can be latched in the input macrocell (imc) by address strobe (ale/as, pd0). any input that is included in the dpld equations for the sram, or primary or secondary flash memory is considered to be an address input. data port mode port a can be used as a data bus port for a mcu with a non-multiplexed address/data bus. the data port is connected to the data bus of the mcu. the general i/o functions are disabled in port a if the port is configured as a data port. peripheral i/o mode peripheral i/o mode can be used to interface with external peripherals. in this mode, all of port a serves as a tri-state, bi-directional data buffer for the mcu. peripheral i/o mode is enabled by set- ting bit 7 of the vm register to a 1. figure 23 shows how port a acts as a bi-directional buffer for the mcu data bus if peripheral i/o mode is en- abled. an equation for psel0 and/or psel1 must be written in psdabel. the buffer is tri-stated when psel0 or psel1 is not active. jtag in-system programming (isp) port c is jtag compliant, and can be used for in- system programming (isp). you can multiplex jtag operations with other functions on port c because in-system programming (isp) is not per- formed in normal operating mode. for more infor- mation on the jtag port, see the section entitled programming in-circuit using the jtag serial interface, on page 63. figure 23. peripheral i/o mode mcu port a (pa3-pa0) port a (pa7-pa4) port b (pb3-pb0) port b (pb7-pb4) 8051xa (8-bit) n/a 1 address a7-a4 address a11-a8 n/a 80c251 (page mode) n/a n/a address a11-a8 address a15-a12 all other 8-bit multiplexed address a3-a0 address a7-a4 address a3-a0 address a7-a4 8-bit non-multiplexed bus n/a n/a address a3-a0 address a7-a4 rd psel0 psel1 psel vm register bit 7 wr pa0 - pa7 d0-d7 data bus ai02886 psd834f2v 50/95 port configuration registers (pcr) each port has a set of port configuration regis- ters (pcr) used for configuration. the contents of the registers can be accessed by the mcu through normal read/write bus cycles at the addresses given in table 6. the addresses in table 6 are the offsets in hexadecimal from the base of the csiop register. the pins of a port are individually configurable and each bit in the register controls its respective pin. for example, bit 0 in a register refers to bit 0 of its port. the three port configuration registers (pcr), shown in table 21, are used for setting the port configurations. the default power-up state for each register in table 21 is 00h. control register. any bit reset to '0' in the con- trol register sets the corresponding port pin to mcu i/o mode, and a 1 sets it to address out mode. the default mode is mcu i/o. only ports a and b have an associated control register. direction register. the direction register, in conjunction with the output enable (except for port d), controls the direction of data flow in the i/o ports. any bit set to '1' in the direction register causes the corresponding pin to be an output, and any bit set to '0' causes it to be an input. the de- fault mode for all port pins is input. figure 24 and figure 25 show the port architec- ture diagrams for ports a/b and c, respectively. the direction of data flow for ports a, b, and c are controlled not only by the direction register, but also by the output enable product term from the pld and array. if the output enable product term is not active, the direction register has sole con- trol of a given pins direction. an example of a configuration for a port with the three least significant bits set to output and the re- mainder set to input is shown in table 24. since port d only contains three pins (shown in figure 27), the direction register for port d has only the three least significant bits active. drive select register. the drive select register configures the pin driver as open drain or cmos for some port pins, and controls the slew rate for the other port pins. an external pull-up resistor should be used for pins configured as open drain. a pin can be configured as open drain if its corre- sponding bit in the drive select register is set to a 1. the default pin drive is cmos. note that the slew rate is a measurement of the rise and fall times of an output. a higher slew rate means a faster output response and may create more electrical noise. a pin operates in a high slew rate when the corresponding bit in the drive reg- ister is set to '1.' the default rate is slow slew. table 25 shows the drive register for ports a, b, c, and d. it summarizes which pins can be config- ured as open drain outputs and which pins the slew rate can be set for. table 21. port configuration registers (pcr) note: 1. see table 25 for drive register bit definition. table 22. port pin direction control, output enable p.t. not defined table 23. port pin direction control, output enable p.t. defined table 24. port direction assignment example register name port mcu access control a,b write/read direction a,b,c,d write/read drive select 1 a,b,c,d write/read direction register bit port pin mode 0 input 1 output direction register bit output enable p. t. port pin mode 0 0 input 0 1 output 1 0 output 1 1 output bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 0 0 0 0 1 1 1 51/95 psd834f2v table 25. drive register pin assignment note: 1. na = not applicable. port data registers the port data registers, shown in table 26, are used by the mcu to write data to or read data from the ports. table 26 shows the register name, the ports having each register type, and mcu access for each register type. the registers are described below. data in. port pins are connected directly to the data in buffer. in mcu i/o input mode, the pin in- put is read through the data in buffer. data out register. stores output data written by the mcu in the mcu i/o output mode. the con- tents of the register are driven out to the pins if the direction register or the output enable product term is set to 1. the contents of the register can also be read back by the mcu. output macrocells (omc). the cpld output macrocells (omc) occupy a location in the mcus address space. the mcu can read the output of the output macrocells (omc). if the omc mask register bits are not set, writing to the macrocell loads data to the macrocell flip-flops. see the sec- tion entitled plds, on page 27. omc mask register. each omc mask register bit corresponds to an output macrocell (omc) flip- flop. when the omc mask register bit is set to a '1,' loading data into the output macrocell (omc) flip-flop is blocked. the default value is 0 or un- blocked. input macrocells (imc). the input macrocells (imc) can be used to latch or store external inputs. the outputs of the input macrocells (imc) are rout- ed to the pld input bus, and can be read by the mcu. see the section entitled plds, on page 27. enable out. the enable out register can be read by the mcu. it contains the output enable values for a given port. a 1 indicates the driver is in output mode. a 0 indicates the driver is in tri-state and the pin is in input mode. table 26. port data registers drive register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 port a open drain open drain open drain open drain slew rate slew rate slew rate slew rate port b open drain open drain open drain open drain slew rate slew rate slew rate slew rate port c open drain open drain open drain open drain open drain open drain open drain open drain port d na 1 na 1 na 1 na 1 na 1 slew rate slew rate slew rate register name port mcu access data in a,b,c,d read C input on pin data out a,b,c,d write/read output macrocell a,b,c read C outputs of macrocells write C loading macrocells flip-flop mask macrocell a,b,c write/read C prevents loading into a given macrocell input macrocell a,b,c read C outputs of the input macrocells enable out a,b,c read C the output enable control of the port driver psd834f2v 52/95 ports a and b C functionality and structure ports a and b have similar functionality and struc- ture, as shown in figure 24. the two ports can be configured to perform one or more of the following functions: n mcu i/o mode n cpld output C macrocells mcellab7-mcellab0 can be connected to port a or port b. mcellbc7- mcellbc0 can be connected to port b or port c. n cpld input C via the input macrocells (imc). n latched address output C provide latched address output as per table 20. n address in C additional high address inputs using the input macrocells (imc). n open drain/slew rate C pins pa3-pa0 and pb3-pb0 can be configured to fast slew rate, pins pa7-pa4 and pb7-pb4 can be configured to open drain mode. n data port C port a to d7-d0 for 8-bit, non- multiplexed bus n multiplexed address/data port for certain types of mcu bus interfaces. n peripheral mode C port a only figure 24. port a and port b structure internal data bus data out reg. dq d g q dq dq wr wr wr address macrocell outputs enable product term ( .oe ) ale read mux p d b cpld - input control reg. dir reg. input macrocell enable out data in output select output mux port a or b pin data out address a [ 7:0 ] or a [ 15:8 ] ai02887 53/95 psd834f2v port c C functionality and structure port c can be configured to perform one or more of the following functions (see figure 25): n mcu i/o mode n cpld output C mcellbc7-mcellbc0 outputs can be connected to port b or port c. n cpld input C via the input macrocells (imc) n address in C additional high address inputs using the input macrocells (imc). n in-system programming (isp) C jtag port can be enabled for programming/erase of the psd device. (see the section entitled programming in-circuit using the jtag serial interface, on page 63, for more information on jtag programming.) n open drain C port c pins can be configured in open drain mode n battery backup features C pc2 can be configured for a battery input supply, voltage stand-by (vstby). pc4 can be configured as a battery-on indicator (vbaton), indicating when v cc is less than v bat . port c does not support address out mode, and therefore no control register is required. pin pc7 may be configured as the dbe input in certain mcu bus interfaces. figure 25. port c structure internal data bus data out reg. dq dq wr wr mcellbc [ 7:0 ] enable product term ( .oe ) read mux p d b cpld - input dir reg. input macrocell enable out special function 1 special function 1 configuration bit data in output select output mux port c pin data out ai02888b psd834f2v 54/95 port d C functionality and structure port d has three i/o pins. see figure 26 and fig- ure 27. this port does not support address out mode, and therefore no control register is re- quired. port d can be configured to perform one or more of the following functions: n mcu i/o mode n cpld output C external chip select (ecs0- ecs2) n cpld input C direct input to the cpld, no input macrocells (imc) n slew rate C pins can be set up for fast slew rate port d pins can be configured in psdsoft express as input pins for other dedicated functions: n address strobe (ale/as, pd0) n clkin (pd1) as input to the macrocells flip- flops and apd counter n psd chip select input (csi , pd2). driving this signal high disables the flash memory, sram and csiop. figure 26. port d structure internal data bus data out reg. dq dq wr wr ecs [ 2: 0 ] read mux p d b cpld - input dir reg. data in enable product term (.oe) output select output mux port d pin data out ai02889 55/95 psd834f2v external chip select the cpld also provides three external chip se- lect (ecs0-ecs2) outputs on port d pins that can be used to select external devices. each external chip select (ecs0-ecs2) consists of one product term that can be configured active high or low. the output enable of the pin is controlled by either the output enable product term or the direction register. (see figure 27.) figure 27. port d external chip select signals pld input bus polarity bit pd2 pin pt2 ecs2 direction register polarity bit pd1 pin pt1 ecs1 enable (.oe) enable (.oe) direction register polarity bit pd0 pin pt0 ecs0 enable (.oe) direction register cpld and array ai02890 psd834f2v 56/95 power management all psd devices offer configurable power saving options. these options may be used individually or in combinations, as follows: n all memory blocks in a psd (primary and secondary flash memory, and sram) are built with power management technology. in addition to using special silicon design methodology, power management technology puts the memories into standby mode when address/ data inputs are not changing (zero dc current). as soon as a transition occurs on an input, the affected memory wakes up, changes and latches its outputs, then goes back to standby. the designer does not have to do anything special to achieve memory standby mode when no inputs are changingit happens automatically. the pld sections can also achieve stand-by mode when its inputs are not changing, as described in the sections on the power management mode registers (pmmr). n as with the power management mode, the automatic power down (apd) block allows the psd to reduce to stand-by current automatically. the apd unit can also block mcu address/data signals from reaching the memories and plds. this feature is available on all the devices of the psd family. the apd unit is described in more detail in the sections entitled automatic power-down (apd) unit and power-down mode, on page 57. built in logic monitors the address strobe of the mcu for activity. if there is no activity for a certain time period (mcu is asleep), the apd unit initiates power-down mode (if enabled). once in power-down mode, all address/data signals are blocked from reaching psd memory and plds, and the memories are deselected internally. this allows the memory and plds to remain in standby mode even if the address/ data signals are changing state externally (noise, other devices on the mcu bus, etc.). keep in mind that any unblocked pld input signals that are changing states keeps the pld out of stand-by mode, but not the memories. n psd chip select input (csi , pd2) can be used to disable the internal memories, placing them in standby mode even if inputs are changing. this feature does not block any internal signals or disable the plds. this is a good alternative to using the apd unit. there is a slight penalty in memory access time when psd chip select input (csi , pd2) makes its initial transition from deselected to selected. n the pmmrs can be written by the mcu at run- time to manage power. all psd supports blocking bits in these registers that are set to block designated signals from reaching both plds. current consumption of the plds is directly related to the composite frequency of the changes on their inputs (see figure 31). significant power savings can be achieved by blocking signals that are not used in dpld or cpld logic equations. psd devices have a turbo bit in pmmr0. this bit can be set to turn the turbo mode off (the default is with turbo mode turned on). while turbo mode is off, the plds can achieve standby current when no pld inputs are changing (zero dc current). even when inputs do change, significant power can be saved at lower frequencies (ac current), compared to when turbo mode is on. when the turbo mode is on, there is a significant dc current component and the ac component is higher. 57/95 psd834f2v automatic power-down (apd) unit and power- down mode. the apd unit, shown in figure 28, puts the psd into power-down mode by monitor- ing the activity of address strobe (ale/as, pd0). if the apd unit is enabled, as soon as activity on address strobe (ale/as, pd0) stops, a 4-bit counter starts counting. if address strobe (ale/ as, pd0) remains inactive for fifteen clock periods of clkin (pd1), power-down (pdn) goes high, and the psd enters power-down mode, as dis- cussed next. power-down mode. by default, if you enable the apd unit, power-down mode is automatically en- abled. the device enters power-down mode if ad- dress strobe (ale/as, pd0) remains inactive for fifteen periods of clkin (pd1). the following should be kept in mind when the psd is in power-down mode: n if address strobe (ale/as, pd0) starts pulsing again, the psd returns to normal operating mode. the psd also returns to normal operating mode if either psd chip select input (csi , pd2) is low or the reset (reset ) input is high. n the mcu address/data bus is blocked from all memory and plds. n various signals can be blocked (prior to power- down mode) from entering the plds by setting the appropriate bits in the pmmr registers. the blocked signals include mcu control signals and the common clkin (pd1). note that blocking clkin (pd1) from the plds does not block clkin (pd1) from the apd unit. n all psd memories enter standby mode and are drawing standby current. however, the pld and i/o ports blocks do not go into standby mode because you dont want to have to wait for the logic and i/o to wake-up before their outputs can change. see table 27 for power-down mode effects on psd ports. n typical standby current is of the order of microamperes. these standby current values assume that there are no transitions on any pld input. table 27. power-down modes effect on ports figure 28. apd unit table 28. psd timing and stand-by current during power-down mode note: 1. power-down does not affect the operation of the pld. the pld operation in this mode is based only on the turbo bit. 2. typical current consumption assuming no pld inputs are changing state and the pld turbo bit is '0.' port function pin level mcu i/o no change pld out no change address out undefined data port tri-state peripheral i/o tri-state mode pld propagation delay memory access time access recovery time to normal access typical stand-by current power-down normal t pd (note 1 ) no access t lvdv 25a (note 2 ) apd en pmmr0 bit 1=1 ale reset csi clkin transition detection edge detect apd counter power down ( pdn ) disable bus interface eeprom select flash select sram select pd clr pd disable flash/eeprom/sram pld select ai02891 psd834f2v 58/95 for users of the hc11 (or compatible). the hc11 turns off its e clock when it sleeps. there- fore, if you are using an hc11 (or compatible) in your design, and you wish to use the power-down mode, you must not connect the e clock to clkin (pd1). you should instead connect a crystal oscil- lator to clkin (pd1). the crystal oscillator fre- quency must be less than 15 times the frequency of as. the reason for this is that if the frequency is greater than 15 times the frequency of as, the psd keeps going into power-down mode. other power saving options. the psd offers other reduced power saving options that are inde- pendent of the power-down mode. except for the sram stand-by and psd chip select input (csi , pd2) features, they are enabled by setting bits in pmmr0 and pmmr2. figure 29. enable power-down flow chart enable apd set pmmr0 bit 1 = 1 psd in power down mode ale/as idle for 15 clkin clocks? reset yes no optional disable desired inputs to pld by setting pmmr0 bits 4 and 5 and pmmr2 bits 2 through 6. ai02892 59/95 psd834f2v pld power management the power and speed of the plds are controlled by the turbo bit (bit 3) in pmmr0. by setting the bit to '1,' the turbo mode is off and the plds con- sume the specified stand-by current when the in- puts are not switching for an extended time of 70ns. the propagation delay time is increased by 10ns after the turbo bit is set to '1' (turned off) when the inputs change at a composite frequency of less than 15 mhz. when the turbo bit is reset to '0' (turned on), the plds run at full power and speed. the turbo bit affects the plds dc power, ac power, and propagation delay. blocking mcu control signals with the bits of pmmr2 can further reduce pld ac power con- sumption. table 29. power management mode registers pmmr0 (note 1) table 30. power management mode registers pmmr2 (note 1) note: 1. the bits of this register are cleared to zero following power-up. subsequent reset (reset ) pulses do not clear the registers. bit 0 x 0 not used, and should be set to zero. bit 1 apd enable 0 = off automatic power-down (apd) is disabled. 1 = on automatic power-down (apd) is enabled. bit 2 x 0 not used, and should be set to zero. bit 3 pld turbo 0 = on pld turbo mode is on 1 = off pld turbo mode is off, saving power. bit 4 pld array clk 0 = on clkin (pd1) input to the pld and array is connected. every change of clkin (pd1) powers-up the pld when turbo bit is 0. 1 = off clkin (pd1) input to pld and array is disconnected, saving power. bit 5 pld mcell clk 0 = on clkin (pd1) input to the pld macrocells is connected. 1 = off clkin (pd1) input to pld macrocells is disconnected, saving power. bit 6 x 0 not used, and should be set to zero. bit 7 x 0 not used, and should be set to zero. bit 0 x 0 not used, and should be set to zero. bit 1 x 0 not used, and should be set to zero. bit 2 pld array cntl0 0 = on cntl0 input to the pld and array is connected. 1 = off cntl0 input to pld and array is disconnected, saving power. bit 3 pld array cntl1 0 = on cntl1 input to the pld and array is connected. 1 = off cntl1 input to pld and array is disconnected, saving power. bit 4 pld array cntl2 0 = on cntl2 input to the pld and array is connected. 1 = off cntl2 input to pld and array is disconnected, saving power. bit 5 pld array ale 0 = on ale input to the pld and array is connected. 1 = off ale input to pld and array is disconnected, saving power. bit 6 pld array dbe 0 = on dbe input to the pld and array is connected. 1 = off dbe input to pld and array is disconnected, saving power. bit 7 x 0 not used, and should be set to zero. psd834f2v 60/95 sram standby mode (battery backup). the psd supports a battery backup mode in which the contents of the sram are retained in the event of a power loss. the sram has voltage stand-by (vstby, pc2) that can be connected to an exter- nal battery. when v cc becomes lower than v stby then the psd automatically connects to voltage stand-by (vstby, pc2) as a power source to the sram. the sram standby current (i stby ) is typ- ically 0.5a. the sram data retention voltage is 2 v minimum. the battery-on indicator (vbaton) can be routed to pc4. this signal indicates when the v cc has dropped below v stby . psd chip select input (csi , pd2) pd2 of port d can be configured in psdsoft ex- press as psd chip select input (csi ). when low, the signal selects and enables the internal flash memory, eeprom, sram, and i/o blocks for read or write operations involving the psd. a high on psd chip select input (csi , pd2) dis- ables the flash memory, eeprom, and sram, and reduces the psd power consumption. how- ever, the pld and i/o signals remain operational when psd chip select input (csi , pd2) is high. there may be a timing penalty when using psd chip select input (csi , pd2) depending on the speed grade of the psd that you are using. see the timing parameter t slqv in table 50. input clock the psd provides the option to turn off clkin (pd1) to the pld to save ac power consumption. clkin (pd1) is an input to the pld and array and the output macrocells (omc). during power-down mode, or, if clkin (pd1) is not being used as part of the pld logic equation, the clock should be disabled to save ac power. clkin (pd1) is disconnected from the pld and array or the macrocells block by setting bits 4 or 5 to a '1' in pmmr0. input control signals the psd provides the option to turn off the input control signals (cntl0, cntl1, cntl2, address strobe (ale/as, pd0) and dbe) to the pld to save ac power consumption. these control sig- nals are inputs to the pld and array. during power-down mode, or, if any of them are not being used as part of the pld logic equation, these con- trol signals should be disabled to save ac power. they are disconnected from the pld and array by setting bits 2, 3, 4, 5, and 6 to a 1 in pmmr2. table 31. apd counter operation apd enable bit ale pd polarity ale level apd counter 0 x x not counting 1 x pulsing not counting 1 1 1 counting (generates pdn after 15 clocks) 1 0 0 counting (generates pdn after 15 clocks) 61/95 psd834f2v reset timing and device status at reset upon power-up, the psd requires a reset (re- set ) pulse of duration t nlnh-po after v cc is steady. during this period, the device loads inter- nal configurations, clears some of the registers and sets the flash memory into operating mode. after the rising edge of reset (reset ), the psd remains in the reset mode for an additional peri- od, t opr , before the first memory access is al- lowed. the flash memory is reset to the read mode upon power-up. sector select (fs0-fs7 and csboot0-csboot3) must all be low, write strobe (wr , cntl0) high, during power on re- set for maximum security of the data contents and to remove the possibility of a byte being written on the first edge of write strobe (wr , cntl0). any flash memory write cycle initiation is prevented automatically when v cc is below v lko . warm reset once the device is up and running, the device can be reset with a pulse of a much shorter duration, t nlnh . the same t opr period is needed before the device is operational after warm reset. figure 30 shows the timing of the power-up and warm reset. i/o pin, register and pld status at reset table 32 shows the i/o pin, register and pld sta- tus during power on reset, warm reset and pow- er-down mode. pld outputs are always valid during warm reset, and they are valid in power on reset once the internal psd configuration bits are loaded. this loading of psd is completed typically long before the v cc ramps up to operating level. once the pld is active, the state of the outputs are determined by the psdabel equations. reset of flash memory erase and program cycles a reset (reset ) also resets the internal flash memory state machine. during a flash memory program or erase cycle, reset (reset ) termi- nates the cycle and returns the flash memory to the read mode within a period of t nlnh-a . figure 30. reset (reset ) timing t nlnh-po t opr ai02866b reset t nlnh t nlnh-a t opr v cc v cc (min) power-on reset warm reset psd834f2v 62/95 table 32. status during power-on reset, warm reset and power-down mode note: 1. the sr_cod and periphmode bits in the vm register are always cleared to 0 on power-on reset or warm reset. port configuration power-on reset warm reset power-down mode mcu i/o input mode input mode unchanged pld output valid after internal psd configuration bits are loaded valid depends on inputs to pld (addresses are blocked in pd mode) address out tri-stated tri-stated not defined data port tri-stated tri-stated tri-stated peripheral i/o tri-stated tri-stated tri-stated register power-on reset warm reset power-down mode pmmr0 and pmmr2 cleared to 0 unchanged unchanged macrocells flip-flop status cleared to 0 by internal power-on reset depends on .re and .pr equations depends on .re and .pr equations vm register 1 initialized, based on the selection in psdsoft configuration menu initialized, based on the selection in psdsoft configuration menu unchanged all other registers cleared to 0 cleared to 0 unchanged 63/95 psd834f2v programming in-circuit using the jtag serial interface the jtag serial interface block can be enabled on port c (see table 33). all memory blocks (pri- mary and secondary flash memory), pld logic, and psd configuration register bits may be pro- grammed through the jtag serial interface block. a blank device can be mounted on a printed circuit board and programmed using jtag. the standard jtag signals (i eee 1149.1) are tms, tck, tdi, and tdo. two additional signals, tstat and terr , are optional jtag extensions used to speed up program and erase cycles. by default, on a blank psd (as shipped from the factory or after erasure), four pins on port c are enabled for the basic jtag signals tms, tck, tdi, and tdo . see application note an1153 for more details on jtag in-system programming (isp). standard jtag signals the standard jtag signals (tms, tck, tdi, and tdo) can be enabled by any of three different con- ditions that are logically ored. when enabled, tdi, tdo, tck, and tms are inputs, waiting for a jtag serial command from an external jtag con- troller device (such as flashlink or automated test equipment). when the enabling command is received, tdo becomes an output and the jtag channel is fully functional inside the psd. the same command that enables the jtag channel may optionally enable the two additional jtag sig- nals, tstat and terr . the following symbolic logic equation specifies the conditions enabling the four basic jtag signals (tms, tck, tdi, and tdo) on their respective port c pins. for purposes of discussion, the logic label jtag_on is used. when jtag_on is true, the four pins are enabled for jtag. when jtag_on is false, the four pins can be used for general psd i/o. jtag_on = psdsoft_enabled + /* an nvm configuration bit inside the psd is set by the designer in the psdsoft express configuration utility. this dedicates the pins for jtag at all times (compliant with ieee 1149.1 */ microcontroller_enabled + /* the microcontroller can set a bit at run-time by writing to the psd register, jtag enable. this register is located at address csiop + offset c7h. setting the jtag_enable bit in this register will enable the pins for jtag use. this bit is cleared by a psd reset or the microcontroller. see table 34 for bit definition. */ psd_product_term_enabled; /* a dedicated product term (pt) inside the psd can be used to enable the jtag pins. this pt has the reserved name jtagsel. once defined as a node in psdabel, the designer can write an equation for jtagsel. this method is used when the port c jtag pins are multiplexed with other i/o signals. it is recommended to logically tie the node jtagsel to the jen\ signal on the flashlink cable when multiplexing jtag signals. see application note 1153 for details. */ the state of the psd reset (reset ) signal does not interrupt (or prevent) jtag operations if the jtag pins are dedicated by an nvm configuration bit (via psdsoft express). however, reset (re- set ) will prevent or interrupt jtag operations if the jtag enable register is used to enable the jtag pins. the psd supports jtag in-system-configuration (isc) commands, but not boundary scan. the ps- dsoft express software tool and flashlink jtag programming cable implement the jtag in-sys- tem-configuration (isc) commands. a definition of these jtag in-system-configuration (isc) commands and sequences is defined in a supple- mental document available from st. this docu- ment is needed only as a reference for designers who use a flashlink to program their psd. table 33. jtag port signals port c pin jtag signals description pc0 tms mode select pc1 tck clock pc3 tstat status pc4 terr error flag pc5 tdi serial data in pc6 tdo serial data out psd834f2v 64/95 jtag extensions tstat and terr are two jtag extension signals enabled by an isc_enable command received over the four standard jtag signals (tms, tck, tdi, and tdo). they are used to speed program and erase cycles by indicating status on psd sig- nals instead of having to scan the status out seri- ally using the standard jtag channel. see application note an1153 . terr indicates if an error has occurred when erasing a sector or programming a byte in flash memory. this signal goes low (active) when an error condition occurs, and stays low until an isc_clear command is executed or a chip re- set (reset ) pulse is received after an isc_disable command. tstat behaves the same as ready/busy de- scribed in the section entitled ready/busy (pc3), on page 15. tstat is high when the psd device is in read mode (primary and secondary flash memory contents can be read). tstat is low when flash memory program or erase cycles are in progress, and also when data is being written to the secondary flash memory. tstat and terr can be configured as open- drain type signals during an isc_enable com- mand. this facilitates a wired-or connection of tstat signals from multiple psd devices and a wired-or connection of terr signals from those same devices. this is useful when several psd devices are chained together in a jtag environ- ment. security and flash memory protection when the security bit is set, the device cannot be read on a device programmer or through the jtag port. when using the jtag port, only a full chip erase command is allowed. all other program, erase and verify commands are blocked. full chip erase returns the part to a non-secured blank state. the security bit can be set in psdsoft express configuration. all primary and secondary flash memory sectors can individually be sector protected against era- sures. the sector protect bits can be set in psd- soft express configuration. initial delivery state when delivered from st, the psd device has all bits in the memory and plds set to '1.' the psd configuration register bits are set to '0.' the code, configuration, and pld logic are loaded using the programming procedure. information for program- ming the device is available directly from st. please contact your local sales representative. table 34. jtag enable register note: 1. the state of reset (reset ) does not interrupt (or prevent) jtag operations if the jtag signals are dedicated by an nvm configu- ration bit (via psdsoft express). however, reset (reset ) prevents or interrupts jtag operations if the jtag enable register is used to enable the jtag signals. bit 0 jtag_enable 0 = off jtag port is disabled. 1 = on jtag port is enabled. bit 1 x 0 not used, and should be set to zero. bit 2 x 0 not used, and should be set to zero. bit 3 x 0 not used, and should be set to zero. bit 4 x 0 not used, and should be set to zero. bit 5 x 0 not used, and should be set to zero. bit 6 x 0 not used, and should be set to zero. bit 7 x 0 not used, and should be set to zero. 65/95 psd834f2v ac/dc parameters these tables describe the ad and dc parameters of the psd: o dc electrical specification o ac timing specification n pld timing C combinatorial timing C synchronous clock mode C asynchronous clock mode C input macrocell timing n mcu timing C read timing Cwrite timing C peripheral mode timing C power-down and reset timing the following are issues concerning the parame- ters presented: n in the dc specification the supply current is given for different modes of operation. before calculating the total power consumption, determine the percentage of time that the psd is in each mode. also, the supply power is considerably different if the turbo bit is '0.' n the ac power component gives the pld, flash memory, and sram ma/mhz specification. figure 31 shows the pld ma/mhz as a function of the number of product terms (pt) used. n in the pld timing parameters, add the required delay when turbo bit is '0.' figure 31. pld i cc /frequency consumption 0 10 20 30 40 50 60 v cc = 3v 01015 5 20 25 i cc C (ma) turbo on (100%) turbo on (25%) turbo off turbo off highest composite frequency at pld inputs (mhz) pt 100% pt 25% ai03100 psd834f2v 66/95 table 35. example of psd typical power calculation at v cc = 3.3 v (with turbo mode on) conditions highest composite pld input frequency (freq pld) = 8 mhz mcu ale frequency (freq ale) = 4 mhz % flash memory access = 80% % sram access = 15% % i/o access = 5% (no additional power above base) operational modes % normal = 10% % power-down mode = 90% number of product terms used (from fitter report) = 45 pt % of total product terms = 45/182 = 24.7% turbo mode = on calculation (using typical values) i cc total = ipwrdown x %pwrdown + %normal x (i cc (ac) + i cc (dc)) = ipwrdown x %pwrdown + % normal x (%flash x 1.5 ma/mhz x freq ale + %sram x 0.8 ma/mhz x freq ale + % pld x 1 ma/mhz x freq pld + #pt x 200 a/pt) = 25 a x 0.90 + 0.1 x (0.8 x 1.5 ma/mhz x 4 mhz + 0.15 x 0.8 ma/mhz x 4 mhz + 1 ma/mhz x 8 mhz + 45 x 0.2 ma/pt) = 22.5 a + 0.1 x (4.8 + 0.48 + 8 + 9 ma) = 22.5 a + 0.1 x 22.28 ma = 22.5 a + 2.228 ma = 2.25 ma this is the operating power with no write or flash memory erase cycles in progress. calculation is based on i out = 0 ma. 67/95 psd834f2v table 36. example of psd typical power calculation at v cc = 3.3 v (with turbo mode off) conditions highest composite pld input frequency (freq pld) = 8 mhz mcu ale frequency (freq ale) = 4 mhz % flash memory access = 80% % sram access = 15% % i/o access = 5% (no additional power above base) operational modes % normal = 10% % power-down mode = 90% number of product terms used (from fitter report) = 45 pt % of total product terms = 45/182 = 24.7% turbo mode = off calculation (using typical values) i cc total = ipwrdown x %pwrdown + %normal x (i cc (ac) + i cc (dc)) = ipwrdown x %pwrdown + % normal x (%flash x 1.5 ma/mhz x freq ale + %sram x 0.8 ma/mhz x freq ale + % pld x (from graph using freq pld)) = 25 a x 0.90 + 0.1 x (0.8 x 1.5 ma/mhz x 4 mhz + 0.15 x 0.8 ma/mhz x 4 mhz + 14 ma) = 22.5 a + 0.1 x (4.8 + 0.48 + 14) ma = 22.5 a + 0.1 x 19.28 ma = 22.5 a + 1.928 ma = 1.95 ma this is the operating power with no write or flash memory erase cycles in progress. calculation is based on i out = 0 ma. psd834f2v 68/95 maximum rating stressing the device above the rating listed in the absolute maximum ratings table may cause per- manent damage to the device. these are stress ratings only and operation of the device at these or any other conditions above those indicated in the operating sections of this specification is not im- plied. exposure to absolute maximum rating con- ditions for extended periods may affect device reliability. refer also to the stmicroelectronics sure program and other relevant quality docu- ments. table 37. absolute maximum ratings note: 1. ipc/jedec j-std-020a 2. jedec std jesd22-a114a (c1=100pf, r1=1500 w , r2=500 w ) symbol parameter min. max. unit t stg storage temperature C65 125 c t lead lead temperature during soldering (20 seconds max.) 1 235 c v io input and output voltage (q = v oh or hi-z) C0.6 7.0 v v cc supply voltage C0.6 7.0 v v pp device programmer supply voltage C0.6 14.0 v v esd electrostatic discharge voltage (human body model) 2 C2000 2000 v 69/95 psd834f2v dc and ac parameters this section summarizes the operating and mea- surement conditions, and the dc and ac charac- teristics of the device. the parameters in the dc and ac characteristic tables that follow are de- rived from tests performed under the measure- ment conditions summarized in the relevant tables. designers should check that the operating conditions in their circuit match the measurement conditions when relying on the quoted parame- ters. table 38. operating conditions table 39. ac measurement conditions note: 1. output hi-z is defined as the point where data out is no longer driven. figure 32. ac measurement i/o waveform figure 33. ac measurement load circuit table 40. capacitance note: 1. sampled only, not 100% tested. 2. typical values are for t a = 25c and nominal supply voltages. symbol parameter min. max. unit v cc supply voltage 3.0 3.6 v t a ambient operating temperature (industrial) C40 85 c ambient operating temperature (commercial) 0 70 c symbol parameter min. max. unit c l load capacitance 30 pf 3.0v 0v test point 1.5v ai03103b device under test 2.01 v 195 w c l = 30 pf (including scope and jig capacitance) ai03104b symbol parameter test condition typ. 2 max. unit c in input capacitance (for input pins) v in = 0v 46 pf c out output capacitance (for input/ output pins) v out = 0v 812 pf c vpp capacitance (for cntl2/v pp )v pp = 0v 18 25 pf psd834f2v 70/95 table 41. ac symbols for pld timing example: t avlx C time from address valid to ale invalid. figure 34. switching waveforms C key signal letters signal behavior a address input t time c ceout output l logic level low or ale d input data h logic level high e e input v valid g internal wdog_on signal x no longer a valid logic level i interrupt input z float l ale input pw pulse width n reset input or output p port signal output q output data rwr , uds , lds , ds , iord, psen inputs s chip select input tr/w input w internal pdn signal b v stby output m output macrocell waveforms inputs outputs steady input may change from hi to lo may change from lo to hi don't care outputs only steady output will be changing from hi to lo will be changing lo to hi changing, state unknown center line is tri-state ai03102 71/95 psd834f2v table 42. dc characteristics note: 1. reset (reset ) has hysteresis. v il1 is valid at or below 0.2v cc C0.1. v ih1 is valid at or above 0.8v cc . 2. csi deselected or internal pd is active. 3. pld is in non-turbo mode, and none of the inputs are switching. 4. please see figure 31 for the pld current calculation. 5. i out = 0 ma symbol parameter conditions min. typ. max. unit v ih high level input voltage 3.0 v < v cc < 3.6 v 0.7v cc v cc +0.5 v v il low level input voltage 3.0 v < v cc < 3.6 v C0.5 0.8 v v ih1 reset high level input voltage (note 1 ) 0.8v cc v cc +0.5 v v il1 reset low level input voltage (note 1 ) C0.5 0.2v cc C0.1 v v hys reset pin hysteresis 0.3 v v lko v cc (min) for flash erase and program 1.5 2.2 v v ol output low voltage i ol = 20 a, v cc = 3.0 v 0.01 0.1 v i ol = 4 ma, v cc = 3.0 v 0.15 0.45 v v oh output high voltage except v stby on i oh = C20 a, v cc = 3.0 v 2.9 2.99 v i oh = C1 ma, v cc = 3.0 v 2.7 2.8 v v oh1 output high voltage v stby on i oh1 = 1 a v stby C 0.8 v v stby sram stand-by voltage 2.0 v cc v i stby sram stand-by current v cc = 0 v 0.5 1 a i idle idle current (vstby input) v cc > v stby C0.1 0.1 a v df sram data retention voltage only on v stby 2v i sb stand-by supply current for power-down mode csi >v cc C0.3 v (notes 2,3 ) 25 100 a i li input leakage current v ss < v in < v cc C1 0.1 1 a i lo output leakage current 0.45 < v in < v cc C10 5 10 a i cc (dc) (note 5 ) operating supply current pld only pld_turbo = off, f = 0 mhz (note 3 ) 0 a/pt pld_turbo = on, f = 0 mhz 200 400 a/pt flash memory during flash memory write/erase only 10 25 ma read only, f = 0 mhz 0 0 ma sram f = 0 mhz 0 0 ma i cc (ac) (note 5 ) pld ac adder note 4 flash memory ac adder 1.5 2.0 ma/ mhz sram ac adder 0.8 1.5 ma/ mhz psd834f2v 72/95 figure 35. input to output disable / enable table 43. cpld combinatorial timing note: 1. fast slew rate output available on pa3-pa0, pb3-pb0, and pd2-pd0. decrement times by given amount. symbol parameter conditions -10 -15 -20 pt aloc turbo off slew rate 1 unit min max min max min max t pd cpld input pin/ feedback to cpld combinatorial output 40 45 50 + 4 + 20 C 6 ns t ea cpld input to cpld output enable 43 45 50 + 20 C 6 ns t er cpld input to cpld output disable 43 45 50 + 20 C 6 ns t arp cpld register clear or preset delay 40 43 48 + 20 C 6 ns t arpw cpld register clear or preset pulse width 25 30 35 + 20 ns t ard cpld array delay any macrocell 25 29 33 + 4 ns ter tea input input to output enable/disable ai02863 73/95 psd834f2v figure 36. synchronous clock mode timing C pld table 44. cpld macrocell synchronous clock mode timing note: 1. fast slew rate output available on pa3-pa0, pb3-pb0, and pd2-pd0. decrement times by given amount. 2. clkin (pd1) t clcl = t ch + t cl . symbol parameter conditions -10 -15 -20 pt aloc turbo off slew rate 1 unit min max min max min max f max maximum frequency external feedback 1/(t s +t co ) 22.2 18.8 15.8 mhz maximum frequency internal feedback (f cnt ) 1/(t s +t co C10) 28.5 23.2 18.8 mhz maximum frequency pipelined data 1/(t ch +t cl ) 40.0 33.3 31.2 mhz t s input setup time 20 25 30 + 4 + 20 ns t h input hold time 0 0 0 ns t ch clock high time clock input 15 15 16 ns t cl clock low time clock input 10 15 16 ns t co clock to output delay clock input 25 28 33 C 6 ns t ard cpld array delay any macrocell 25 29 33 + 4 ns t min minimum clock period 2 t ch +t cl 25 29 32 ns t ch t cl t co t h t s clkin input registered output ai02860 psd834f2v 74/95 figure 37. asynchronous reset / preset figure 38. asynchronous clock mode timing (product term clock) tarp register output tarpw reset/preset input ai02864 tcha tcla tcoa tha tsa clock input registered output ai02859 75/95 psd834f2v table 45. cpld macrocell asynchronous clock mode timing symbol parameter conditions -10 -15 -20 pt aloc turbo off slew rate unit min max min max min max f maxa maximum frequency external feedback 1/(t sa +t coa ) 21.7 19.2 16.9 mhz maximum frequency internal feedback (f cnta ) 1/(t sa +t coa C10) 27.8 23.8 20.4 mhz maximum frequency pipelined data 1/(t cha +t cla ) 33.3 27 24.4 mhz t sa input setup time 10 12 13 + 4 + 20 ns t ha input hold time 12 15 17 ns t cha clock high time 17 22 25 + 20 ns t cla clock low time 13 15 16 + 20 ns t coa clock to output delay 36 40 46 + 20 C 6 ns t ard cpld array delay any macrocell 25 29 33 + 4 ns t mina minimum clock period 1/f cnta 36 42 49 ns psd834f2v 76/95 figure 39. input macrocell timing (product term clock) table 46. input macrocell timing note: 1. inputs from port a, b, and c relative to register/latch clock from the pld. ale latch timings refer to t avlx and t lxax . symbol parameter conditions -10 -15 -20 pt aloc turbo off unit min max min max min max t is input setup time (note 1 ) 000 ns t ih input hold time (note 1 ) 25 25 30 + 20 ns t inh nib input high time (note 1 ) 12 13 15 ns t inl nib input low time (note 1 ) 12 13 15 ns t ino nib input to combinatorial delay (note 1 ) 46 62 70 + 4 + 20 ns t inh t inl t ino t ih t is pt clock input output ai03101 77/95 psd834f2v figure 40. read timing note: 1. t avlx and t lxax are not required for 80c251 in page mode or 80c51xa in burst mode. t avlx t lxax 1 t lvlx t avqv t slqv t rlqv t rhqx trhqz t eltl t ehel t rlrh t theh t avpv address valid address valid data valid data valid address out ale /as a/d multiplexed bus address non-multiplexed bus data non-multiplexed bus csi rd (psen, ds) e r/w ai02895 psd834f2v 78/95 table 47. read timing note: 1. rd timing has the same timing as ds , lds , uds , and psen signals. 2. rd and psen have the same timing for 8031. 3. any input used to select an internal psd function. 4. in multiplexed mode latched address generated from adio delay to address output on any port. 5. rd timing has the same timing as ds , lds , and uds signals. symbol parameter conditions -10 -15 -20 turbo off unit min max min max min max t lvlx ale or as pulse width 26 26 30 ns t avlx address setup time (note 3 ) 91012 ns t lxax address hold time (note 3 ) 91214 ns t avqv address valid to data valid (note 3 ) 100 150 200 + 20 ns t slqv cs valid to data valid 100 150 200 ns t rlqv rd to data valid 8-bit bus (note 5 ) 35 35 40 ns rd or psen to data valid 8-bit bus, 8031, 80251 (note 2 ) 45 50 55 ns t rhqx rd data hold time (note 1 ) 000 ns t rlrh rd pulse width 38 40 45 ns t rhqz rd to data high-z (note 1 ) 38 40 45 ns t ehel e pulse width 40 45 52 ns t theh r/w setup time to enable 15 18 20 ns t eltl r/w hold time after enable 0 0 0 ns t avpv address input valid to address output delay (note 4 ) 33 35 40 ns 79/95 psd834f2v figure 41. write timing t avlx t lxax t lvlx t avwl t slwl t whdx t whax t eltl t ehel t wlmv t wlwh t dvwh t theh t avpv address valid address valid data valid data valid address out t whpv standard mcu i/o out ale/as a/d multiplexed bus address non-multiplexed bus data non-multiplexed bus csi wr (ds) e r/ w ai02896 psd834f2v 80/95 table 48. write timing note: 1. any input used to select an internal psd function. 2. in multiplexed mode, latched address generated from adio delay to address output on any port. 3. wr has the same timing as e, lds , uds , wrl , and wrh signals. 4. assuming data is stable before active write signal. 5. assuming write is active before data becomes valid. 6. twhax2 is the address hold time for dpld inputs that are used to generate sector select signals for internal psd memory. symbol parameter conditions -10 -15 -20 unit min max min max min max t lvlx ale or as pulse width 26 26 30 t avlx address setup time (note 1 ) 91012ns t lxax address hold time (note 1 ) 91214ns t avwl address valid to leading edge of wr (notes 1,3 ) 17 20 25 ns t slwl cs valid to leading edge of wr (note 3 ) 17 20 25 ns t dvwh wr data setup time (note 3 ) 45 45 50 ns t whdx wr data hold time (note 3 ) 7 8 10 ns t wlwh wr pulse width (note 3 ) 46 48 53 ns t whax1 trailing edge of wr to address invalid (note 3 ) 10 12 17 ns t whax2 trailing edge of wr to dpld address invalid (note 3,6 ) 000ns t whpv trailing edge of wr to port output valid using i/o port data register (note 3 ) 33 35 40 ns t dvmv data valid to port output valid using macrocell register preset/clear (notes 3,5 ) 70 70 80 ns t avpv address input valid to address output delay (note 2 ) 33 35 40 ns t wlmv wr valid to port output valid using macrocell register preset/clear (notes 3,4 ) 70 70 80 ns 81/95 psd834f2v table 49. program, write and erase times note: 1. programmed to all zero before erase. 2. the polling status, dq7, is valid tq7vqv time units before the data byte, dq0-dq7, is valid for reading. symbol parameter min. typ. max. unit flash program 8.5 s flash bulk erase 1 (pre-programmed) 330s flash bulk erase (not pre-programmed) 5 s t whqv3 sector erase (pre-programmed) 1 30 s t whqv2 sector erase (not pre-programmed) 2.2 s t whqv1 byte program 14 1200 s program / erase cycles (per sector) 100,000 cycles t whwlo sector erase time-out 100 s t q7vqv dq7 valid to output (dq7-dq0) valid (data polling) 2 30 ns psd834f2v 82/95 figure 42. peripheral i/o read timing table 50. port a peripheral data mode read timing symbol parameter conditions -10 -15 -20 turbo off unit min max min max min max t avqvCpa address valid to data valid (note 3 ) 50 50 50 + 20 ns t slqvCpa csi valid to data valid 37 45 50 + 20 ns t rlqvCpa rd to data valid (notes 1,4 ) 37 40 45 ns rd to data valid 8031 mode 45 45 50 ns t dvqvCpa data in to data out valid 38 40 45 ns t qxrhCpa rd data hold time 0 0 0 ns t rlrhCpa rd pulse width (note 1 ) 36 36 46 ns t rhqzCpa rd to data high-z (note 1 ) 36 40 45 ns t qxrh ( pa) t rlqv ( pa) t rlrh ( pa) t dvqv ( pa) t rhqz ( pa) t slqv ( pa) t avqv ( pa) address data valid ale /as a /d bus rd data on port a csi ai02897 83/95 psd834f2v figure 43. peripheral i/o write timing table 51. port a peripheral data mode write timing note: 1. rd has the same timing as ds , lds , uds , and psen (in 8031 combined mode). 2. wr has the same timing as the e, lds , uds , wrl, and wrh signals. 3. any input used to select port a data peripheral mode. 4. data is already stable on port a. 5. data stable on adio pins to data on port a. symbol parameter conditions -10 -15 -20 unit min max min max min max t wlqvCpa wr to data propagation delay (note 2 ) 42 45 55 ns t dvqvCpa data to port a data propagation delay (note 5 ) 38 40 45 ns t whqzCpa wr invalid to port a tri-state (note 2 ) 33 33 35 ns tdvqv (pa) twlqv (pa) twhqz (pa) address data out a /d bus wr port a data out ale /as ai02898 psd834f2v 84/95 figure 44. reset (reset ) timing table 52. reset (reset ) timing note: 1. reset (reset ) does not reset flash memory program or erase cycles. 2. warm reset aborts flash memory program or erase cycles, and puts the device in read mode. table 53. v stbyon timing note: 1. v stbyon timing is measured at v cc ramp rate of 2 ms. table 54. power-down timing note: 1. t clcl is the period of clkin (pd1). symbol parameter conditions min max unit t nlnh reset active low time 1 300 ns t nlnhCpo power on reset active low time 1 ms t nlnhCa warm reset 2 25 m s t opr reset high to operational device 300 ns symbol parameter conditions min typ max unit t bvbh v stby detection to v stbyon output high (note 1 ) 20 s t bxbl v stby off detection to v stbyon output low (note 1 ) 20 s symbol parameter conditions -10 -15 -20 unit min max min max min max t lvdv ale access time from power-down 145 150 200 ns t clwh maximum delay from apd enable to internal pdn valid signal using clkin (pd1) 15 * t clcl 1 s t nlnh-po t opr ai02866b reset t nlnh t nlnh-a t opr v cc v cc (min) power-on reset warm reset 85/95 psd834f2v figure 45. isc timing table 55. isc timing note: 1. for non-pld programming, erase or in isc by-pass mode. 2. for program or erase pld only. symbol parameter conditions -10 -15 -20 unit min max min max min max t isccf clock (tck, pc1) frequency (except for pld) (note 1 ) 12 10 9 mhz t iscch clock (tck, pc1) high time (except for pld) (note 1 ) 40 45 51 ns t isccl clock (tck, pc1) low time (except for pld) (note 1 ) 40 45 51 ns t isccfp clock (tck, pc1) frequency (pld only) (note 2 ) 2 2 2 mhz t iscchp clock (tck, pc1) high time (pld only) (note 2 ) 240 240 240 ns t iscclp clock (tck, pc1) low time (pld only) (note 2 ) 240 240 240 ns t iscpsu isc port set up time 12 13 15 ns t iscph isc port hold up time 5 5 5 ns t iscpco isc port clock to output 30 36 40 ns t iscpzv isc port high-impedance to valid output 30 36 40 ns t iscpvz isc port valid output to high-impedance 30 36 40 ns iscch tck tdi/tms isc outputs/tdo isc outputs/tdo t isccl t iscph t iscpsu t iscpvz t iscpzv t iscpco t ai02865 psd834f2v 86/95 package mechanical figure 46. pqfp52 connections 39 ad15 38 ad14 37 ad13 36 ad12 35 ad11 34 ad10 33 ad9 32 ad8 31 v cc 30 ad7 29 ad6 28 ad5 27 ad4 pd2 pd1 pd0 pc7 pc6 pc5 pc4 v cc gnd pc3 pc2 pc1 pc0 1 2 3 4 5 6 7 8 9 10 11 12 13 52 51 50 49 48 47 46 45 44 43 42 41 40 pb0 pb1 pb2 pb3 pb4 pb5 gnd pb6 pb7 cntl1 cntl2 reset cntlo 14 15 16 17 18 19 20 21 22 23 24 25 26 pa7 pa6 pa5 pa4 pa3 gnd pa2 pa1 pa0 ad0 ad1 ad2 ad3 ai02858 87/95 psd834f2v figure 47. plcc52 connections pb0 pb1 pb2 pb3 pb4 pb5 gnd pb6 pb7 cntl1 cntl2 reset cntl0 pa7 pa6 pa5 pa4 pa3 gnd pa2 pa1 pa0 ad0 ad1 ad2 ad3 ad15 ad14 ad13 ad12 ad11 ad10 ad9 ad8 v cc ad7 ad6 ad5 ad4 pd2 pd1 pd0 pc7 pc6 pc5 pc4 v cc gnd pc3 pc2 pc1 pc0 8 9 10 11 12 13 14 15 16 17 18 19 20 46 45 44 43 42 41 40 39 38 37 36 35 34 21 22 23 24 25 26 27 28 29 30 31 32 33 47 48 49 50 51 52 1 2 3 4 5 6 7 ai02857 psd834f2v 88/95 figure 48. pqfp52 - 52-pin plastic, quad, flat package mechanical drawing note: drawing is not to scale. qfp-a nd e1 cp b e a2 a n l a1 a d1 d 1 e ne c d2 e2 l1 89/95 psd834f2v table 56. pqfp52 - 52-pin plastic, quad, flat package mechanical dimensions symb. mm inches typ. min. max. typ. min. max. a 2.35 0.093 a1 0.25 0.010 a2 2.00 1.80 2.10 0.079 0.077 0.083 b 0.22 0.38 0.009 0.015 c 0.11 0.23 0.004 0.009 d 13.20 13.15 13.25 0.520 0.518 0.522 d1 10.00 9.95 10.05 0.394 0.392 0.396 d2 7.80 C C 0.307 C C e 13.20 13.15 13.25 0.520 0.518 0.522 e1 10.00 9.95 10.05 0.394 0.392 0.396 e2 7.80 C C 0.307 C C e 0.65 C C 0.026 l 0.88 0.73 1.03 0.035 0.029 0.041 l1 1.60 C C 0.063 a 0 7 0 7 n52 52 nd 13 13 ne 13 13 cp 0.10 0.004 psd834f2v 90/95 figure 49. plcc52 - 52-lead plastic lead, chip carrier package mechanical drawing note: drawing is not to scale. table 57. plcc52 - 52-lead plastic lead, chip carrier package mechanical dimensions symbol mm inches typ. min. max. typ. min. max. a 4.19 4.57 0.165 0.180 a1 2.54 2.79 0.100 0.110 a2 C 0.91 C 0.036 b 0.33 0.53 0.013 0.021 b1 0.66 0.81 0.026 0.032 c 0.246 0.261 0.0097 0.0103 d 19.94 20.19 0.785 0.795 d1 19.05 19.15 0.750 0.754 d2 17.53 18.54 0.690 0.730 e 19.94 20.19 0.785 0.795 e1 19.05 19.15 0.750 0.754 e2 17.53 18.54 0.690 0.730 e 1.27 C C 0.050 C C r 0.89 C C 0.035 C C n52 52 nd 13 13 ne 13 13 plcc-b d e1 e 1 n d1 cp b d2/e2 e b1 a1 a a2 d3/e3 m l1 l c m1 91/95 psd834f2v part numbering table 58. ordering information scheme note: 1. the 5v10% devices are not covered by this data sheet, but by the psd834f2 data sheet. for a list of available options (e.g., speed, package) or for further information on any aspect of this device, please contact your nearest st sales office. example: psd8 3 4 f 2 v C 10 j i t device type psd8 = 8-bit psd with register logic psd9 = 8-bit psd with combinatorial logic sram capacity 3 = 64 kbit flash memory capacity 4 = 2 mbit (256k x 8) 2nd flash memory 2 = 256 kbit (32k x 8) flash memory operating voltage blank = v cc = 4.5 to 5.5v (1) v = v cc = 3.0 to 3.6v speed 10 = 100ns 15 = 150ns 20 = 200ns package j = plcc52 m = pqfp52 temperature range blank = 0 to 70 c (commercial) i = C40 to 85 c (industrial) option t = tape & reel packing psd834f2v 92/95 appendix a. pqfq52 pin assignments table 59. pqfp52 connections (figure 46) pin number pin assignments 1 pd2 2 pd1 3 pd0 4 pc7 5 pc6 6 pc5 7 pc4 8 v cc 9 gnd 10 pc3 11 pc2 12 pc1 13 pc0 14 pa7 15 pa6 16 pa5 17 pa4 18 pa3 19 gnd 20 pa2 21 pa1 22 pa0 23 ad0 24 ad1 25 ad2 26 ad3 pin number pin assignments 27 ad4 28 ad5 29 ad6 30 ad7 31 v cc 32 ad8 33 ad9 34 ad10 35 ad11 36 ad12 37 ad13 38 ad14 39 ad15 40 cntl0 41 reset 42 cntl2 43 cntl1 44 pb7 45 pb6 46 gnd 47 pb5 48 pb4 49 pb3 50 pb2 51 pb1 52 pb0 93/95 psd834f2v appendix b. plcc52 pin assignments table 60. plcc52 connections (figure 47) pin number pin assignments 1gnd 2pb5 3pb4 4pb3 5pb2 6pb1 7pb0 8pd2 9pd1 10 pd0 11 pc7 12 pc6 13 pc5 14 pc4 15 v cc 16 gnd 17 pc3 18 pc2 (v stby ) 19 pc1 20 pc0 21 pa7 22 pa6 23 pa5 24 pa4 25 pa3 26 gnd pin number pin assignments 27 pa2 28 pa1 29 pa0 30 ad0 31 ad1 32 ad2 33 ad3 34 ad4 35 ad5 36 ad6 37 ad7 38 v cc 39 ad8 40 ad9 41 ad10 42 ad11 43 ad12 44 ad13 45 ad14 46 ad15 47 cntl0 48 reset 49 cntl2 50 cntl1 51 pb7 52 pb6 psd834f2v 94/95 revision history table 61. document revision history date version description of revision 15-feb-2002 1.0 document written 18-nov-03 2.0 reformatted; correct package references (figure 1) 95/95 psd834f2v information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the co nsequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specifications mentioned in this publicati on are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics prod ucts are not authorized for use as critical components in life support devices or systems without express written approval of stmicroelectro nics. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners ? 2003 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - united states www.st.com |
Price & Availability of PSD834F2V-15M |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |