Download Print this page

Renesas 7542 Manual page 48

Single-chip 8-bit cmos microcomputer
Hide thumbs Also See for 7542:

Advertisement

7542 Group
[Transmit buffer register 1/receive buffer register 1 (TB1/
RB1)] 0018
16
The transmit buffer register and the receive buffer register are lo-
cated at the same address. The transmit buffer is write-only and
the receive buffer is read-only. If a character bit length is 7 bits, the
MSB of data stored in the receive buffer is "0".
[Serial I/O1 status register (SIO1STS)] 0019
The read-only serial I/O1 status register consists of seven flags
(bits 0 to 6) which indicate the operating status of the serial I/O1
function and various errors.
Three of the flags (bits 4 to 6) are valid only in UART mode.
The receive buffer full flag (bit 1) is cleared to "0" when the receive
buffer register is read.
If there is an error, it is detected at the same time that data is
transferred from the receive shift register to the receive buffer reg-
ister, and the receive buffer full flag is set. A write to the serial I/O1
status register clears all the error flags OE, PE, FE, and SE (bit 3
to bit 6, respectively). Writing "0" to the serial I/O1 enable bit SIOE
(bit 7 of the serial I/O1 control register) also clears all the status
flags, including the error flags.
Bits 0 to 6 of the serial I/O1 status register are initialized to "0" at
reset, but if the transmit enable bit of the serial I/O1 control regis-
ter has been set to "1", the transmit shift completion flag (bit 2)
and the transmit buffer empty flag (bit 0) become "1".
[Serial I/O1 control register (SIO1CON)] 001A
The serial I/O1 control register consists of eight control bits for the
serial I/O1 function.
[UART1 control register (UART1CON)] 001B
The UART1 control register consists of four control bits (bits 0 to
3) which are valid when asynchronous serial I/O is selected and
set the data format of an data transfer and one bit (bit 4) which is
always valid and sets the output structure of the P1
[Baud rate generator 1 (BRG1)] 001C
The baud rate generator determines the baud rate for serial transfer.
The baud rate generator divides the frequency of the count source
by 1/(n + 1), where n is the value written to the baud rate generator.
Rev.3.02
Oct 31, 2006
REJ03B0006-0302
16
16
16
/TxD
pin.
1
1
16
Page 48 of 134
Notes on Serial I/O1
• Serial I/O interrupt
When setting the transmit enable bit to "1", the serial I/O transmit
interrupt request bit is automatically set to "1". When not requiring
the interrupt occurrence synchronized with the transmission en-
abled, take the following sequence.
Set the serial I/O transmit interrupt enable bit to "0" (disabled).
Set the transmit enable bit to "1".
Set the serial I/O transmit interrupt request bit to "0" after 1 or
more instructions have been executed.
Set the serial I/O transmit interrupt enable bit to "1" (enabled).
• I/O pin function when serial I/O1 is enabled.
The functions of P1
and P1
2
of a serial I/O1 mode selection bit and a serial I/O1 synchronous
clock selection bit as follows.
(1) Serial I/O1 mode selection bit → "1" :
Clock synchronous type serial I/O is selected.
Setup of a serial I/O1 synchronous clock selection bit
"0" : P1
pin turns into an output pin of a synchronous clock.
2
"1" : P1
pin turns into an input pin of a synchronous clock.
2
Setup of a S
output enable bit (SRDY)
RDY1
"0" : P1
pin can be used as a normal I/O pin.
3
"1" : P1
pin turns into a S
3
RDY1
(2) Serial I/O1 mode selection bit → "0" :
Clock asynchronous (UART) type serial I/O is selected.
Setup of a serial I/O1 synchronous clock selection bit
"0": P1
pin can be used as a normal I/O pin.
2
"1": P1
pin turns into an input pin of an external clock.
2
When clock asynchronous (UART) type serial I/O is selected, it is
P1
pin. It can be used as a normal I/O pin.
3
are switched with the setting values
3
output pin.

Advertisement

loading