|
|
Part: AN453
Category:
Description:
Company:
Datasheet: Download AN453 datasheet File size : 50 kB
Request For quote: Find where to buy AN453
Datasheet text preview:
MICROCONTROLLER PRODUCTS
AN453 Using the 87C751 microcontroller to gang program PCF8582/PCF8581 EEPROMs
Author: David Chen, Shanghai Philips Technology Applications Lab December 1994
Philips Semiconductors
Philips Semiconductors
Application note
Using the 87C751 microcontroller to gang program PCF8582/PCF8581 EEPROMs
Author: David Chen, Shanghai Philips Technology Applications Lab
SUMMARY
This Application Note describes how to use the 87C751 microcontroller to implement a gang programmer for the Philips PCF8582 and PCF8581 I 2C EEPROMs. Included are software, schematic, and PCB layout to allow copying from one 16-pin source EEPROM into ten slave EEPROMs. When the process is completed, a green LED turns on and a small buzzer sounds. A red LED by each slave socket indicates a failed IC.
The PCF8582 is a 256×8 CMOS EEPROM with I2C interface. It comes in a variety of 8- and 16-pin plastic packages. This particular layout uses the 16-pin Dual In-Line package. The PCF8581 is a 128×8 CMOS EEPROM. This Gang Programmer was designed to program default set-up parameters into Philips Television sets which use I2C EEPROMs. The design is being presented here, not just to show how to make an I2C interfaced programmer, but to also serve as an example of using the 87C751 I2C interface. The programmer reads data from a source EEPROM and copies the data into ten slave EEPROMs. It can also compare the data between the master and the target. There are just two push buttons on the unit, Copy and Reset. Reset goes directly to the Reset pin on the `751, and shorts out the power-on reset capacitor. Copy is connected to INT0, and gets the micro's attention so that the copy process can start. The programmer is powered from a wall mount, 9V @ 300mA supply. A 5V regulator is on the board. A yellow LED is used to indicate that power has been applied to the board. A green and a pink LED indicate the status of the programming operation, and there is a red LED at each socket to indicate a failure in the programming process to that IC. If everything goes well, the green LED will signal the successful completion of the programming process and a buzzer will also sound. The pink LED will come on if there are any errors in any EEPROM, and the appropriate red LED will indicate the faulty IC. If the pink LED is on and none of the red LEDs are on, there has been an error in the I2C communication link.
AN453
OPERATION
Since the PCF8582 only has three Chip Select lines, and there are eleven parts in the system, a different addressing scheme had to be devised. In this system, A0 and A1 have four possible combinations of addresses. A2 is then used as a bank select which is driven by P1.2, P1.3 and P1.4 on the `751. The 10 red LEDs and the pink and green LEDs are multiplexed, since there are not enough port pins left to directly drive them. Port 3 drives a 74LS244 which in turn drives the anodes of the LEDs through 100 resistors. The two banks for the multiplexing are driven to ground by discrete transistors which receive their base drive from P1.0 and P1.1. Jumpers on P1.6 and P1.7 are used to select different options. Jumpering P1.6 to ground selects the PCF8581 and leaving that jumper off selects the PCF8582. If P1.7 is jumpered to ground, the programmer will only do a compare between the source and the slaves. This compare operation is done in 16-byte segments. If no jumper, then the normal programming sequence will be done.
Program Flow
1. Turn on source EEPROM and initialize `751 pointers in RAM 2. Read two bytes of source data 3. Enable target EEPROM array 4. Write the 2-byte data to each of the ten targets 5. Increment subaddress and get next data from source 6. Repeat write to other targets 7. Wait 70ms to allow the information to be written internally to the EEPROM cells 8. Read each target to verify that correct write was done 9. Repeat the 2-byte write and read cycles until done 10. Disable EEPROM power and turn on the green LED and beep 11. Wait for next input The '751 keeps track of any problems with the programming process, and it skips the verify and subsequent programming of bad or missing targets.
December 1994
2
Philips Semiconductors
Application note
Using the 87C751 microcontroller to gang program PCF8582/PCF8581 EEPROMs
AN453
U1 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C11 100n
R1 22k C1 2n2
U5 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C15 100n
R5 22k C5 2n2
U9 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C19 100n
R9 22k C9 2n2
PCF8582
PCF8582
PCF8582
U2 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C12 100n
R2 22k C2 2n2
U6 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C16 100n
R6 22k C6 2n2
U10 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C20 100n
R10 22k C10 2n2
PCF8582
PCF8582
PCF8582
U3 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C13 100n
R3 22k C3 2n2
U7 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C17 100n
R7 22k C7 2n2
U11 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C21 100n
PCF8582
PCF8582
PCF8582
U4 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C14 100n
R4 22k C4 2n2
U8 1 2 A0 3 A1 4 A2 VSS
8 VDD 7 RC 6 SCL 5 SDA
C18 100n
R8 22k C8 2n2
PCF8582
PCF8582
Red
+5V LED01
D1 BAS16 R17 100R R18 2k R19 2k R21 2.2k R22 2.2k C24 0.1u +5V JP1 Option JP2 Reset +5V C25 10u C22 0.1u SW2 9 24 12 RST VCC VSS SC87C751 XTAL2 Q3 2N5401 Copy R20 U12 2k 15 16 P1.2 17 P1.3 P1.4 8 7 SCL SDA 6 SW1 18 P0.2 BZ1 BUZZER
LED02
LED03
LED04 P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 5 4 3 2 1 23 22 21 11 13 15 17 8 2 4 6 1 19 10 U13 2A1 1Y1 2A2 1Y4 2A3 2Y1 2A4 2Y2 1A4 2Y3 1A1 2Y4 1A2 1Y2 1A3 1Y3 1G 2G VCC VSS 74LS244 18 12 9 7 5 3 16 14 20 +5V C23 0.1u
LED05
LED06 R11 100R R12 100R R13 100R LED09 LED08 LED07
INTO 14 P1.1 13 P1.0 XTAL1 10 X1 11 12MHz
19 20 P1.6 P1.7
C26 27p C27 27p
R14 100R R15 100R R16 100R LED12 LED10
Green
LED11
Pink
Q2 2N5401 U14 LM7805 1 Vin GND 2 Vout 3 +5V R23 2k LED13 Q1 2N5401
D2 +9V BAX18 POWER INPUT C28 47u
Yellow
PCF85XX EEPROM Writer Size Document Number B Date: October 14 1992 REV Sheet 1 of 1
SU00511
December 1994
3
December 1994
C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21
Philips Semiconductors
Using the 87C751 microcontroller to gang program PCF8582/PCF8581 EEPROMs
U1 PCF8582 SOCKET
U2 PCF8582 SOCKET
U3 PCF8582 SOCKET
U4 PCF8582 SOCKET
U5 PCF8582 SOCKET
U6 PCF8582 SOCKET
U7 PCF8582 SOCKET
U8 PCF8582 SOCKET
U9 PCF8582 SOCKET
U10 PCF8582 SOCKET
U11 PCF8582 SOCKET
C1 R1
C2 R2
C3 R3
C4 R4
C5 R5
C6 R6
C7 R7
C8 R8
C9 R9
C10 R10
LED01
LED02
LED03
LED04
LED05
LED06
LED07
LED08
LED09
LED10
4
SU00512
Red
R11 R12 R13 R14 R15
Green Yellow
R23 Q3 LED13 C24 U14 7996 C28 X1 SC87C751 C27 Q2 Q1 R21 R22 C26 U13 31 OPTION 32 R20 R19 R18 74L8244 U13 Buzzer SW1 R17 COPY C22 C23 D1 R16 LED11
Pink
LED12
C25
SW2 RESET
PLUG1
D2
Application note
AN453
Philips Semiconductors
Application note
Using the 87C751 microcontroller to gang program PCF8582/PCF8581 EEPROMs
AN453
SU00513
December 1994
5
Others parts begin by an
AN-1 AN-2 AN-3 AN-4 AN-5 AN-6 AN-7 AN-8
|
|
|