PIC18F27J53T-I/SO Microchip Technology, PIC18F27J53T-I/SO Datasheet - Page 307

no-image

PIC18F27J53T-I/SO

Manufacturer Part Number
PIC18F27J53T-I/SO
Description
28-pin, USB, 128KB Flash, 4KB RAM, 12 MIPS, 12-bit ADC, NanoWatt XLP 28 SOIC .30
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr
Datasheets

Specifications of PIC18F27J53T-I/SO

Core Processor
PIC
Core Size
8-Bit
Speed
48MHz
Connectivity
I²C, LIN, SPI, UART/USART, USB
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
22
Program Memory Size
128KB (64K x 16)
Program Memory Type
FLASH
Ram Size
3.8K x 8
Voltage - Supply (vcc/vdd)
2.15 V ~ 3.6 V
Data Converters
A/D 10x10b/12b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
*
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
3.8 KB
Interface Type
I2C, SPI, USART
Maximum Clock Frequency
48 MHz
Number Of Programmable I/os
16
Number Of Timers
8
Operating Supply Voltage
2.15 V to 3.6 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
Minimum Operating Temperature
- 40 C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Lead Free Status / Rohs Status
 Details
20.4.6
The following steps would typically be taken to enable
and use the SPI DMA module:
1.
2.
3.
 2010 Microchip Technology Inc.
Configure the I/O pins, which will be used by
MSSP2.
a)
b)
c)
d)
Configure and enable MSSP2 for the desired
SPI operating mode.
a)
b)
Configure the SPI DMA engine.
a)
b)
c)
d)
e)
Assign SCK2, SDO2, SDI2 and SS2 to the
RPn pins as appropriate for the SPI mode
which will be used. Only functions which will
be used need to be assigned to a pin.
Initialize the associated LATx registers for
the desired Idle SPI bus state.
If Open-Drain Output mode on SDO2 and
SCK2 (Master mode) is desired, set
ODCON3<1>.
Configure corresponding TRISx bits for
each I/O pin used.
Select the desired operating mode (Master
or Slave, SPI Mode 0, 1, 2 and 3) and con-
figure the module by writing to the
SSP2STAT and SSP2CON1 registers.
Enable MSSP2 by setting SSP2CON1<5> = 1.
Select the desired operating mode by
writing
DMACON2 and DMACON1.
Initialize the TXADDRH/TXADDRL Pointer
(Full-Duplex or Half-Duplex Transmit Only
mode).
Initialize the RXADDRH/RXADDRL Pointer
(Full-Duplex or Half-Duplex Receive Only
mode).
Initialize the DMABCH/DMABCL Byte Count
register with the number of bytes to be
transferred in the next SPI DMA operation.
Set the DMAEN bit (DMACON1<0>).
In SPI Master modes, this will initiate a DMA
transaction. In SPI Slave modes, this will
complete the initialization process, and the
module will now be ready to begin receiving
and/or transmitting data to the master
device
transaction.
USING THE SPI DMA MODULE
once
the
appropriate
the
master
values
starts
the
to
Preliminary
PIC18F47J53 FAMILY
4.
Example 20-2 provides example code demonstrating
the initialization process and the steps needed to use
the SPI DMA module to perform a 512-byte Full-Duplex
Master mode transfer.
Detect the SSP2IF interrupt condition (PIR3<7).
a)
b)
If the interrupt was configured to occur at
the completion of the SPI DMA transaction,
the DMAEN bit (DMACON1<0>) will be
clear. User firmware may prepare the
module for another transaction by repeating
steps 3.b through 3.e.
If the interrupt was configured to occur prior
to the completion of the SPI DMA trans-
action, the DMAEN bit may still be set,
indicating the transaction is still in progress.
User firmware would typically use this inter-
rupt condition to begin preparing new data
for the next DMA transaction. Firmware
should not repeat steps 3.b. through 3.e.
until the DMAEN bit is cleared by the
hardware, indicating the transaction is
complete.
DS39964B-page 307

Related parts for PIC18F27J53T-I/SO