2011 Microchip Technology Inc.
DS39931D-page 133
PIC18F46J50 FAMILY
10.1.3
INTERFACING TO A 5V SYSTEM
Though the VDDMAX of the PIC18F46J50 family is 3.6V,
these devices are still capable of interfacing with 5V
systems, even if the VIH of the target system is above
3.6V. This is accomplished by adding a pull-up resistor
pin and manipulating the corresponding TRIS bit
or to drive the pin low. Only port pins that are tolerant of
voltages up to 5.5V can be used for this type of
).
FIGURE 10-2:
+5V SYSTEM HARDWARE
INTERFACE
EXAMPLE 10-1:
COMMUNICATING WITH
THE +5V SYSTEM
10.1.4
OPEN-DRAIN OUTPUTS
The output pins for several peripherals are also
equipped with a configurable open-drain output option.
This allows the peripherals to communicate with
external digital logic, operating at a higher voltage
level, without the use of level translators.
The open-drain option is implemented on port pins
specifically associated with the data and clock outputs
of the EUSARTs, the MSSP modules (in SPI mode) and
the ECCP modules. It is selectively enabled by setting
the open-drain control bit for the corresponding module
more detail with the individual port where these
peripherals are multiplexed. Output functions that are
routed through the PPS module may also use the
open-drain option. The open-drain functionality will
follow the I/O pin assignment in the PPS module.
When the open-drain option is required, the output pin
must also be tied through an external pull-up resistor,
provided by the user, to a higher voltage level, up to
output, it is pulled up to the higher voltage level.
FIGURE 10-3:
USING THE OPEN-DRAIN
OUTPUT (USART SHOWN
AS EXAMPLE)
10.1.5
TTL INPUT BUFFER OPTION
Many of the digital I/O ports use Schmitt Trigger (ST)
input buffers. While this form of buffering works well
with many types of input, some applications may
require TTL level signals to interface with external logic
devices. This is particularly true for the Parallel Master
Port (PMP), which is likely to be interfaced to TTL level
logic or memory devices.
The inputs for the PMP can be optionally configured for
TTL buffers with the PMPTTL bit in the PADCFG1 reg-
and control input pins for the PMP to use TTL buffers.
By default, these PMP inputs use the port’s ST buffers.
RD7
+5V Device
+5V
PIC18F46J50
BCF
LATD, 7
; set up LAT register so
; changing TRIS bit will
; drive line low
BCF
TRISD, 7
; send a 0 to the 5V system
BSF
TRISD, 7
; send a 1 to the 5V system
TXX
+5V
(at logic ‘1’)
3.3V
VDD
5V
PIC18F46J50