PIC16F1847-I/SO Microchip Technology, PIC16F1847-I/SO Datasheet - Page 5

no-image

PIC16F1847-I/SO

Manufacturer Part Number
PIC16F1847-I/SO
Description
14 KB Flash, 1K Bytes RAM, 32 MHz Int. Osc, 16 I/0, Enhanced Mid Range Core 18 S
Manufacturer
Microchip Technology
Datasheets

Specifications of PIC16F1847-I/SO

Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F1847-I/SO
Manufacturer:
MICROCHIP
Quantity:
30 000
Part Number:
PIC16F1847-I/SO
0
EXAMPLE 2:
 2011-2012 Microchip Technology Inc.
Similar to Method 1, define default, minimum and maximum auto-baud (SPBRG) values. In firmware, compute a running average of
SPBRG. If the new SPBRG value falls outside the minimum or maximum limits, then use the current running average value
(Average_Baud), otherwise use the auto-baud SPBRG value and calculate a new running average.
For example, if the application runs at 9600 baud at 16 MHz then, the default SPBRG value would be (assuming 16-bit/
Asynchronous mode) 0x67. The minimum and maximum allowed values can be calculated based on the application. In this
example, a +/-5% tolerance is required, so tolerance is 0x67 * 5% = 0x05.
#define SPBRG_16BIT
const int DEFAULT_BAUD = 0x0067;
const int TOL = 0x05;
const int MIN_BAUD = DEFAULT_BAUD - TOL;
const int MAX_BAUD = DEFAULT_BAUD + TOL;
int Average_Baud;
int Integrator;
Average_Baud = DEFAULT_BAUD;
Integrator = DEFAULT_BAUD*15;
ABDEN = 1;
while (ABDEN);
Integrator+ = SPBRG_16BIT;
Average_Baud = Integrator/16;
if((SPBRG_16BIT > MAX_BAUD)||(SPBRG_16BIT < MIN_BAUD))
{
}
else
{
}
Affected Silicon Revisions
SPBRG_16BIT = Average_Baud;
Integrator+ = SPBRG_16BIT;
Average_Baud = Integrator/16;
Integrator- = Average_Baud;
A2
X
METHOD 2 – EUSART AUTO-BAUD DETECT WORK AROUND
*((*int)&SPBRG;
// define location for 16-bit SPBRG value
// Default Auto-Baud value
// Baud Rate % tolerance
// Minimum Auto-Baud Limit
// Maximum Auto-Baud Limit
// Define Average_Baud variable
// Define Integrator variable
// Set initial average Baud rate
// The running 16 count average
// Start Auto-Baud
// Wait until Auto-Baud completes
// Check if value is within limits
// If out of spec, use previous average
// If in spec, calculate the running
// average but continue using the
// Auto-Baud value in SPBRG
PIC16(L)F1847
DS80525B-page 5

Related parts for PIC16F1847-I/SO