Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

PIC14000T-04/SS View Datasheet(PDF) - Microchip Technology

Part Name
Description
MFG CO.
PIC14000T-04/SS
Microchip
Microchip Technology Microchip
'PIC14000T-04/SS' PDF : 153 Pages View PDF
PIC14000
5.4.2 SUCCESSIVE OPERATIONS ON I/O
PORTS
The actual write to an I/O port happens at the end of an
instruction cycle, whereas for reading, the data must be
valid at the beginning of the instruction cycle.
Therefore, care must be exercised if a write operation
is followed by a read operation on the same I/O port.
The sequence of instructions should be such to allow
the pin voltage to stabilize before the next instruction
which causes that port to be read into the CPU is
executed. Otherwise, the previous state of that pin may
be read into the CPU rather than the new state. When
in doubt, it is better to separate these instructions with
a NOP or another instruction not accessing this I/O
port.
FIGURE 5-13: SUCCESSIVE I/O OPERATION
Example showing write to PORTC followed by immediate read. Some delays in settling may cause “old”
Port data to be read, especially at higher clock frequencies. Data setup time = (0.25 Tcyc- Tpd), where
Tcyc = instruction cycle time.
Q1 | Q2 | Q3 | Q4 Q1 | Q2 | Q3 | Q4 Q1 | Q2 | Q3 | Q4 Q1 | Q2 | Q3 | Q4
PC
PC + 1
PC + 2
PC + 3
MOVWF PORTC
Write to PORTC
MOVF PORTC, W
Read PORTC
NOP
NOP
RC<x>
Pin values
Port pin sampled
here
Execute MOVWF
PORTC
Execute MOVF
PORTC, W
Execute NOP
DS40122B-page 36
Preliminary
© 1996 Microchip Technology Inc.
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]