Architecture
1547
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Parallel Port (uPP)
32.2.5.8 Data Format
The uPP peripheral supports any data word width between 8 to 16 bits using the IWx and DPWx bits in
the uPP channel control register (UPCTL). For 8-bit operation, uPP reads/writes 8-bit words in memory;
for 16-bit operation, uPP reads/writes 16-bit words in memory.
For N-bit operation (8 < N < 16), the uPP peripheral reads/writes 16-bit words in memory. The “extra” bits
are filled by the uPP according to a data packing scheme, selected by the DFWx bit in UPCTL. There are
three selectable data packing modes:
•
Right-Justify, Zero Extend – Data occupies N LSBs. The (16 – N) MSBs are cleared to 0.
•
Right-Justify, Sign Extend – Data occupies N LSBs. The (16 – N) MSBs are the same value as the
(N – 1) bit.
•
Left-Justify, Zero Fill – Data occupies N MSBs. The (16 – N) LSBs are cleared to 0.
lists some example data for N = 12 (that is, 12-bit operation). In transmit mode, the packed
version of each data word from memory is transmitted using all 16 data pins allotted to the uPP channel.
In receive mode, the packed version of each incoming data word (using only N data pins) is stored in
memory.
Table 32-6. Data Packing Examples for 12-Bit Data Words
12-Bit Data Word
Right-Justify, Zero Extend
Right-Justify, Sign Extend
Left-Justify, Zero Fill
123h
0123h
0123h
1230h
ABCh
0ABCh
FABCh
ABC0h
000h
0000h
0000h
0000h
800h
0800h
F800h
8000h
FFFh
0FFFh
FFFFh
FFF0h