欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC24FJ32GA104T-I/PT 参数 Datasheet PDF下载

PIC24FJ32GA104T-I/PT图片预览
型号: PIC24FJ32GA104T-I/PT
PDF下载: 下载PDF文件 查看货源
内容描述: 44分之28引脚, 16位通用闪存微控制器采用nanoWatt XLP技术 [28/44-Pin, 16-Bit General Purpose Flash Microcontrollers with nanoWatt XLP Technology]
分类和应用: 闪存微控制器
文件页数/大小: 308 页 / 2416 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第181页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第182页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第183页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第184页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第186页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第187页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第188页浏览型号PIC24FJ32GA104T-I/PT的Datasheet PDF文件第189页  
PIC24FJ64GA104 FAMILY  
17.2 Transmitting in 8-Bit Data Mode  
17.5 Receiving in 8-Bit or 9-Bit Data  
Mode  
1. Set up the UART:  
a) Write appropriate values for data, parity and  
Stop bits.  
1. Set up the UART (as described in Section 17.2  
“Transmitting in 8-Bit Data Mode”).  
b) Write appropriate baud rate value to the  
UxBRG register.  
2. Enable the UART.  
3. A receive interrupt will be generated when one  
or more data characters have been received as  
per interrupt control bit, URXISELx.  
c) Set up transmit and receive interrupt enable  
and priority bits.  
2. Enable the UART.  
4. Read the OERR bit to determine if an overrun  
error has occurred. The OERR bit must be reset  
in software.  
3. Set the UTXEN bit (causes a transmit interrupt  
two cycles after being set).  
5. Read UxRXREG.  
4. Write data byte to the lower byte of the  
UxTXREG word. The value will be immediately  
transferred to the Transmit Shift Register (TSR)  
and the serial bit stream will start shifting out  
with the next rising edge of the baud clock.  
The act of reading the UxRXREG character will move  
the next character to the top of the receive FIFO,  
including a new set of PERR and FERR values.  
5. Alternately, the data byte may be transferred  
while UTXEN = 0, and then the user may set  
UTXEN. This will cause the serial bit stream to  
begin immediately because the baud clock will  
start from a cleared state.  
17.6 Operation of UxCTS and UxRTS  
Control Pins  
UARTx Clear to Send (UxCTS) and Request to Send  
(UxRTS) are the two hardware-controlled pins that are  
associated with the UART module. These two pins  
allow the UART to operate in Simplex and Flow Control  
modes. They are implemented to control the transmis-  
sion and reception between the Data Terminal  
Equipment (DTE). The UEN<1:0> bits in the UxMODE  
register configure these pins.  
6. A transmit interrupt will be generated as per  
interrupt control bit, UTXISELx.  
17.3 Transmitting in 9-Bit Data Mode  
1. Set up the UART (as described in Section 17.2  
“Transmitting in 8-Bit Data Mode”).  
2. Enable the UART.  
17.7 Infrared Support  
3. Set the UTXEN bit (causes a transmit interrupt).  
4. Write UxTXREG as a 16-bit value only.  
The UART module provides two types of infrared UART  
support: one is the IrDA clock output to support the  
external IrDA encoder and decoder device (legacy  
module support), and the other is the full implementa-  
tion of the IrDA encoder and decoder. Note that  
because the IrDA modes require a 16x baud clock, they  
will only work when the BRGH bit (UxMODE<3>) is ‘0’.  
5. A word write to UxTXREG triggers the transfer  
of the 9-bit data to the TSR. The serial bit stream  
will start shifting out with the first rising edge of  
the baud clock.  
6. A transmit interrupt will be generated as per the  
setting of control bit, UTXISELx.  
17.7.1  
IRDA CLOCK OUTPUT FOR  
EXTERNAL IRDA SUPPORT  
17.4 Break and Sync Transmit  
Sequence  
To support external IrDA encoder and decoder devices,  
the BCLKx pin (same as the UxRTS pin) can be  
configured to generate the 16x baud clock. When  
UEN<1:0> = 11, the BCLKx pin will output the 16x  
baud clock if the UART module is enabled. It can be  
used to support the IrDA codec chip.  
The following sequence will send a message frame  
header made up of a Break, followed by an Auto-Baud  
Sync byte.  
1. Configure the UART for the desired mode.  
2. Set UTXEN and UTXBRK to set up the Break  
character.  
17.7.2  
BUILT-IN IRDA ENCODER AND  
DECODER  
3. Load the UxTXREG with a dummy character to  
initiate transmission (value is ignored).  
The UART has full implementation of the IrDA encoder  
and decoder as part of the UART module. The built-in  
IrDA encoder and decoder functionality is enabled  
using the IREN bit (UxMODE<12>). When enabled  
(IREN = 1), the receive pin (UxRX) acts as the input  
from the infrared receiver. The transmit pin (UxTX) acts  
as the output to the infrared transmitter.  
4. Write ‘55h’ to UxTXREG; this loads the Sync  
character into the transmit FIFO.  
5. After the Break has been sent, the UTXBRK bit  
is reset by hardware. The Sync character now  
transmits.  
2010 Microchip Technology Inc.  
DS39951C-page 185  
 复制成功!