1
Web platform / Re: Serial (FT232) to USB does not work.
Code: [Select]
void UART1TX(char c){
// U1STAbits.UTXEN = 1; //Comments this line
while(U1STAbits.UTXBF == 1);
U1TXREG = c;
while(U1STAbits.TRMT== 0);
// U1STAbits.UTXEN = 0; //Commented this line
}
////////////////////////////////////////////////////////////////////////Code: [Select]
void InitializeUART1(void){
//setup UART
U1BRG = 85;//86@80mhz, 85@79.xxx=115200
U1MODE = 0;
U1MODEbits.BRGH = 1;
U1STA = 0;
U1MODEbits.UARTEN = 1;
IFS0bits.U1RXIF = 0;
U1STAbits.UTXEN = 1; //Added this line of code, precisely here. Enabling TX elsewhere does not work
}