PIC16LC433-I/P Microchip Technology, PIC16LC433-I/P Datasheet - Page 33

IC MCU CMOS 8BIT 10MHZ 2K 18-DIP

PIC16LC433-I/P

Manufacturer Part Number
PIC16LC433-I/P
Description
IC MCU CMOS 8BIT 10MHZ 2K 18-DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheet

Specifications of PIC16LC433-I/P

Core Processor
PIC
Core Size
8-Bit
Speed
10MHz
Connectivity
LIN (Local Interconnect Network)
Peripherals
POR, WDT
Number Of I /o
6
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
3 V ~ 5.5 V
Data Converters
A/D 4x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
18-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
5.5
5.5.1
Any instruction which writes, operates internally as a
read followed by a write operation. The BCF and BSF
instructions, for example, read the register into the
CPU, execute the bit operation and write the result
back to the register. Caution must be used when these
instructions are applied to a port with both inputs and
outputs defined. For example, a BSF operation on bit5
of GPIO will cause all eight bits of GPIO to be read into
the CPU. Then, the BSF operation takes place on bit5
and GPIO is written to the output latches. If another bit
of GPIO is used as a bi-directional I/O pin (i.e., bit0) and
it is defined as an input at this time, the input signal
present on the pin itself would be read into the CPU and
rewritten to the data latch of this particular pin, overwrit-
ing the previous content. As long as the pin stays in the
input mode, no problem occurs. However, if bit0 is
switched to an output, the content of the data latch may
now be unknown.
Reading the port register reads the values of the port
pins. Writing to the port register writes the value to the
port latch. When using read-modify-write instructions
(i.e., BCF, BSF, etc.) on a port, the value of the port
pins is read, the desired operation is done to this value,
and this value is then written to the port latch.
2001 Microchip Technology Inc.
I/O Programming Considerations
BI-DIRECTIONAL I/O PORTS
Advance Information
Example 5-1 shows the effect of two sequential read-
modify-write instructions on an I/O port.
EXAMPLE 5-1:
;Initial GPIO Settings
; GPIO<5:3> Inputs
; GPIO<2:0> Outputs
;
;
;
;
;Note that the user may have expected the pin
;values to be --00 pppp. The 2nd BCF caused
;GP5 to be latched as the pin value (High).
A pin actively outputting a Low or High should not be
driven from external devices at the same time, in order
to change the level on this pin (“wired-or”, “wired-and”).
The resulting high output currents may damage the
chip.
BCF
BCF
MOVLW 007h
TRIS
GPIO, 5
GPIO, 4
GPIO
READ-MODIFY-WRITE
INSTRUCTIONS ON AN
I/O PORT
;--01 -ppp
;--10 -ppp
;--10 -ppp
;
GPIO latch
----------
PIC16C433
DS41139A-page 31
--11 pppp
--11 pppp
--10 pppp
----------
GPIO pins

Related parts for PIC16LC433-I/P