ai giúp giùm sửa lỗi khi biên dịch thì nó báo sai tốc độ baund là 9615 trong khi thiết lập truyền 9600
code
//////////////////////////////////
char uart_rd;
void main() {
ADCON1 = 0x0F; // turn off analog inputs
CMCON = 0x07; // turn off comparators
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
UART1_Write_Text("Start");
UART1_Write(10);
UART1_Write(13);
while (1) { // Endless loop
if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read(); // read the received data,
UART1_Write(uart_rd); // and send data via UART
}
}
}
cảnh báo
1509 Generated baud rate is 9615 bps (error = 0.16 percent) 123.c
email: quyenngockhanh@gmail.com
code
//////////////////////////////////
char uart_rd;
void main() {
ADCON1 = 0x0F; // turn off analog inputs
CMCON = 0x07; // turn off comparators
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
UART1_Write_Text("Start");
UART1_Write(10);
UART1_Write(13);
while (1) { // Endless loop
if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read(); // read the received data,
UART1_Write(uart_rd); // and send data via UART
}
}
}
cảnh báo
1509 Generated baud rate is 9615 bps (error = 0.16 percent) 123.c
email: quyenngockhanh@gmail.com
Comment