PIC16CR58A Microchip Technology, PIC16CR58A Datasheet - Page 115

no-image

PIC16CR58A

Manufacturer Part Number
PIC16CR58A
Description
ROM-Based 8-Bit CMOS Microcontroller Series
Manufacturer
Microchip Technology
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16CR58A-04/P042
Manufacturer:
MOTOROLA
Quantity:
80
Steps to follow when setting up an Asynchronous
Reception:
1.
2.
3.
4.
5.
TABLE 12-7:
Address Name
0Ch
18h
1Ah
8Ch
98h
99h
Legend: x = unknown, - = unimplemented locations read as '0'. Shaded cells are not used for Asynchronous Reception.
Note 1: PSPIE and PSPIF are reserved on the PIC16C63/R63/66, always maintain these bits clear.
1997 Microchip Technology Inc.
Initialize the SPBRG register for the appropriate
baud rate. If a high speed baud rate is desired,
set bit BRGH (Section 12.1).
Enable the asynchronous serial port by clearing
bit SYNC and setting bit SPEN.
If interrupts are desired, then set enable bit
RCIE.
If 9-bit reception is desired, then set bit RX9.
Enable the reception by setting enable bit
CREN.
2: PIE1<6> and PIR1<6> are reserved, always maintain these bits clear.
PIR1
RCSTA
RCREG USART Receive Register
PIE1
TXSTA
SPBRG
REGISTERS ASSOCIATED WITH ASYNCHRONOUS RECEPTION
Baud Rate Generator Register
PSPIF
PSPIE
CSRC
SPEN
Bit 7
(1)
(1)
Bit 6
RX9
TX9
(2)
(2)
SREN
TXEN
RCIF
RCIE
Bit 5
CREN
SYNC
TXIE
Bit 4
TXIF
SSPIE CCP1IE TMR2IE
SSPIF CCP1IF
Bit 3
6.
7.
8.
9.
BRGH
FERR
Bit 2
Flag bit RCIF will be set when reception is com-
plete, and an interrupt will be generated if
enable bit RCIE was set.
Read the RCSTA register to get the ninth bit (if
enabled) and determine if any error occurred
during reception.
Read the 8-bit received data by reading the
RCREG register.
If any error occurred, clear the error by clearing
enable bit CREN.
TMR2IF
OERR
TRMT
Bit 1
TMR1IF
TMR1IE
RX9D
TX9D
Bit 0
PIC16C6X
0000 0000
0000 -00x
0000 0000
0000 0000
0000 -010
0000 0000
Value on
POR,
BOR
DS30234D-page 115
0000 0000
0000 -00x
0000 0000
0000 0000
0000 -010
0000 0000
Value on
all other
Resets

Related parts for PIC16CR58A