Re: FJ64GA004 RP14 選Input 不能收
|
||||
---|---|---|---|---|
新會員
|
修改加入
AD1PCFG = 0xFFFF 測ok Thanks!
發表於: 2008/7/7 1:46
|
|||
|
Re: FJ64GA004 RP14 選UART RECEIVER 不能收
|
||||
---|---|---|---|---|
版主
|
看起來你的PPS (Peripheral Pin Select) 設定上有錯,底下是我設定 PIC24FJ64GA002 的片斷:[code]
int main(void) { CLKDIVbits.RCDIV = 0; // Select Internal FRC as 8MHz, but doesn't use this moment. // ************* Peripheral Pin Select ********************* // RPINR18bits.U1RXR = 9; // Set the UART RxD input on the RP9 (pin 18) RPOR4bits.RP8R = 3; // Set the UART TxD output on the RP8 (pin 17) RPOR6bits.RP12R = 0; // Disable OC1 output, Set RP12 (pin 23) RPOR6bits.RP13R = 0; // Set the OC2 output on the RP13 (pin 24) RPOR7bits.RP14R = 0; // Set the OC3 output on the RP14 (pin 25) RPOR7bits.RP15R = 0; // Set the OC4 output on the RP15 (pin 26) AD1PCFG = 0xFFDF; // Enable AN5 (RB3,pin7)as analog input, others for digital I/O LATB = 0x0000; TRISB = 0x0FFF; // LED4(RB15) pin as output, OC1~OC3 pins as output (RP12~RP14)[/code] 有關PPS的設定請參考: http://ww1.microchip.com/downloads/en/DeviceDoc/39711b.pdf http://www.microchip.com.tw/modules/w ... lefile.php?cid=12&lid=241 http://www.microchip.com.tw/modules/w ... glefile.php?cid=12&lid=69
發表於: 2008/7/4 17:06
|
|||
|