|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
How can I set up the second serial port of the Dallas Semiconductor DS87c520?
Use the following register values for serial Port 1 initialization.
SCON1 = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */ TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */ WDCON |= 0x80; /* SMOD_1: double baud rate bit */ TH1 = 0x71; /* TH1: 1200 baud @ 33.00MHz */ TR1 = 1; /* TR1: timer 1 run */ TI_1 = 1; /* TI: set TI to send first char of UART */
After adding this code, you must modify the getkey and putchar functions to use the second serial port registers for I/O.
Article last edited on: 2004-06-08 11:18:42
Did you find this article helpful? Yes No
How can we improve this article?