pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 369

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
19.3
1.
2.
3.
4.
5.
6.
EXAMPLE 19-2:
19.4
1.
2.
3.
4.
5.
6.
EXAMPLE 19-3:
© 2007 Microchip Technology Inc.
/* The following code example demonstrates configuring
*/
U1BRG
U1MODESET= 0x8000;// Enable Uart for 8-bit Data, no Parity, and 1 Stop bit
U1STASET= 0x1400;// Enable Transmitter and Receiver
/* The following code example demonstrates configuring
*/
U1BRG
U1MODESET= 0x8006;// Enable Uart for 8-bit Data, no Parity, and 1 Stop bit
U1STASET= 0x1211420;// Enable Address Detect, Set Address = 0x21, Enable Transmitter and
Receiver
Set up the UART:
a)
b)
c)
Enable the UART.
Set the UTXEN bit (causes a transmit interrupt).
Write data byte to UxTXREG word. The value
will be immediately transferred to the Transmit
Shift Register (TSR), and the serial bit stream
will start shifting out with next rising edge of the
baud clock.
Alternately, the data byte may be transferred
while TXEN = 0, and then the user may set
TXEN. This will cause the serial bit stream to
begin immediately because the baud clock will
start from a cleared state.
A transmit interrupt will be generated as per
interrupt control bit, UTXISEL<1:0>.
Set up the UART (as described in Section 19.3).
Enable the UART.
Set the TXEN bit (causes a transmit interrupt).
Write UxTXREG as a 16-bit value only.
A write to UxTXREG triggers the transfer of the
9-bit data to the TSR. Serial bit stream will start
shifting out with the first rising edge of the baud
clock.
A transmit interrupt will be generated as per the
setting of control bit, UTXISEL<1:0>.
UART1 for 8-bit Data Transmit mode.
UART1 for 9-bit Data Transmit mode.
Transmitting in 8-Bit Data Mode
Write appropriate values for data, parity and
Stop bits.
Write appropriate baud rate value to the
UxBRG register.
Set up transmit and receive interrupt enable
and priority bits.
Transmitting in 9-Bit Data Mode
= #BaudRate;// Set Uart baud rate.
= #BaudRate;// Set Uart baud rate.
EXAMPLE 8-BIT DATA MODE
EXAMPLE 9-BIT DATA MODE
Advance Information
PIC32MX
DS61143-page 367

Related parts for pic32mx320f064h