| Electronic Components Datasheet Search |
|
PIC18LC658-E/CL Datasheet(PDF) 69 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC18LC658-E/CL Datasheet(HTML) 69 Page - Microchip Technology |
|
69 / 366 page ![]() 2000 Microchip Technology Inc. Advanced Information DS30475A-page 69 PIC18CXX8 5.2.2.1 Long Write Operation The long write is what actually programs words of data into the internal memory. When a TBLWT to the MSB of the write block occurs, instruction execution is halted. During this time, programming voltage and the data stored in internal latches is applied to program memory. For a long write to occur: 1. MCLR/VPP pin must be at the programming voltage 2. LWRT bit must be set 3. TBLWT to the address of the MSB of the write block If the LWRT bit is clear, a short write will occur and pro- gram memory will not be changed. If the TBLWT is not to the MSB of the write block, then the programming phase is not initiated. Setting the LWRT bit enables long writes when the MCLR pin is taken to VPP voltage. Once the LWRT bit is set, it can be cleared only by performing a POR or MCLR Reset. To ensure that the memory location has been well pro- grammed, a minimum programming time is required. The long write can be terminated after the program- ming time has expired by a RESET or an interrupt. Having only one interrupt source enabled to terminate the long write, ensures that no unintended interrupts will prematurely terminate the long write. 5.2.2.2 Sequence of Events The sequence of events for programming an internal program memory location should be: 1. Enable the interrupt that terminates the long write. Disable all other interrupts. 2. Clear the source interrupt flag. 3. If Interrupt Service Routine execution is desired when the device wakes, enable global interrupts. 4. Set LWRT bit in the RCON register. 5. Raise MCLR/VPP pin to the programming voltage, VPP. 6. Clear the WDT (if enabled). 7. Set the interrupt source to interrupt at the required time. 8. Execute the Table Write for the lower (even) byte. This will be a short write. 9. Execute the Table Write for the upper (odd) byte. This will be a long write. The controller will HALT while programming. The interrupt wakes the controller. 10. If GIE was set, service the interrupt request. 11. Go to 7 if more bytes to be programmed. 12. Lower MCLR/VPP pin to VDD. 13. Verify the memory location (table read). 14. Reset the device. |
|
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 |