Department of Computer Scien
ce and Information Engineering
National Cheng Kung University
HANEL
PROGRAMMING THE SECOND SERIAL PORT
(cont’)
Upon reset, DS89c4x0 uses Timer 1 for setting baud rate of both serial ports
¾While each serial port has its own SCON and SBUF registers, both ports can use Timer1 for setting the baud rate¾SBUF and SCON refer to the SFR registers of the first serial port
Since the older 8051 assemblers do not support this new second serial port, we need to define them in programTo avoid confusion, in DS89C4x0 programs we use SCON0 and SBUF0 for the first and SCON1 and SBUF1for the second serial ports