(AN778) Implementing External Memory Interface On PIC18C601,801 PDF
(AN778) Implementing External Memory Interface On PIC18C601,801 PDF
INTRODUCTION
The PIC18C601 and PIC18C801 are the very first members of Microchips PIC18 family that are ROMless microcontrollers that is, they have no on-chip program memory. Both offer the enhanced PIC18 architecture, along with the ability to use different types and sizes of external program memory to exactly fit any application. In addition to standard 1.5 Kbytes of general purpose RAM, the PIC18C601 can address up to 256 Kbytes of external program memory, while the PIC18C801 can address up to 2 Mbytes of external program memory. With this amount of available addressable space, the PIC18C601/801 devices become ideal candidates for more complex applications (e.g. TCP/IP stacks), developed with high level programming languages, such as C. In addition, PIC18C601/801 devices also make in-system programming possible with its configurable general purpose RAM (Boot RAM), which can be configured as a program memory. When program execution takes place from Boot RAM, the external memory bus can be mapped to port I/O. This feature enables the device to perform virtually any programming algorithm in software which does not conform to standard timing requirements. Also, the PIC18C801 offers a completely glueless external memory interface solution with its 8-bit De-Multiplexed Interface mode. The PIC18C601/801 devices provide up to two programmable chip select signals, to partition address space into two different memories. It also provides one programmable I/O chip select signal to locate an 8 Kbyte memory mapped I/O region anywhere in the address space, except the lower 8 Kbyte space.
DS00778A-page 1
AN778
1.0 EXTERNAL PROGRAM MEMORY INTERFACE MODES
plexed or de-multiplexed; the PIC18C601 supports only the Multiplexed mode, while the PIC18C801 provides only the De-Multiplexed mode. If the external address bus is configured as an 8-bit external interface, some of the external control signals used in the 16-bit external interface will be mapped to port I/O functions. However, when the external address bus is configured as 16-bit external interface, all of the external control signals used for the 8-bit external interface will also be used for the 16-bit interface. External components are needed to de-multiplex the address for all interface modes. The exception is the PIC18C801 configured in 8-bit Interface mode (Section 1.3.2).
PIC18C601/801 controllers can be configured to run in either 8-bit or 16-bit Data mode. The appropriate mode is selected by setting the Bus Width configuration bit (BW) in the Configuration register CONFIG2L. The default configuration for the controllers is 16-bit, but this can be changed to 8-bit with the appropriate device programmer. The 16-bit Data mode is available only in Multiplexed mode, regardless of part selection. Depending on the part chosen, the 8-bit Data mode may be either multi-
REGISTER 1-1:
bit 7 bit 6
Unimplemented: Read as 0 BW: External Bus Data Width bit 1 = 16-bit external bus mode 0 = 8-bit external bus mode Unimplemented: Read as 0 PWRTEN: Power-up Timer Enable bit 1 = PWRT disabled 0 = PWRT enabled Legend: R = Readable bit P = Programmable bit U = Unimplemented bit, read as 0 u = Unchanged from programmed state - n = Value when device is unprogrammed
DS00778A-page 2
AN778
1.1 Physical Implementation
The External Memory Interface is implemented with up to 26 pins on the PIC18C601, and up to 38 pins on the PIC18C801. These pins are reserved for external address and data bus functions. and are also multiplexed with port pins. The port functions are only enabled when: Program execution takes place in internal Boot RAM, and The EBDIS bit in the MEMCON register is set (MEMCON<7> = 1). Tables 1-1 and 1-2 list the typical mappings of external bus functions on I/O pins for the PIC18C601 and PIC18C801, respectively.
TABLE 1-1:
Name RD0/AD0 RD1/AD1 RD2/AD2 RD3/AD3 RD4/AD4 RD5/AD5 RD7/AD6 RD6/AD7 RE0/AD8 RE1/AD9 RE2/AD10 RE3/AD11 RE4/AD12 RE5/AD13 RE6/AD14 RE7/AD15 RG0/ALE RG1/OE RG2/WRL RG3/WRH RG4/BA0 RF7/LB RF6/UB RF3/CSIO RF4/AD16 RF5/CS1
DS00778A-page 3
AN778
TABLE 1-2:
Name RD0/AD0 RD1/AD1 RD2/AD2 RD3/AD3 RD4/AD4 RD5/AD5 RD7/AD6 RD6/AD7 RE0/AD8 RE1/AD9 RE2/AD10 RE3/AD11 RE4/AD12 RE5/AD13 RE6/AD14 RE7/AD15 RH0/A16 RH1/A17 RH2/A18 RH3/A19 RG0/ALE RG1/OE RG2/WRL RG3/WRH RG4/BA0 RF7/LB RF6/UB RF3/CSIO RF4/CS2 RF5/CS1 RJ0/D0 RJ1/D1 RJ2/D2 RJ3/D3 RJ4/D4 RJ5/D5 RJ6/D6 RJ7/D7
DS00778A-page 4
AN778
1.2 16-bit External Interfaces
The 16-bit External mode interface can be configured by setting BW bit in Configuration register, CONFIG2L. Pins AD15:AD0 carry multiplexed address and data information, while pins A19:A16 carry address information only. The BA0 signal indicates an even or odd address. Since all memory accesses by the controller in 16-bit mode are word-aligned, BA0 is not required and should be left unconnected, even though it is still active. For 16-bit instruction fetch mode, the OE output enable signal will enable both bytes of program memory at once to get a 16-bit word. PIC18C601/801 controllers divide their instruction cycle into four quarters, Q1 through Q4. During Q1, ALE is enabled while address information (A15:A0) is placed on pins AD15:AD0. At the same time, the upper address information (Ax:A16) is available on the upper address bus. On the negative edge of ALE, the address is latched in the external latch. At the beginning of Q3, the OE output enable (active low) signal is generated. At the end of Q4, OE goes high and data (16-bit word) is read from memory at the low-to-high transition edge of OE. The 16-bit mode is divided into three sub-categories, depending on how external memory is organized: 16-bit memory with two individual 8-bit memory chips (Byte Write mode) 16-bit memory with Byte Select mode True 16-bit memory (16-bit Word Write mode) The control signals used for the 16-bit modes are listed in Table 1-3.
TABLE 1-3:
Name RG0/ALE RG1/OE RG2/WRL RG3/WRH RG4/BA0 RF3/CSIO RF4/CS2 RF5/CS1 RF6/UB RF7/LB I/O
DS00778A-page 5
AN778
1.2.1 TABLE READ AND WRITE OPERATIONS IN 16-BIT MODE
All of the 16-bit modes require special handling of Table Write operations. The appropriate bits in the MEMCON register (WM, or MEMCON<1:0>) must be set prior to any Table Write operation. At power-on, the default content of MEMCON sets the following system parameters: System bus is enabled Program RAM is configured as GPR memory from 400h to 5FFh A 3-wait state cycle count for Table Reads and Writes is selected Table Write operations are set for Byte Write mode Register 1-2 gives the details of the MEMCON configuration bits. Note: The WM<1:0> bits have no effect when the device is configured for 8-bit execution.
In addition to the program memory space already covered, PIC18C601/801 devices also have a data memory space. These memory spaces differ in their organization: program memory is 16-bits wide, while data memory is 8-bits wide. To move information between these differently configured spaces, the Table Read (TBLRD) and Table Write (TBLWT) instructions have been provided. Table Read operations retrieve data from program memory and place it into the data memory space. Table Write operations, on the other hand, store data from the data memory space into program memory. Table operations work with byte entities, moving data through an 8-bit register, TABLAT. A table block containing data is not required to be word aligned, so a table block can start or end at any byte address.
REGISTER 1-2:
MEMCON REGISTER
R/W-0 EBDIS bit7 R/W-0 PGRM R/W-0 WAIT1 R/W-0 WAIT0 U-0 U-0 R/W-0 WM1 R/W-0 WM0 bit0
bit 7
EBDIS: External Bus Disable bit 1 = External system bus disabled, all external bus drivers are mapped as I/O ports 0 = External system bus enabled and I/O ports are disabled PGRM: Program RAM Enable bit 1 = 512 bytes of internal RAM enabled as internal program memory from location 1FFE00h to 1FFFFFh, external program memory at these locations is unused. Internal GPR memory from 400h to 5FFh is disabled and returns 00h. 0 = Internal RAM enabled as internal GPR memory from 400h to 5FFh. Program memory from location 1FFE00h to 1FFFFFh is configured as external program memory. WAIT<1:0>: Table Reads and Writes Bus Cycle Wait Count bits 11 = Table reads and writes will wait 0 TCY 10 = Table reads and writes will wait 1 TCY 01 = Table reads and writes will wait 2 TCY 00 = Table reads and writes will wait 3 TCY Unimplemented: Read as '0' WM<1:0>: TBLWT Operation with 16-bit Bus bits 1X = Word Write mode: TABLAT<0> and TABLAT<1> word output, WRH active when TABLAT<1> written 01 = Byte Select mode: TABLAT data copied on both Most Significant Byte and Least Significant Byte, WRH and (UB or LB) will activate 00 = Byte Write mode: TABLAT data copied on both Most Significant Byte and Least Significant Byte, WRH or WRL will activate Legend: R = Readable bit - n = Value at POR W = Writable bit 1 = Bit is set U = Unimplemented bit, read as 0 0 = Bit is cleared x = Bit is unknown
bit 6
bit 5-4
DS00778A-page 6
AN778
1.2.1.1 TABLAT and TBLPTR Registers 1.2.1.2 Table Read
Two control registers are used in conjunction with the TBLRD and TBLWT instructions. They are: TABLAT register TBLPTR registers The Table Latch (TABLAT) is an 8-bit register mapped into the SFR space. The Table Latch is used to hold 8-bit data during data transfers between program memory and data memory. The Table Pointer (TBLPTR) addresses a byte within the program memory. The TBLPTR is comprised of three special function registers: Table Pointer Upper byte (TBLPTRU) Table Pointer High byte (TBLPTRH) Table Pointer Low byte (TBLPTRL) These three registers join to form a 21-bit wide pointer, which allows the device to address up to 2 Mbytes of program memory space. TBLPTR is used by the TBLRD and TBLWT instructions. During Table Read and Table Write operations, the Least Significant bit of TBLPTR is copied to BA0. The remainder of TBLPTR is copied to pins AX:A0 of the external address bus, with the upper limit being determined by the microcontroller and mode being used. As an example, when the PIC18C801 is being used, the value of TBLPTR<0> appears on BA0, while the values of TBLPTR<20:1> appear on pins A19:A0. The TBLRD instruction is used to retrieve data from external program memory and place it into data memory. TBLPTR points to a byte address in external program memory space. Executing TBLRD, places the byte into TABLAT. In addition, TBLPTR can be modified automatically for the next Table Read operation. Table Reads from external program memory are logically performed one byte at a time. If the external interface is 8-bit, the bus interface circuitry in TABLAT will load the external value into TABLAT. If the external interface is 16-bit, interface circuitry in TABLAT will select either the high, or the low byte of the data from the 16-bit bus, based on the Least Significant bit of the address. That is, when LSb is 0, the lower byte (D<7:0>) is selected; when LSb is 1, the upper byte (D<15:8>) is selected.
1.2.1.3
Table Write
The TBLWT instruction stores data from the data memory space into external program memory. PIC18C601/801 devices perform Table Writes, one byte at a time. Table Writes to external memory are two-cycle instructions, unless wait states are enabled. If the external interface is 8-bit, the bus interface circuitry in TABLAT will copy its value to the external data bus. If the external interface is 16-bit, interface Table Writes depend on the type of external device that is connected and the WM<1:0> bits in the MEMCON register. The code in Example 1-1 describes the use of the Table Write operation for the 16-bit external interface.
EXAMPLE 1-1:
movlw movwf movlw movwf movlw movwf movlw movwf tblwt*+ movlw movwf tblwt* movf
DS00778A-page 7
AN778
1.2.2 EXTERNAL TABLE WRITE IN 16-BIT BYTE WRITE MODE
TBLWT instruction cycle, the TABLAT data is presented on the upper and lower bytes of the AD15:AD0 bus. The appropriate WRH or WRL control line is strobed on the LSb of the TBLPTR. Figure 1-1 shows a typical implementation of the Byte Write mode.
This mode is used for two separate 8-bit memories connected for 16-bit operation. This generally includes basic EPROM and FLASH devices. It allows Table Writes to byte-wide external memories. During a
FIGURE 1-1:
Byte-Wide Memory
A/16(1)/A<19:16>(2)
AD<15:8>
PIC18C601/801
CS1 or CS2(3) OE WRL(4) WRH(4) Note 1: 2: 3: 4: PIC18C601 devices only. PIC18C801 devices only.
CS OE WRL
CS OE
CS2 is available only on the PIC18C801. This signal is not used for ROM and EPROM external memory.
DS00778A-page 8
AN778
1.2.3 EXTERNAL TABLE WRITE IN 16-BIT BYTE SELECT MODE
Note: To program a 16-bit FLASH memory with byte select capability, user firmware must dynamically change FLASH memory access mode from Word to Byte mode. This can be achieved by connecting one I/O line to a FLASH Memory mode pin and making sure that the FLASH device is setup in 16-bit mode on power-up. Since instruction fetches are done in 16-bit mode only, care must be taken that FLASH mode is changed only when execution is taking place from Boot RAM. For additional information, refer to the PIC18C601/801 Device Data Sheet (DS39541).
This mode allows Table Write operations to word-wide external memories with byte selection capability. This generally includes both word-wide FLASH and SRAM devices. During a TBLWT cycle, the TABLAT data is presented on the upper and lower byte of the AD15:AD0 bus. The WRH signal is strobed for each write cycle; the WRL pin is not used. The BA0 or UB/LB signals are used to select the byte to be written, based on the LSb of the TBLPTR register. FLASH and SRAM devices use different control signal combinations to implement Byte Select mode. JEDEC standard FLASH memories require that a controller I/O port pin be connected to the memorys BYTE/WORD pin to provide the select signal. They also use the BA0 signal from the controller as a byte address (Figure 1-2). JEDEC standard static RAM memories, on the other hand, use the UB or LB signals to select the byte (Figure 1-3).
FIGURE 1-2:
CE AD<7:0> ALE BA0 I/O CS1 or CS2(3) OE WRH(4) Note 1: 2: 3: 4: 5: PIC18C601 devices only. PIC18C801 devices only. CS2 is available only on the PIC18C801. This signal is not used for ROM and EPROM external memory. This family of FLASH memory ignores A0 in Word mode. A0 IO CS LATCH A<7:0>
OE WRH
DS00778A-page 9
AN778
FIGURE 1-3: 16-BIT BYTE SELECT MODE (WORD-WIDE SRAM)
JEDEC Word SRAM A16(1)/A<19:16>(2) A<15:0> AD<15:8> LATCH A<15:8> D<15:0> UB LB AD<7:0> ALE LATCH A<7:0> CE OE WR A16(1)/A<19:16>(2) A<15:0> D<15:0>
PIC18C601/801
UB LB CS1 or CS2(3) OE WRH Note 1: 2: 3: PIC18C601 devices only. PIC18C801 devices only. CS2 is available only on the PIC18C801.
DS00778A-page 10
AN778
1.2.4 EXTERNAL TABLE WRITE IN 16-BIT WORD WRITE MODE
During a TBLWT cycle to an odd address (TBLPTR<0> = 1), the TABLAT data is presented on the upper byte of the AD15:AD0 bus. The contents of the holding latch are presented on the lower byte of the AD15:AD0 bus. The WRH signal is strobed for each write cycle; the WRL pin is unused. The signal on the BA0 pin indicates the LSb of TBLPTR, but it is left unconnected. Instead, the UB and LB signals are active to select both bytes. The obvious limitation to this method is that the Table Write must be done in pairs on a specific word boundary to correctly write a word location. Figure 1-4 shows a typical implementation of this mode.
This mode is used for word-wide memories, which includes some of the EPROM and FLASH type memories. This mode allows opcode fetches and Table Reads from all forms of 16-bit memory, and Table Writes to any type of word-wide external memories. This method makes a distinction between TBLWT cycles to even or odd addresses. During a TBLWT cycle to an even address (TBLPTR<0> = 0), the TABLAT data is transferred to a holding latch and the external address data bus is tri-stated for the data portion of the bus cycle. No write signals are activated.
FIGURE 1-4:
CE
OE WR(4)
LATCH A<7:0> AD<7:0> ALE CS1 or CS2(3) OE WRH(4) Note 1: 2: 3: 4: PIC18C601 devices only. PIC18C801 devices only. CS2 is available only on the PIC18C801. This signal is not used for ROM and EPROM external memory. CS OE WRH
DS00778A-page 11
AN778
1.3
1.3.1
This interface is only available on the PIC18C601. It requires the use of either a lower processor operating frequency as compared to 16-bit modes, or the use of a faster memory device. In this mode, the low order address and data bytes are multiplexed, and require a single latch to de-multiplex the address and data busses. Instructions are fetched as two 8-bit bytes within one instruction cycle. Pin BA0 from the controller must be connected to address pin A0 of the memory device(s); because of this, controller
address pins A16:A0 are connected to memory address pins A17:A1. The output enable (OE) signal will enable the first byte of program memory for a portion of the cycle, the second byte will be read to from the 16-bit instruction word when BA0 changes. When the 8-bit interface is selected, the WRH, UB and LB pins are not used; they revert to I/O port functions. The WRL signal is active on every external write. The external address is 18-bits wide, which allows for addressing of up to 256 Kbytes. External Table Reads and Table Write are performed one byte at a time. Figure 1-5 shows a typical implementation of this mode. The control signals are described in Table 1-4.
FIGURE 1-5:
PIC18C601 BA0
D<7:0>
D7:D0 CE
OE
WR(1)
OE WRL
Note 1:
This signal is not used for ROM and EPROM external memory.
TABLE 1-4:
Name RG0/ALE RG1/OE RG2/WRL RG4/BA0 RF3/CSIO RF5/CS1
DS00778A-page 12
AN778
1.3.2 8-BIT WITH DE-MULTIPLEXED EXTERNAL INTERFACE
Pin BA0 from the controller must be connected to address pin A0 of the memory device(s); because of this, controller address pins A19:A0 are connected to memory address pins A20:A1. The output enable (OE) signal will enable the first byte of program memory for a portion of the cycle; the second byte will be read to from the 16-bit instruction word when BA0 changes. The external address is 21-bits wide, which allows for addressing of up to 2 Mbytes. External Table Reads and Table Writes are performed one byte at a time. When the 8-bit de-multiplexed interface is selected, the WRH, UB and LB pins are not used; they revert to I/O port functions. The WRL signal is active on every external write. The control signals for this interface are described in Table 1-5.
This interface is only available on the PIC18C801. It requires the use of either a lower processor operating frequency as compared to 16-bit modes, or the use of a faster memory device. The address and data busses are separate and do not require any external latches for de-multiplexing. The instructions are fetched as two 8-bit bytes on a dedicated data bus (PORTJ); the address is presented for the entire duration of the fetch cycle on a separate address bus. The two bytes are fetched during one instruction cycle.
FIGURE 1-6:
PIC18C801 CE OE WR(1)
Note 1: This signal is not used for ROM and EPROM external memory. 2: CS2 is available only on the PIC18C801.
TABLE 1-5:
Name RG0/ALE RG1/OE RG2/WRL RG4/BA0 RF3/CSIO RF4/CS2 RF5/CS1
DS00778A-page 13
AN778
2.0 MEMORY MAPPED I/O
2.1 Discrete Digital Logic
In general, ROMless microcontrollers have less dedicated I/O ports available than their ROM equipped counterparts. To get around this limitation, additional I/O channels are made available through memory mapped communications with peripheral devices. Normally, this is achieved in one of two ways: Using discrete digital logic Using programmable peripherals In general, latches are required for output ports, while tri-state buffers are used for input ports. Figure 2-1 demonstrates the requirements for a typical output port. Normally, latches have one active high control signal, with data being latched at the signals high-to-low transition. The controller data bus (D<7:0>) is connected to the data input bus of the latch. The CSIO and appropriate WR control lines are NORed to produce the latch control signal. Figure 2-2 demonstrates the requirements for a digital input interface. Tri-state buffers usually have one active low control signal; when it is active, input data is transferred to the buffer output. The controller data bus (D<7:0>) is connected to the output bus of the buffer. The CSIO and OE lines are ORed to produce the buffer control signal.
FIGURE 2-1:
LATCH D<7:0>
Digital Output
CSIO
WRH WRL NOR Gate Input MODE 8-bit WRL 16-bit, Byte Write WRL 16-bit, Word Write WRH 16-bit, Byte Select WRH
Note 1: Configuration for PIC18C601 and PIC18C801 in 16-bit mode. 2: Configuration for PIC18C801 in 8-bit mode..
FIGURE 2-2:
Digital Input
CSIO G OE
Note 1: Configuration for PIC18C601 and PIC18C801 in 16-bit mode. 2: Configuration for PIC18C801 in 8-bit mode..
DS00778A-page 14
AN778
2.2 Programmable Peripherals
Some commonly used peripherals, such as the Intel compatible 8255 (programmable peripheral interface) and the 8279 (programmable keyboard/display interface), have 8-bit interfaces. These devices can be connected to ROMless microcontrollers for memory mapped I/O operation, using CSIO as a control line. Figures 2-3 through 2-5 demonstrate methods for interfacing programmable peripheral devices with ROMless microcontrollers. Some peripherals (such as the 8255 and 8279) have one or two address lines to select internal registers. As these are 8-bit devices, special care is required for the 16-bit modes. The addressing scheme is selected in such a way that it is common for all modes. The base address will be an even address specified by the CSELIO register. (See Section 3.3 for details on specifying the location of the 8 Kbyte region for I/O). The peripheral devices data bus (D7:D0) is connected to the controller s data bus. Peripheral address pins A0 and A1 (in some cases, only A0) are connected to A0 and A1 of the controller. For 8-bit mode, address pins A0 and A1 of the peripheral device (in some case only A0) can be connected with BA0 and A0 of the controller. The RD control pin of the peripheral is connected to the OE pin of the controller. The WR pin of the peripheral is connected to either the WRL or WRH pin of the controller, depending on the memory interface mode. The internal registers of the peripheral device can be accessed by Table Read and Table Write instructions. Addresses for the registers start with the base address specified by the CSELIO register, incrementing with an offset of 02h in 16-bit mode or 01h in 8-bit mode. (See the Address/Register tables in Figures 2-3 through 2-5 for details.) For 16-bit Table Write operations, the upper byte will be dummy data.
FIGURE 2-3:
16-BIT MEMORY MAPPED I/O FOR THE PIC18C601/801 PROGRAMMABLE PERIPHERAL DEVICES
MCU Peripheral Address Register CSELIO Base 0 Base + 2 1 2 Base + 4 3 Base + 6 A<1:0>
PIC18C601/801
PERIPHERAL
A<1:0> D<7:0>
AD<7:0>
ALE CSIO OE WRH WRL Interface Mode WR Connected To WRL WRH WRH LEGEND Address Lines Data Lines Control Lines
DS00778A-page 15
AN778
FIGURE 2-4: 8-BIT MEMORY MAPPED I/O FOR THE PIC18C801 PROGRAMMABLE PERIPHERAL DEVICES
MCU Peripheral Address Register CSELIO Base 0 Base + 2 1 Base + 4 2 Base + 6 3 A0 BA0 D<7:0> D<7:0> PIC18C801
PERIPHERAL A1 A0 D<7:0>
CE
RD
WR
FIGURE 2-5:
8-BIT MEMORY MAPPED I/O FOR THE PIC18C601 PROGRAMMABLE PERIPHERAL DEVICES
MCU Peripheral Address Register CSELIO Base 0 Base + 2 1 2 Base + 4 3 Base + 6 BA0 BA0 A0 LATCH
PERIPHERAL A0 A1
AD<7:0>
ALE
DS00778A-page 16
AN778
3.0 MEMORY MAPPING
3.1 CS1
PIC18C601/801 microcontrollers are capable of supporting a wide variety of memories and memory configurations. Users can connect up to two different types of memories in a single system. Different memories can be enabled or disabled using combinations of the chip select signals. While chip select signals are normally generated by externally decoding the address lines, PIC18C601/801 devices provide up to two programmable on-board chip select signals and one I/O chip select signal. This minimizes the amount of additional external circuitry required to interface the external memory and memory mapped I/O devices. The PIC18C601 provides CS1 and CSIO, while the PIC18C801 provides CS1, CS2 and CSIO. When enabled, a chip select signal is asserted whenever the CPU accesses the dedicated range of addresses, specified in the chip select registers, CSEL2 and CSELIO. If both the CSEL2 and CSELIO registers are 00h, all of the chip selects are disabled, and their corresponding pins are configured as I/O. In addition, when program execution takes place from internal Boot RAM, all chip selects are configured in their inactive states. For the PIC18C601, CS1 is always enabled unless the CSIO signal is active. The CSEL2 register in the PIC18C601 is not implemented, and can be used as a general purpose register. The chip selects are unaffected by any device RESETS, except the Power-on Reset. The RESET value of these registers enable all three chip selects with CS1 active (= 0), CS2 inactive (= 1), and CSIO inactive (= 1) (with the RESET address = 000000h). Details of the operation of the chip selects are provided in the following sections. Figure 3-1 further illustrates the relationships between the chip selects and the program memory map. The CS1 signal is active low and inactive high. CS1 is enabled by writing a value other than 00h into either the CSEL2 register, or the CSELIO register. If both registers are programmed to 00h, the CS1 signal is not enabled and the RF5/CS1 pin is configured as I/O. The CS1 signal is active for a range of addresses that are specified in the CSEL2 and CSELIO registers. By default, it is active for the entire program memory range from 000000h to 1FDFFh. It will always be active for the lower 8 Kbytes of program memory. CS1 is active for all addresses for which CS2 and CSIO are inactive. Therefore, if CSEL2 is equal to 20h and CSELIO is equal to 80h, the CS1 signal will be active for the addresses that fall between 000000h and 03FFFFh. When the device cycles through a Power-on Reset, the CS1 chip select is the only active chip select. Note: Because it is the only active chip select signal on Power-on Reset, CS1 must always be connected to one of the external memory devices .
3.2
CS2
The CS2 signal is also active low and inactive high. A value of 00h in the Chip Select 2 Register (CSEL2) disables the CS2 signal and configures the RF4/CS2 pin as I/O. The program memory range for CS2 is determined by the value contained in CSEL2. An 8-bit value in this register determines the starting address for the activation of CS2. The 8-bit value is decoded as one of 256 boundaries in the program memory space, each being 8 Kbyte in size. For example, if the value contained in the CSEL2 register is 128 (80h), then the CS2 signal will be asserted whenever the address is greater than, or equal to 8192 x 128, or 1,048,576 (100000h). When the device cycles through a Power-on Reset, CS2 becomes inactive.
DS00778A-page 17
AN778
3.3 CSIO
The CSIO signal is also active low and inactive high. A value of 00h in the Chip Select 2 Register (CSEL2) disables the CSIO output, and configures the RF3/CSIO pin as I/O. The I/O chip select is active for a fixed 8 Kbyte address range. The location of the I/O chip select is determined by the value contained in the I/O Chip Select register (CSELIO). The eight-bit value is decoded as one of 256 8 Kbyte banks of program memory that, when addressed, will assert the CSIO output. If, for instance, the value contained in the CSIO register is 128 (80h), then the CSIO pin will be asserted for the address range between and including 8192 x 128 to ((8192 x 128) + 8192), or 100000h to 101FFFh. If the 8 Kbyte address block overlaps the address range of the CS2 signal, the CSIO signal will be active and the CS2 signal will be inactive for that 8 Kbyte block of addresses decoded by the CSELIO register. When the device cycles through a Power-on Reset, CSIO becomes inactive.
Note:
The RESET state of both CSEL2 and CSELIO registers on Power-on Reset is FFh. This allows the CS1, CS2 and CSIO signals to be enabled. The CS1 signal will be active for all addresses less than 1FE000h, the CSIO signal is active for all addresses greater than, or equal to 1FE000h, and CS2 is inactive, since it shares the same address value as CSIO. This ensures that the chip select signals are not floating if external memory is present, and its chip enable inputs are tied to the chip selects.
FIGURE 3-1:
EXAMPLE CONFIGURATION ADDRESS MAPS FOR CS1, CS2, AND CSIO CSEL2 = 80h CSELIO = 00h
PROGRAM MEMORY 000000h 000000h
0FFFFFh 100000h
= CS1 ACTIVE
= CS2 ACTIVE
= CSIO ACTIVE
DS00778A-page 18
AN778
REGISTER 3-1: CSEL2 REGISTER
R/W-1 CSL7 bit 7 bit 7-0 R/W-1 CSL6 R/W-1 CSL5 R/W-1 CSL4 R/W-1 CSL3 R/W-1 CSL2 R/W-1 CSL1 R/W-1 CSL0 bit 0
CSL<7:0>: Chip Select 2 Address Decode bits XXh = All eight bits are compared to the Most Significant bits PC<20:13> of the program counter. If PC<20:13> CSL<7:0> register, then the CS2 signal is low. If PC<20:13> < CSL<7:0>, CS2 is high. 00h = CS2 is inactive Legend: R = Readable bit - n = Value at POR W = Writable bit 1 = Bit is set U = Unimplemented bit, read as 0 0 = Bit is cleared x = Bit is unknown
REGISTER 3-2:
CSELIO REGISTER
R/W-1 CSIO7 bit7 R/W-1 CSIO6 R/W-1 CSIO5 R/W-1 CSIO4 R/W-1 CSIO3 R/W-1 CSIO2 R/W-1 CSIO1 R/W-1 CSIO0 bit0
bit 7
CSIO<7:0>: Chip Select I/O Address Decode bits XXh = All eight bits are compared to the Most Significant bits PC<20:13> of the program counter. If PC<20:13> = CSIO<7:0>, then the CSIO signal is low. If not, CSIO is high. 00h = CSIO is inactive Legend: R = Readable bit - n = Value at POR W = Writable bit 1 = Bit is set U = Unimplemented bit, read as 0 0 = Bit is cleared x = Bit is unknown
DS00778A-page 19
AN778
4.0 MEMORY DEVICES AND INTERFACES
External Table Reads are logically performed one byte at a time, although the memory will read a 16-bit word externally. The Least Significant bit of the address internally selects between high and low bytes. For Table Writes, configure the MEMCON register for Byte Write mode (MEMCON<1:0>=00). During a TBLWT cycle, the TABLAT data is presented on the upper and lower byte of the AD bus. The appropriate WRH or WRL signal is strobed based on the LSb of the TBLPTR. An example of this interface is provided in Figure 1-1.
The PIC18C601/801 ROMless devices are designed to support a variety of memory devices. A variety of control signals are provided to facilitate the interface with many memory chips.
4.1
4.1.1
In this arrangement, address pins AX:A0 of the controller are connected to address pins AX+1:A1 of the memory device. Pin BA0 is connected to the A0 pin of memory. Controller data pins D7:D0 are connected to memory data lines D7:D0. The controller s OE pin is connected to the OE pin of the memory device, and the controller s WRL pin is connected to the memorys WE pin. For the PIC18C801, all address and data signals are directly available at pin. For the PIC18C601, pins AD7:AD0 are multiplexed; one external latch is required for de-multiplexing the address and data busses. Instructions are fetched as two 8-bit bytes. The output enable (OE) signal will enable one byte of program memory for a portion of cycle, then the LSb of address BA0 will change and the second byte will be read to from the 16-bit instruction word. External Table Reads and Table Writes are performed one byte at a time. Examples of the 8-bit interfaces are provided in Figure 1-5 (Multiplexed mode) and Figure 1-6 (De-Multiplexed mode). Note: The 8-bit memory interfaces require the use of either faster memory devices, or a lower controller operating frequency (as compared to similar 16-bit interfaces).
4.2
For this arrangement, the controller address pins AX:A0 are connected to the memory address pins AX:A0. BA0 is not used, and left unconnected. The controller data pins D15:D0 are connected to D15:D0 of the memory device. The controller s OE control pin is connected with the OE pin of the memory, and the controller s WRH pin is connected to the memorys WE pin. Instructions are fetched as a single 16-bit word. The output enable (OE) signal will enable word from memory for a portion of the cycle to get the 16-bit instruction word. External Table Reads are logically performed one byte at a time, although the memory will read a 16-bit word externally. The Least Significant bit of the address will internally select between high and low bytes. For Table Write, configure the MEMCON register for Word Write mode (MEMCON<1:0>=1x). During a TBLWT cycle to an even address (TBLPTR<0> = 0), the TABLAT data is transferred to a holding latch and the external address data bus is tri-stated for the data portion of the bus cycle. No write signals are activated. During a TBLWT cycle to an odd address (TBLPTR<0> = 1), the TABLAT data is presented on the upper byte of the AD bus (AD15:AD8). The contents of the holding latch are presented on the lower byte of the AD bus (AD7:AD0). The WRH signal is strobed for each write cycle and the WRL signal is unused. The BA0 signal indicates the LSb of TBLPTR, but it is not used. The UB and LB control signals are active to select both bytes. An example of the 16-bit Word Write interface is shown in Figure 1-4.
4.1.2
x16 ARRANGEMENT
For this arrangement, two byte-wide memory chips are used, one each for the LSB and MSB. The controller address lines AX:A0 are connected to the AX:A0 address lines of both memories. BA0 is left unconnected. The controller data lines are connected to D7:D0 of one memory device (LSB), and to D15:D8 of the second device (MSB). The controller OE pin is connected with the OE pin of both memories. The controller WRL pin is connected to WE of the LSB memory, while WRH is connected to WE of the MSB memory. Instructions are fetched as a 16-bit word. The output enable (OE) signal will enable one byte of both memories for a portion of cycle to form the 16-bit instruction word.
DS00778A-page 20
AN778
4.3 Memory Devices with x8/x16 Selectable Organization
Instructions are fetched as two 8-bit bytes. The output enable (OE) signal will enable one byte of program memory for the first portion of cycle; then the BA0 signal changes, and the second byte is read to form the 16-bit instruction word. External Table Reads and Table Writes are performed one byte at a time.
The memory devices covered in this section are capable of supporting both x8 and x16 organization. The method used for interfacing a device depends on the organization used. Additionally, the addressing modes discussed here differ on how the controller address lines are used to fetch byte or word entities. To distinguish these, the schemes in this section will be referred to as Basic Byte and Basic Word.
4.3.1.2
4.3.1
In this scheme, all available memory address lines are used to directly address byte-size data entities. In general, TSOP56 package JEDEC FLASH devices fall into the Basic Byte category.
For this arrangement, the controller s AX:A0 address pins are connected to address pins AX+1:A1 of memory. Controller pin BA0 and memory pin A0 are left unconnected. The controller s D15:D0 data pins are connected to the memorys D15:D0 data pins. The controller and memory OE pins are connected, while the controller s WRH pin is connected to the WE pin of the memory. The connections for this mode are shown in Figure 4-3. For Byte Select mode, the controller s BA0 pin must be connected to A0 of the memory. The WORD/BYTE pin of the memory is connected to an I/O pin on the controller to enable dynamic Word/Byte mode switching. Dynamic switching of FLASH devices is not possible if a program is executing from the same FLASH at the same time. See Section 1.2.3 for more information. Instructions are fetched as 16-bit words. The output enable (OE) signal will enable word from memory for a portion of cycle to fetch the 16-bit instruction word. External Table Reads and Writes are logically performed one byte at a time, although the memory will read a 16-bit word externally. The Least Significant bit of the address will internally select between high and low bytes. Table Writes can be performed in either Word Write or Byte Select mode. (Refer to Sections 1.2.3 and 1.2.4 for more details.)
4.3.1.1
The arrangement is similar to the 8-bit modes illustrated in Figures 1-5 and 1-6. Address pins AX:A0 for the controller are connected to address pins AX+1:A1 of memory. The controllers BA0 pin is connected to A0 of the memory device. For the PIC18C801, data pins D7:D0 are connected directly to the data pins of the memory, providing a glueless interface (Figure 4-2). For the PIC18C601, the low order address and data signals are multiplexed; controller pins AD7:AD0 are directly connected to the memory to provide data, while an external latch de-multiplexes address pins A7:A0 (Figure 4-1). The controller and memory OE pins are connected, while the controller WRL pin is connected to the memory WR pin.
FIGURE 4-1:
A16 AD<15:8> AD<7:0>
LATCH
A<7:0>
PIC18C601
DS00778A-page 21
AN778
FIGURE 4-2:
A<19:16> A<15:8> AD<15:8> A<7:0> AD<7:0> D<7:0> A0 CE OE PIC18C801 BA0 CS1 or CS2(1) OE WRL LEGEND Address Lines Data Lines Control Lines WR D<7:0> WORD/ BYTE
D<7:0>
FIGURE 4-3:
A16(1)/A<19:16>(2)
VDD
AD<15:8>
LATCH
A<15:8>
PIC18C601/801
AD<7:0> ALE
LATCH
A<7:0>
D<7:0>
CS1 or CS2(3) OE WRH Note 1: 2: 3: PIC18C601 devices only. PIC18C801 devices only. CS2 is available only on the PIC18C801. LEGEND Address Lines Data Lines Control Lines
DS00778A-page 22
AN778
4.3.2 BASIC WORD ADDRESSING SCHEMES 4.3.2.2 Word (16-bit) Mode
For this arrangement, controller address pins AX:A0 are connected to memory address pins AX:0. BA0 is left unconnected. The controller data pins D15:D0 pins are connected to memory data pins D15:D0. The controller and memory OE pins are connected, while controller pin WRH is connected to the memorys WE pin. The connections for this mode are shown in Figure 4-6. Instructions are fetched as one 16-bit word. The output enable (OE) signal will enable word from memory for a portion of the cycle to get the 16-bit instruction word. External Table Reads and Writes are logically performed one byte at a time, although the memory will read a 16-bit word externally. The Least Significant bit of the address will internally select between high and low bytes. For Byte Select mode, the controllers BA0 pin must be connected to pin D15/A1 of the memory. The WORD/BYTE pin of the memory is connected to an I/O pin on the controller to enable dynamic Word/Byte mode switching. Dynamic switching of FLASH devices is not possible if a program is executing from the same FLASH at the same time. See Section 1.2.3 for more information. Table Writes can be performed in either Word Write or Byte Select mode. (Refer to Sections 1.2.3 and 1.2.4 for more details.)
In this scheme, all available memory address lines are used to address word (16-bit) data entities. Functionally, one pin (e.g. DQ15) is used as the LSb address input, and acts as a multi-function pin, depending on the operation mode (Byte or Word). In general, TSOP48 package FLASH devices fall into the Basic Word category.
4.3.2.1
In this arrangement, controller address pins AX:A0 are connected to memory address lines AX:A0. Controller data pins D<7:0> are connected to memory data pins D7:D0. BA0 is connected to a memory multi-function pin (e.g., DQ15). The controller and memory OE pins are connected, while the controller WRL pin is connected to the memorys WE pin. For the PIC18C601, pins AD7:AD0 are multiplexed, so one external latch is required for de-multiplexing the address and data busses (Figure 4-4). For the PIC18C801, data is directly available at pin (Figure 4-5). Instructions are fetched as two 8-bit bytes. The output enable (OE) signal will enable one byte of program memory for a portion of cycle; then the BA0 signal will change state for the LSb of address, and the second byte will be read to from the 16-bit instruction word. External Table Reads and Table Writes are performed one byte at a time.
FIGURE 4-4:
A16
AD<15:8>
WR
PIC18C601
ALE BA0 CS1 OE WRL LEGEND Address Lines Data Lines Control Lines
DS00778A-page 23
AN778
FIGURE 4-5:
A<19:16>
D<7:0>
WORD/ BYTE
D15/A1
AD<7:0>
D<7:0> D<7:0>
OE
WR
PIC18C801
FIGURE 4-6:
A16/A<19:16>(2)
VDD
AD<15:8>
LATCH
A<15:8>
D15/A1
WORD/ BYTE
AD<7:0> ALE
LATCH
A<7:0>
D<7:0>
CS1 or CS2(3) OE WRH Note 1: PIC18C601 devices only. 2: PIC18C801 devices only. 3: CS2 is available only on the PIC18C801. LEGEND Address Lines Data Lines Control Lines
DS00778A-page 24
AN778
5.0 MEMORY TIMING CONSIDERATIONS
In mathematical terms, this means: tOE < TOE, or tOE < 0.5TCY-25 ns After establishing that the controller can successfully access the memory, its still necessary to compare the memory devices data hold (tOH) and float (tDF) specifications with the controller s ToeH2adD specification (time from OE low-to-high transition to AD driven). Although access time is the main criteria for determining device compatibility, the data float time (also occasionally referred to as the un-access time) cant be ignored. If the memory device output is unable to go to float in this interval, a bus contention situation will result, in which the next cycle address driven by the CPU will collide with the remnants of the previous cycle memory output. So mathematically, tDF < ToeH2adD Finally, the external latch used for de-multiplexing the address/data busses must satisfy some of its own timing requirements: It must be able to operate within the ALE pulse width interval of 0.25TCY; The address must set in the latch within the latch address setup time. This is defined as the interval from address out to the ALE trailing edge, or 0.25TCY-10 ns; The address should latch when the ALE signal goes low; and Any additional address hold time following the ALE trailing edge should be less than the time from the trailing edge to the address out invalid time of 5 ns. Table 5-1 lists approximate memory timing requirements for some typical oscillator frequencies. Normally, if access time requirements are met, all other requirements will match. Detailed timing diagrams and requirements follow on the next two pages. Figure 5-1 and Table 5-2 provide information on 16-bit timing operations, while Figure 5-2 and Table 5-3 provide the same information for 8-bit operations.
Instruction fetching depends on the processor speed, so memory used must provide data output at that speed. This requires consideration on selection of memory for required access time. The memory access time is dependent on main oscillator frequency and External Interface mode. The 8-bit mode requires either a faster memory or a lower processor operating frequency than is available in 16-bit mode. Most of the program memory timing characteristics are defined relative to the instruction cycle period (TCY). This period equals four times the input oscillator time-base period (TOSC), or one-fourth of the oscillator frequency (FOSC): TCY = 4/FOSC = 4 * TOSC For a data read operation, it is apparent that address access time for the memory (address to output delay, or tACC) must be less than the controller s TACC (address valid to data valid delay). However, it is also necessary to consider the propagation delay of the external latch, or tPROP. Depending on the choice of TTL technology, tPROP varies from 5 ns to 40 ns. For 16-bit modes, the memory access time may be expressed by the relationship: tACC < TACC tPROP For 8-bit mode, the BA0 signal toggles within the OE period to fetch word instruction. Therefore, memory devices for 8-bit mode systems should supply data in half the time of 16-bit mode systems. The memory access time for 8-bit mode is expressed by the relationship: tACC < (TACC tPROP) / 2 Another consideration is the memory devices tOE, or OE to output delay. This must be less than the microcontroller s TOE (time from OE falling edge to data valid) of 0.5TCY-25 ns. The OE pulse width is fixed, so if tOE is longer than TOE, it will not meet the requirement for the minimum data setup time of 20 ns.
TABLE 5-1:
DS00778A-page 25
AN778
FIGURE 5-1: PROGRAM MEMORY FETCH TIMING DIAGRAM (16-BIT)
Q2
Q3
Q4
Q1
Q2
Address
Address
Address
150 160 155 166 167 ALE CS1 CS2 or CSIO 168 164 169 171 151
171A OE 165
TABLE 5-2:
Param No 150 151 155 160 161 162 163 164 165 166 167 168 169 171 171A
Symbol TadV2alL TalL2adl TalL2oeL TadZ2oeL ToeH2adD TadV2oeH ToeH2adl TalH2alL ToeL2oeH TalH2alH TACC TOE TalL2oeH TalH2csL TubL2oeH
DS00778A-page 26
AN778
FIGURE 5-2: PROGRAM MEMORY FETCH TIMING DIAGRAM (8-BIT)
Q1 Q2 Q3 Q4 Q1 Q2
OSC1 A<19:8>
Address Address
161
Address
170
TABLE 5-3:
Param No 150 151 161 162 162A 163 166 170 170A
Symbol TadV2alL TalL2adl ToeH2adD TadV2oeH TadV2oeH ToeH2adl TalH2alH TubH2oeH TubL2oeH
Characteristics Address out valid to ALE (address setup time) ALE to address out invalid (address hold time) OE to AD driven LS Data valid before OE (data setup time) MS Data valid before OE (data setup time) OE to data in invalid (data hold time) ALE to ALE (cycle time) BA0 = 0 valid before OE BA0 = 1 valid before OE
Typ TCY
Max
Units ns ns ns ns ns ns ns ns ns
DS00778A-page 27
AN778
SUMMARY
The PIC18C601/801 family of devices provide a flexible external memory interface to support a variety of embedded systems requirements for cost effective implementation with few external components. A multitude of control signals and interface modes make it possible to use a variety of memory devices with ease. The same interface also provides the ability to use memory mapped I/O with a number of peripheral devices.
DS00778A-page 28
AN778
APPENDIX A:
Manufacturer AMD
Organization x8 x16 x8/x16 x8 x16 x8 x16 x8/x16 x8/x16 x8 x8/x16 x8 x16 x8/x16 x8 x16 x8/x16
Remarks
ATMEL
B(3) B B B C C C C C C A A A
Byte Byte
INTEL
Boot Block Strata FLASH/ FLASH File Strata FLASH/ FLASH File
Word
SHARP
Word
ST
Byte
Samsung Catalyst
FLASH products in this family have multiplexed address/data/command lines and are incompatible with PIC18C601/801 devices. Boot Block FLASH Bulk Erase FLASH C
(5)
Hyundai Micron
29F series 29F series Boot Block Boot Block Even Sectored Even Sectored
A A C C C C B B(3) B
SST
NexFlash
29F series
Note 1: This listing is provided only as an example of typical memory devices available. It is not meant to be exhaustive. 2: Details of each programming algorithm family are provided in Appendix B. 3: For these devices, users must provide all data in the sector. The device will first erase the entire sector, then program it. These devices do not support Sector Erase commands. 4: Applicable only to x8/x16 selectable devices. 5: These devices have a unique set of programming algorithms. They are omitted for the sake of brevity.
DS00778A-page 29
AN778
APPENDIX B: PROGRAMMING ALGORITHMS FOR REPRESENTATIVE MEMORY DEVICES(1)
Bus Cycles Command Program Cycles Algorithm Needed A B C Read Mfg. ID A B C Read Device ID A B C Write A B C Block Erase A B C Erase Suspend A B C Erase Resume A B C Chip Erase A B C Sector Protect Verify A B C 1 6 6 2 4 4 X 555 5555 X 555 5555 D0 AA AA 30 AA AA 2AA 2AAA X 2AA 2AAA 55 55 D0 55 55 555 5555 555 5555
(2)
First Addr X X X 555 5555 X 555 5555 X 555 5555 (WA) 555 5555 (BA) X Data F0 F0 FF AA AA 90 AA AA 90 AA AA 40 AA AA 20 B0
Second Addr 2AA 2AAA (IA) 2AA 2AAA (IA) 2AA 2AAA (WA) 2AA 2AAA (BA) Data 55 55 (ID) 55 55 (ID) 55 55 (WD) 55 55 D0
Fourth Addr X00 XX00 X01 XX01 (WA) (WA) 555 5555 Data 01 01 AD 20 (WD) (WD) AA AA
1 1 1 4 4 2 4 4 2 4 4 2 6 6 2 1
2AA 2AAA
1 1
X X
B0 30
(2)
80 80 90 90
555 5555
AA AA
2AA 2AAA
55 55
555 5555
10 10
Legend: WA = Write Address, WD = Write Data, IA = Identifier Address, ID = Identifier Data BA = Block Address, SGA = Sector Group Address Note 1: The information provided in this table is for reference only, and is not meant to be a comprehensive description of the device programming algorithms. For complete information, please refer to the manufacturers data sheet. 2: Instruction unimplemented in this programming algorithm family.
DS00778A-page 30
Note the following details of the code protection feature on PICmicro MCUs. The PICmicro family meets the specifications contained in the Microchip Data Sheet. Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet. The person doing so may be engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our product.
If you have any further questions about this matter, please contact the local sales office nearest to you.
Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchips products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
Trademarks The Microchip name and logo, the Microchip logo, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, KEELOQ, SEEVAL, MPLAB and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. Total Endurance, ICSP, In-Circuit Serial Programming, FilterLab, MXDEV, microID, FlexROM, fuzzyLAB, MPASM, MPLINK, MPLIB, PICC, PICDEM, PICDEM.net, ICEPIC, Migratable Memory, FanSense, ECONOMONITOR, Select Mode and microPort are trademarks of Microchip Technology Incorporated in the U.S.A. Serialized Quick Term Programming (SQTP) is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. 2001, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received QS-9000 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona in July 1999. The Companys quality system processes and procedures are QS-9000 compliant for its PICmicro 8-bit MCUs, KEELOQ code hopping devices, Serial EEPROMs and microperipheral products. In addition, Microchips quality system for the design and manufacture of development systems is ISO 9001 certified.
DS00778A - page 31
ASIA/PACIFIC
Australia
Microchip Technology Australia Pty Ltd Suite 22, 41 Rawson Street Epping 2121, NSW Australia Tel: 61-2-9868-6733 Fax: 61-2-9868-6755
Japan
Microchip Technology Japan K.K. Benex S-1 6F 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel: 81-45-471- 6166 Fax: 81-45-471-6122
Rocky Mountain
2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7966 Fax: 480-792-7456
China - Beijing
Microchip Technology Consulting (Shanghai) Co., Ltd., Beijing Liaison Office Unit 915 New China Hong Kong Manhattan Bldg. No. 6 Chaoyangmen Beidajie Beijing, 100027, No. China Tel: 86-10-85282100 Fax: 86-10-85282104
Korea
Microchip Technology Korea 168-1, Youngbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5934
Atlanta
500 Sugar Mill Road, Suite 200B Atlanta, GA 30350 Tel: 770-640-0034 Fax: 770-640-0307
Singapore
Microchip Technology Singapore Pte Ltd. 200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-334-8870 Fax: 65-334-8850
Austin - Analog
8303 MoPac Expressway North Suite A-201 Austin, TX 78759 Tel: 512-345-2030 Fax: 512-345-6085
China - Chengdu
Microchip Technology Consulting (Shanghai) Co., Ltd., Chengdu Liaison Office Rm. 2401, Ming Xing Financial Tower No. 88 TIDU Street Chengdu 610016, China Tel: 86-28-6766200 Fax: 86-28-6766599
Taiwan
Microchip Technology Taiwan 11F-3, No. 207 Tung Hua North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
Boston
2 Lan Drive, Suite 120 Westford, MA 01886 Tel: 978-692-3848 Fax: 978-692-3821
China - Fuzhou
Microchip Technology Consulting (Shanghai) Co., Ltd., Fuzhou Liaison Office Rm. 531, North Building Fujian Foreign Trade Center Hotel 73 Wusi Road Fuzhou 350001, China Tel: 86-591-7557563 Fax: 86-591-7557572
Boston - Analog
Unit A-8-1 Millbrook Tarry Condominium 97 Lowell Road Concord, MA 01742 Tel: 978-371-6400 Fax: 978-371-0050
EUROPE
Denmark
Microchip Technology Denmark ApS Regus Business Centre Lautrup hoj 1-3 Ballerup DK-2750 Denmark Tel: 45 4420 9895 Fax: 45 4420 9910
Chicago
333 Pierce Road, Suite 180 Itasca, IL 60143 Tel: 630-285-0071 Fax: 630-285-0075
China - Shanghai
Microchip Technology Consulting (Shanghai) Co., Ltd. Room 701, Bldg. B Far East International Plaza No. 317 Xian Xia Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060
Dallas
4570 Westgrove Drive, Suite 160 Addison, TX 75001 Tel: 972-818-7423 Fax: 972-818-2924
France
Arizona Microchip Technology SARL Parc dActivite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Dayton
Two Prestige Place, Suite 130 Miamisburg, OH 45342 Tel: 937-291-1654 Fax: 937-291-9175
China - Shenzhen
Microchip Technology Consulting (Shanghai) Co., Ltd., Shenzhen Liaison Office Rm. 1315, 13/F, Shenzhen Kerry Centre, Renminnan Lu Shenzhen 518001, China Tel: 86-755-2350361 Fax: 86-755-2366086 Hong Kong Microchip Technology Hongkong Ltd. Unit 901, Tower 2, Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431
Germany
Arizona Microchip Technology GmbH Gustav-Heinemann Ring 125 D-81739 Munich, Germany Tel: 49-89-627-144 0 Fax: 49-89-627-144-44
Detroit
Tri-Atria Office Building 32255 Northwestern Highway, Suite 190 Farmington Hills, MI 48334 Tel: 248-538-2250 Fax: 248-538-2260
Germany - Analog
Lochhamer Strasse 13 D-82152 Martinsried, Germany Tel: 49-89-895650-0 Fax: 49-89-895650-22
Los Angeles
18201 Von Karman, Suite 1090 Irvine, CA 92612 Tel: 949-263-1888 Fax: 949-263-1338
Italy
Arizona Microchip Technology SRL Centro Direzionale Colleoni Palazzo Taurus 1 V. Le Colleoni 1 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883
New York
150 Motor Parkway, Suite 202 Hauppauge, NY 11788 Tel: 631-273-5305 Fax: 631-273-5335
India
Microchip Technology Inc. India Liaison Office Divyasree Chambers 1 Floor, Wing A (A3/A4) No. 11, OShaugnessey Road Bangalore, 560 025, India Tel: 91-80-2290061 Fax: 91-80-2290062
San Jose
Microchip Technology Inc. 2107 North First Street, Suite 590 San Jose, CA 95131 Tel: 408-436-7950 Fax: 408-436-7955
United Kingdom
Arizona Microchip Technology Ltd. 505 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 5TU Tel: 44 118 921 5869 Fax: 44-118 921-5820
06/01/01
Toronto
6285 Northam Drive, Suite 108 Mississauga, Ontario L4V 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509
DS00778A-page 32