pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 329

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
EXAMPLE 17-1:
© 2007 Microchip Technology Inc.
/*
*/
The following code example will initialize the SPI1 in master mode.
It assumes that none of the SPI1 input pins are shared with an analog input.
If so, the AD1PCFG and corresponding TRIS registers have to be properly configured.
int rData;
IEC0CLR=0x03800000;
SPI1CON = 0;
rData=SPI1BUF;
IFS0CLR=0x03800000;
IPC5CLR=0x1f000000;
IPC5SET=0x0d000000;
IEC0SET=0x03800000;
SPI1BRG=0x1;
SPI1STATCLR=0x40;
SPI1CON=0x8220;
SPI1BUF=’A’;
INITIALIZATION FOR 16-BIT SPI MASTER MODE
// disable all interrupts
// Stops and resets the SPI1.
// clears the receive buffer
// clear any existing event
// clear the priority
// Set IPL=3, subpriority 1
// Enable Rx, Tx and Error interrupts
// use F
// clear the Overflow
// SPI ON, 8 bits transfer, SMP=1, Master Mode
// from now on, the device is ready to transmit and receive
// transmit an A character
Advance Information
data
PB
/4 clock frequency
PIC32MX FAMILY
DS61143A-page 327

Related parts for pic32mx320f064h