| поискавой системы для электроныых деталей |
|
PIC16F720-E/ML датащи(PDF) 161 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F720-E/ML датащи(HTML) 161 Page - Microchip Technology |
|
161 / 244 page ![]() 2010 Microchip Technology Inc. DS41430A-page 161 PIC16F/LF720/721 18.0 FLASH PROGRAM MEMORY SELF READ/SELF WRITE CONTROL The Flash Program Memory is readable and writable during normal operation of the device. This memory is not directly mapped in the register file space. Instead, it is indirectly addressed through the Special Function Registers. There are six SFRs used to read/write this memory: •PMCON1 •PMCON2 •PMDATL •PMDATH • PMADRL • PMADRH When interfacing the program memory block, the PMDATL and PMDATH registers form a two byte word which holds the 14-bit program data for reading, and the PMADRL and PMADRH registers form a two byte word which holds the 13-bit address of the program Flash location being accessed. These devices have 2K to 4K words of program memory with an address range from 0000h to 0FFFh. Devices without a full map of memory will shadow accesses to unused blocks back to the implemented memory. 18.1 Program Memory Read Operation To read a program memory location, the user must write two bytes of the address to the PMADRH and PMADRL registers, then set control bit RD (PMCON1<0>). Once the read control bit is set, the Program Memory Read (PMR) controller uses the two instruction cycles to read the data. This causes the two instructions immediately following the ‘BSF PMCON1, RD’ instruction to be ignored. The data is available in the third cycle, following the set of the RD bit, in the PMDATH and PMDATL registers. PMDATL and PMDATH registers will hold this value until another read is executed. See Example 18-1 and Figure 18-1 for more information. EXAMPLE 18-1: FLASH PROGRAM MEMORY READ Note: Interrupts must be disabled during the time from setting PMCON1<0> (RD) to the third instruction thereafter. * This code block will read 1 word of program * memory at the memory address: PROG_ADDR_HI: PROG_ADDR_LO * data will be returned in the variables; * PROG_DATA_HI, PROG_DATA_LO BANKSEL PMADRL ; Select Bank 2 MOVLW PROG_ADDR_LO ; MOVWF PMADRL ; Store LSB of address MOVLW PROG_ADDR_HI ; MOVWL PMADRH ; Store MSB of address BANKSEL PMCON1 ; Select Bank 3 BCF INTCON,GIE ; Disable interrupts BSF PMCON1,RD ; Initiate read NOP ; Ignored (Figure 18-1) NOP ; Ignored (Figure 18-1) BSF INTCON,GIE ; Restore interrupts BANKSEL PMDATL ; Select Bank 2 MOVF PMDATL,W ; Get LSB of word MOVWF PROG_DATA_LO ; Store in user location MOVF PMDATH,W ; Get MSB of word MOVWF PROG_DATA_HI ; Store in user location |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |