# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# PIC24FJ64GA004 -- UART

- 1
- 2
…
- 40
- 41
- 42
- 43
- 44
…
- 55
- 56

dsPIC33/PIC24 Family Reference Manual
DS70000582E-page 42  2009-2013 Microchip Technology Inc.
15.0 SMART CARD SUPPORT
The UART module supports communication with ISO 7816 Smart Cards. In a typical application,
the UART module is intended to act as the master or terminal that always initiates communication
transactions. The Smart Card acts as a slave and always responds to commands and other
stimulus from the terminal. Figure 15-1 shows a Smart Card subsystem using a microcontroller
with a UART module for Smart Card data communication.
The terminal is also responsible for powering, clocking and resetting the Smart Card. The clock
can be sourced by using the REFO output pin and the Reset signal can be implemented with a
general purpose output. The system is based on a half-duplex, single wire requiring that the
UART TX and UART RX pins must be shorted externally and pulled to V
DD with a weak pull-up.
The module can be configured to support either block (T = 1) or byte (T = 0) protocol. Block mode
is set up for a predetermined message block size, whereas Byte mode transmits one byte at a
time.
Upon detection of the card insertion, the terminal pulls the Reset line low to initiate a Reset
sequence. The Smart Card responds with an Answer-To-Reset (ATR), which contains parame-
ters used for communication details. The ATR baud rate is predetermined at REFO clk/372. The
terminal will need to be configured for this baud rate at the time the Reset pulse is sent to the
Smart Card. Typical REFO clock rates are 1 MHz to 5 MHz. See ISO 7816 for additional details
on ATR.
Figure 15-1: Smart Card Subsystem
Note: Some PIC
®
MCU devices have optional built-in support for ISO 7816 Smart Card
communication. Refer to the specific device data sheet for information regarding
Smart Card support.
Terminal
dsPIC33/PIC24
UART
Smart Card
TX
RX
REFO
GPO
GPI
Card Detect
(1)
VDD
GND
V
DD
RST
CLK
I/O
Note 1: Use a general purpose input to detect insertion of a Smart Card.

- 1
- 2
…
- 40
- 41
- 42
- 43
- 44
…
- 55
- 56