English
Language : 

DAN-201 Datasheet, PDF (3/4 Pages) Exar Corporation – INDEPENDENT TX AND RX BAUD RATE GENERATOR
DATA COMMUNICATIONS APPLICATION NOTE
DAN 201
3.3 TX BAUD RATE IS 921.6 KBPS AND RX BAUD RATE IS 9600 BPS WITH 14.7456 MHZ FREQUENCY
This example sets the 4X sampling rate and the default BRG prescaler value 1 for both TX and RX.
write(LCR, 0xBF);
write(EFR, 0x10);
write(LCR, 0x80);
write(DLD, 0x60);
write(DLL, 0x4);
write(DLM, 0x0);
write(DLD, 0xE0);
write(DLL, 0x80);
write(DLM, 0x1);
write(LCR, 0x3);
//EFR[4] = 1 to enable the access of DLD
//Select to configure TX baud rate generator; Select 4X sampling rate;
//Set TX baud rate to 921.6 kbps
//Select to configure RX baud rate generator; Select 4X sampling rate;
//Set RX baud rate to 9600 bps
//Set data format 8 data bit and 1 stop bit
3.4 TX BAUD RATE IS 921.6 KBPS AND RX BAUD RATE IS 9600 BPS WITH 24 MHZ FREQUENCY
This example sets the 4X sampling rate and the BRG prescaler value 4 for both TX and RX.
write(LCR, 0xBF);
write(EFR, 0x10); //EFR[4] = 1 to enable the access of DLD
write(LCR, 0x80);
write(MCR, 0x80); //Set prescaler to 4
write(DLD, 0x6A); //Select to configure TX baud rate generator; Select 4X sampling rate;
write(DLL, 0x1); //Set TX baud rate to 921.6 Kbps
write(DLM, 0x0);
write(DLD, 0xE0); //Select to configure RX baud rate generator; Select 4X sampling rate;
write(DLL, 0x80); //Set RX baud rate to 9600 bps
write(DLM, 0x1);
write(LCR, 0x3); //Set data format 8 data bit and 1 stop bit
3.5 TX BAUD RATE IS 921.6 KBPS AND RX BAUD RATE IS 9600 BPS WITH 14.7456 MHZ FREQUENCY
This example sets the 4X sampling rate for the TX and 8X sampling rate for the RX while the default BRG
prescaler value 1 for both TX and RX.
write(LCR, 0xBF);
write(EFR, 0x10);
write(LCR, 0x80);
write(DLD, 0x60);
write(DLL, 0x4);
write(DLM, 0x0);
write(DLD, 0xD0);
write(DLL, 0xC0);
write(DLM, 0x0);
write(LCR, 0x3);
//EFR[4] = 1 to enable the access of DLD
//Select to configure TX baud rate generator; Select 4X sampling rate;
//Set TX baud rate to 921.6 kbps
//Select to configure RX baud rate generator; Select 4X sampling rate;
//Set RX baud rate to 9600 bps
//Set data format 8 data bit and 1 stop bit
3