PIC16F913T-I/SS Microchip Technology, PIC16F913T-I/SS Datasheet - Page 134

no-image

PIC16F913T-I/SS

Manufacturer Part Number
PIC16F913T-I/SS
Description
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,SSOP,28PIN,PLASTIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F913T-I/SS

Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LCD, POR, PWM, WDT
Number Of I /o
24
Program Memory Size
7KB (4K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PIC16F913/914/916/917/946
9.2
The Baud Rate Generator (BRG) is an 8-bit timer that
is dedicated to the support of both the asynchronous
and synchronous AUSART operation.
The SPBRG register determines the period of the free
running baud rate timer. In Asynchronous mode the
multiplier of the baud rate period is determined by the
BRGH bit of the TXSTA register. In Synchronous mode,
the BRGH bit is ignored.
Table 9-3 contains the formulas for determining the
baud rate. Example 9-1 provides a sample calculation
for determining the baud rate and baud rate error.
Typical baud rates and error values for various
asynchronous modes have been computed for your
convenience and are shown in Table 9-3. It may be
advantageous to use the high baud rate (BRGH = 1), to
reduce the baud rate error.
Writing a new value to the SPBRG register causes the
BRG timer to be reset (or cleared). This ensures that
the BRG does not wait for a timer overflow before out-
putting the new baud rate.
TABLE 9-3:
TABLE 9-4:
DS41250F-page 132
Legend:
RCSTA
SPBRG
TXSTA
Legend:
Name
SYNC
0
0
1
AUSART Baud Rate Generator
(BRG)
Configuration Bits
x = Don’t care, n = value of SPBRG register
x = unknown, - = unimplemented read as ‘0’. Shaded cells are not used for the Baud Rate Generator.
CSRC
SPEN
BRG7
Bit 7
BAUD RATE FORMULAS
REGISTERS ASSOCIATED WITH THE BAUD RATE GENERATOR
BRG6
Bit 6
BRGH
RX9
TX9
0
1
x
SREN
BRG5
TXEN
Bit 5
CREN
BRG4
SYNC
Bit 4
AUSART Mode
Asynchronous
Asynchronous
Synchronous
ADDEN
BRG3
Bit 3
BRGH
FERR
BRG2
EXAMPLE 9-1:
Bit 2
Calculated Baud Rate
For a device with F
of 9600, Asynchronous mode:
Solving for SPBRG:
Desired Baud Rate
OERR
TRMT
BRG1
Bit 1
Error
X
RX9D
BRG0
TX9D
Bit 0
OSC
=
=
=
=
=
=
=
RATE ERROR
CALCULATING BAUD
Calc. Baud Rate Desired Baud Rate
------------------------------------------------------------------------------------------- -
-------------------------------------------- -
Desired Baud Rate
--------------------------------------------- 1
16000000
----------------------- -
----------------------- - 1
[
-------------------------- -
64 25
9615
(
----------------------------------
© 2007 Microchip Technology Inc.
16000000
25.042
9615 9600
of 16 MHz, desired baud rate
Baud Rate Formula
9600
(
=
64
F
F
9600
F
OSC
OSC
-------------------------------------- -
64 SPBRG
0000 000x
0000 0000
0000 -010
F
OSC
+
POR, BOR
]
Value on
O S C
64
Desired Baud Rate
(
1
=
/[64 (n+1)]
/[16 (n+1)]
)
/[4 (n+1)]
F
OS C
25
)
=
+
0.16%
1
)
0000 000x
0000 0000
0000 -010
Value on
all other
Resets

Related parts for PIC16F913T-I/SS