| Electronic Components Datasheet Search |
|
PIC16F87 Datasheet(PDF) 7 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F87 Datasheet(HTML) 7 Page - Microchip Technology |
|
7 / 24 page ![]() 2002 Microchip Technology Inc. DS39607B-page 7 PIC16F87/88 3.4 Program Mode Program mode is entered by holding pins RB6 and RB7 low, while raising MCLR pin from VIL to VIHH (high voltage). In this mode, the state of the RB3 pin does not effect programming. Low-Voltage ICSP Programming mode is entered by raising RB3 from VIL to VDD, and then applying VDD to MCLR. Once in this mode, the user program memory, as well as the configuration memory, can be accessed and programmed in serial fashion. The mode of operation is serial, and the memory accessed is the user program memory. RB6 and RB7 are Schmitt Trigger inputs in this mode. The sequence that enters the device into the Programming mode places all other logic into the RESET state (the MCLR pin was initially at VIL). This means all I/O are in the RESET state (high-impedance inputs). A device RESET will clear the PC and set the address to ‘0’. The ‘Increment Address’ command will increment the PC. The ‘Load Configuration’ command will set the PC to 0x2000. The available commands are shown in Table 3-1. The normal sequence for programming four program memory words at a time is as follows: 1. Set pointer to row location. 2. Issue a ‘Begin Erase’ command. 3. Wait tprog2. 4. Issue an ‘End Programming’ command. 5. Load a word at the current program memory address using the ‘Load Data’ command. 6. Issue an ‘Increment Address’ command. 7. Load a word at the current program memory address using the ‘Load Data’ command. 8. Repeat Step 6 and Step 7 two times. 9. Issue a ‘Begin Programming’ command to begin programming. 10. Wait tprog1. 11. Issue an ‘End Programming’ command. 12. Increment to the next address. 13. Repeat steps 5 through 12 seven times to program one row. The address and program counter are reset to 0x0000 by resetting the device (taking MCLR below VIL) and re-entering Programming mode. Program and configuration memory may then be read or verified using the ‘Read Data’ and ‘Increment Address’ commands. 3.4.1 LOW-VOLTAGE ICSP PROGRAMMING MODE Low-voltage ICSP Programming mode allows a PIC16F87/88 device to be programmed using VDD only. However, when this mode is enabled by a configuration bit (LVP), the PIC16F87/88 device dedicates RB3 to control entry/exit into Programming mode. When the LVP bit is set to ‘1’, the Low-voltage ICSP Programming entry is enabled. Since the LVP configuration bit allows Low-voltage ICSP Programming entry in its erased state, an erased device will have the LVP bit enabled at the factory. While LVP is ‘1’, RB3 is dedicated to Low-voltage ICSP Programming. The following LVP steps assume the LVP bit is set in the Configuration register. 1. Apply VDD to the VDD pin. 2. Drive MCLR low. 3. Apply VDD to the RB3/PGM pin. 4. Apply VDD to the MCLR pin. All other specifications for High-voltage ICSP apply. To disable Low-voltage ICSP mode, the LVP bit must be programmed to ‘0’. This must be done while entered with the High-voltage Entry mode (LVP bit = 1). RB3 is now a general purpose I/O pin. Note: The Osc must not have 72 osc clocks while the device MCLR is between VIL and VIHH. Note: The MCLR pin should be raised from below VIL to above the minimum VIHH (VPP), within 250 µs of VDD rise. This ensures that the device always enters Programming mode before any instructions that may be in program memory can be executed. Otherwise, unintended instruction execution could occur when the INTRC clock source is configured as the primary clock. Refer to Figure 7-1. |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |