LCD Type MCU
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.
b 7
U A R T E N
B N O
P R E N
P R T
S T O P S
T X B R K
R X 8
b 0
T X 8
U C R 1 R e g is te r
T r a n s m it d a ta b it 8 ( w r ite o n ly )
R e c e iv e d a ta b it 8 ( r e a d o n ly )
T r a n s m it B r e a k C h a r a c te r
1 : tr a n s m it b r e a k c h a r a c te r s
0 : n o b re a k c h a ra c te rs
D e fin e s th e N u m b e r o f S to p B its
1 : tw o s to p b its
0 : o n e s to p b it
P a r ity T y p e B it
1 : o d d p a r ity fo r p a r ity g e n e r a to r
0 : e v e n p a r ity fo r p a r ity g e n e r a to r
P a r ity E n a b le B it
1 : p a r ity fu n c tio n e n a b le d
0 : p a r ity fu n c tio n d is a b le d
N u m b e r o f D a ta T r a n s fe r B its
1 : 9 - b it d a ta tr a n s fe r
0 : 8 - b it d a ta tr a n s fe r
U A R T E n a b le B it
1 : e n a b le U A R T , T X & R X p in s a s U A R T p in s
0 : d is a b le U A R T , T X & R X p in s a s I/O p o r t p in s
Further explanation on each of the bits is given below:
·
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 char-
acters and the TX pin operates normally. When the bit is
²1²
there are transmit break characters
and the 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 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.
88
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index