rajib.das
Member level 3

Hi all
I am currently working on UART coms with PIC32MX250F128D. I am also using the MCP2200 for serial coms between PC USB and PIC UART. Please see the attachments for Data Sheet.
You can see in the schematic , I am Using MC_Pin37(RC4) as Rx1 and MC_Pin38(RC5) Tx1 while I am using the UART_1 channel. I am also using MikroC pro for PIC32. My Project settings are

Used MikroC Code:
RESULT:
uart_rd is always Zero. that's mean UART_Rx is reading nothing.
and sending 250 instead of 10.(USART Terminal Having Baud Rate 9600).
I have tried lot of ideas and still remain clueless.
Please if anybody can share their experiences or few ideas will much appreciated.
Thanks
I am currently working on UART coms with PIC32MX250F128D. I am also using the MCP2200 for serial coms between PC USB and PIC UART. Please see the attachments for Data Sheet.

You can see in the schematic , I am Using MC_Pin37(RC4) as Rx1 and MC_Pin38(RC5) Tx1 while I am using the UART_1 channel. I am also using MikroC pro for PIC32. My Project settings are

Used MikroC Code:
Code:
void Initiate_UART(void){
// Unlock_IOLOCK();
pps_result1 = PPS_Mapping(_RPC4, _INPUT, _U1RX);
pps_result2 = PPS_Mapping(_RPC5, _OUTPUT, _U1TX);
// Lock_IOLOCK();
UART1_Init(56000); // Initialize UART module at 56000 bps
Delay_ms(10); // Wait for UART module to stabilize
}
//--------------------------------------in Main---------------------------------------------
void main() {
Initiate_ADC();
Initiate_LCD();
Initiate_UART();
uart_rd = 0;
//--------------------------in While loop------------------------------------------------
While(1){
uart_rd = UART1_Read(); // read the received data
Delay_ms(10);
IntToStr (uart_rd, display_Str);
Lcd_Cmd(_LCD_CLEAR); // Clear displayite text in first row
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off/ Write text in second row
Lcd_Out(1,1,"UART TEST: "); // Write text in first row
Lcd_Out(2,1,display_Str); // Write text in second row
Delay_ms(1000);
if(uart_rd = 0) UART1_Write(10);
else UART1_Write(uart_rd);
}
}
RESULT:
uart_rd is always Zero. that's mean UART_Rx is reading nothing.
and sending 250 instead of 10.(USART Terminal Having Baud Rate 9600).
I have tried lot of ideas and still remain clueless.
Please if anybody can share their experiences or few ideas will much appreciated.
Thanks
Attachments
Last edited by a moderator: