Microchip Technology MCU PIC10F322T-I/OT SOT-23-6 MCP PIC10F322T-I/OT 데이터 시트
제품 코드
PIC10F322T-I/OT
PIC10(L)F320/322
DS41585A-page 58
Preliminary
2011 Microchip Technology Inc.
9.2.1
READING THE FLASH PROGRAM
MEMORY
MEMORY
To read a program memory location, the user must:
1.
1.
Write the desired address to the
PMADRH:PMADRL register pair.
PMADRH:PMADRL register pair.
2.
Clear the CFGS bit of the PMCON1 register.
3.
Then, set control bit RD of the PMCON1 register.
Once the read control bit is set, the program memory
Flash controller will use the second instruction cycle to
read the data. This causes the second instruction
immediately following the “BSF PMCON1,RD” instruction
to be ignored. The data is available in the very next cycle,
in the PMDATH:PMDATL register pair; therefore, it can
be read as two bytes in the following instructions.
PMDATH:PMDATL register pair will hold this value until
another read or until it is written to by the user.
Flash controller will use the second instruction cycle to
read the data. This causes the second instruction
immediately following the “BSF PMCON1,RD” instruction
to be ignored. The data is available in the very next cycle,
in the PMDATH:PMDATL register pair; therefore, it can
be read as two bytes in the following instructions.
PMDATH:PMDATL register pair will hold this value until
another read or until it is written to by the user.
FIGURE 9-1:
FLASH PROGRAM
MEMORY READ
FLOWCHART
MEMORY READ
FLOWCHART
TABLE 9-1:
FLASH MEMORY
ORGANIZATION BY DEVICE
ORGANIZATION BY DEVICE
Device
Row Erase
(words)
Write
Latches
(words)
PIC10(L)F320
16
16
PIC10(L)F322
Note:
The two instructions following a program
memory read are required to be NOPs.
This prevents the user from executing a
two-cycle instruction on the next
instruction after the RD bit is set.
memory read are required to be NOPs.
This prevents the user from executing a
two-cycle instruction on the next
instruction after the RD bit is set.
Start
Read Operation
Select
Program or Configuration Memory
(CFGS)
Select
Word Address
(PMADRH:PMADRL)
End
Read Operation
Instruction Fetched ignored
NOP
execution forced
Instruction Fetched ignored
NOP
execution forced
Initiate Read operation
(RD = 1)
Data read now in
PMDATH:PMDATL