HT46RU66 Holtek Semiconductor Inc., HT46RU66 Datasheet - Page 37

no-image

HT46RU66

Manufacturer Part Number
HT46RU66
Description
Ht46ru66/ht46cu66 -- A/d Type 8-bit Mcu With Lcd
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
HT46RU66
Quantity:
1 000
Rev. 1.20
UCR1 register
The UCR1 register together with the UCR2 register
are the two UART control registers that are used to set
the various options for the UART function, such as
overall on/off control, parity control, data transfer bit
length etc.
Further explanation on each of the bits is given below:
PERR
The PERR flag is the parity error flag. When this
read only flag is 0 it indicates that a parity error
has not been detected. When the flag is 1 it indi-
cates that the parity of the received word is incor-
rect. This error flag is applicable only if Parity mode
(odd or even) is selected. The flag can also be
cleared by a software sequence which involves a
read to the USR status register, followed by an ac-
cess to the RXR data register.
TX8
This bit is only used if 9-bit data transfers are used,
in which case this bit location will store the 9th bit of
the transmitted data, known as TX8. The BNO bit is
used to determine whether data transfers are in
8-bit or 9-bit format.
RX8
This bit is only used if 9-bit data transfers are used,
in which case this bit location will store the 9th bit of
the received data, known as RX8. The BNO bit is
used to determine whether data transfers are in
8-bit or 9-bit format.
TXBRK
The TXBRK bit is the Transmit Break Character bit.
When this bit is 0 there are no break characters
and the TX pin operates normally. When the bit is
transmitter will send logic zeros. When equal to 1
after the buffered data has been transmitted, the
transmitter output is held low for a minimum of a
13-bit length and until the TXBRK bit is reset.
STOPS
This bit determines if one or two stop bits are to be
used. When this bit is equal to 1 two stop bits are
1 there are transmit break characters and the
37
used, if the bit is equal to 0 then only one stop bit
is used.
PRT
This is the parity type selection bit. When this bit is
equal to 1 odd parity will be selected, if the bit is
equal to 0 then even parity will be selected.
PREN
This is parity enable bit. When this bit is equal to 1
the parity function will be enabled, if the bit is equal
to 0 then the parity function will be disabled.
BNO
This bit is used to select the data length format,
which can have a choice of either 8-bits or 9-bits. If
this bit is equal to 1 then a 9-bit data length will be
selected, if the bit is equal to 0 then an 8-bit data
length will be selected. If 9-bit data length is se-
lected then bits RX8 and TX8 will be used to store
the 9th bit of the received and transmitted data re-
spectively.
UARTEN
The UARTEN bit is the UART enable bit. When the
bit is 0 the UART will be disabled and the RX and
TX pins will function as General Purpose I/O pins.
When the bit is 1 the UART will be enabled and
the TX and RX pins will function as defined by the
TXEN and RXEN control bits. When the UART is
disabled it will empty the buffer so any character re-
maining in the buffer will be discarded. In addition,
the baud rate counter value will be reset. When the
UART is disabled, all error and status flags will be
reset. The TXEN, RXEN, TXBRK, RXIF, OERR,
FERR, PERR, and NF bits will be cleared, while the
TIDLE, TXIF and RIDLE bits will be set. Other con-
trol bits in UCR1, UCR2, and BRG registers will re-
main unaffected. If the UART is active and the
UARTEN bit is cleared, all pending transmissions
and receptions will be terminated and the module
will be reset as defined above. When the UART is
re-enabled it will restart in the same configuration.
HT46RU66/HT46CU66
October 2, 2007

Related parts for HT46RU66