ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Суббота
6 июля
183909
abivan (04.03.2010 12:01, просмотров: 3236)
pic24F256GA106 не могу заставить работать UART2 RX работает TX нет TX - 32 нога RP17/RF5 RPOR8: PERIPHERAL PIN SELECT OUTPUT REGISTER 8 bit 13-8 RP17R<5:0>: RP17 Output Pin Mapping bits Peripheral output number n is assigned to pin, RP17 (see Table10-3 for peripheral function numbers
TABLE 10-3:SELECTABLE OUTPUT SOURCES (MAPS FUNCTION TO OUTPUT)

Output Function Number Function  Output Name
     5                  U2TX     UART2 Transmit
RPOR8bits.RP17R = 5; /* U2TX */ 21.4.1Enabling the UART The UART module is enabled by setting the UARTEN (UxMODE<15>) bit and UTXEN (UxSTA<10>) bit. Once enabled, the UxTX and UxRX pins are configured as an output and an input, respectively, overriding the TRIS and PORT register bit settings for the corresponding I/O port pins. The UxTX pin is at logic ë1í when no transmission is taking place. Note: The UTXEN bit should not be set until the UARTEN bit has been set; otherwise, UART transmissions will not be enabled. U2MODEbits.UARTEN=1; U2STAbits.UTXEN=1; смотрю осцилографом RF5 в 3-ем состоянии стоит в TRISF5 записать 0 порт включается на выход, хотя TRIS в режиме UART не имеет значения.