Hi I need to set baudrate for UART1 for p89c669. I did it like.....
void Init_Uart1() { S1STAT = 0x20 ; S1CON = 0x50 ; REN_1 = 1 ; BRGCON = 0X00 ; BRGR1 = 0x07 ; BRGR0 = 0x70 ; BRGCON = 0X01 ;
}
are they correct for BRGR1 and BRGR0?
Hi all, I did code for initialize UART1 for p89c669 with baud-rate 4800. Is it correct or anything else i need to define? can any one reply it soon? #include <REG669.H> #define FOSCCLK 11059200 void Init_Uart1() { S1STAT = 0x20 ; S1CON = 0x50 ; REN_1 = 1 ; BRGCON = 0X00 ; BRGR1 = 0X08; BRGR0 = 0xf7; BRGCON = 0X01 ; ES1R = 1 ; EA = 1 ; }