PIC14000-04 Microchip Technology, PIC14000-04 Datasheet - Page 36

no-image

PIC14000-04

Manufacturer Part Number
PIC14000-04
Description
28-Pin Programmable Mixed Signal Controller
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC14000-04/SO
Quantity:
48
Part Number:
PIC14000-04/SO
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC14000-04/SO
Manufacturer:
Maxim
Quantity:
103
Part Number:
PIC14000-04/SP
Manufacturer:
Microchip
Quantity:
482
Part Number:
PIC14000-04/SP
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC14000-04/SS
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC14000-04/SS
Manufacturer:
MICROCHI
Quantity:
20 000
PIC14000
5.4.2
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.
FIGURE 5-13: SUCCESSIVE I/O OPERATION
DS40122B-page 36
RC<x>
SUCCESSIVE OPERATIONS ON I/O
PORTS
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.
MOVWF PORTC
Write to PORTC
Q1 | Q2 | Q3 | Q4
PC
Pin values
Execute MOVWF
Q1 | Q2 | Q3 | Q4 Q1 | Q2 | Q3 | Q4 Q1 | Q2 | Q3 | Q4
MOVF PORTC, W
Read PORTC
PORTC
PC + 1
Preliminary
Execute MOVF
PORTC, W
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.
NOP
Port pin sampled
here
PC + 2
Execute NOP
PC + 3
NOP
1996 Microchip Technology Inc.

Related parts for PIC14000-04