You are on page 1of 10

DATA SHEET

PIC16F877A:
High-Performance RISC CPU:
Only 35 single-word instructions to learn
All single-cycle instructions except for program
Branches, which are two-cycle
Operating speed: DC 20 MHz clock input
DC 200 ns instruction cycle
Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM),
Up to 256 x 8 bytes of EEPROM Data Memory
Pin-out compatible to other 28-pin or 40/44-pin
PIC16CXXX and PIC16FXXX microcontrollers

Peripheral Features:
Timer0: 8-bit timer/counter with 8-bit pre scalar
Timer1: 16-bit timer/counter with pre scalar,
Can be incremented during Sleep via external
Crystal/clock
Timer2: 8-bit timer/counter with 8-bit period
Register, pre scalar and post scalar
Two Capture, Compare, PWM modules
- Capture is 16-bit, max. Resolution is 12.5 ns
- Compare is 16-bit, max. Resolution is 200 ns
- PWM max. Resolution is 10-bit
Synchronous Serial Port (SSP) with SPI
(Master mode) and I2C (Master/Slave)
Universal Synchronous Asynchronous Receiver
Transmitter (USART/SCI) with 9-bit address
Detection
Parallel Slave Port (PSP) 8 bits wide with

External RD, WR and CS controls (40/44-pin only)


Brown-out detection circuitry for
Brown-out Reset (BOR)

Analog Features:
10-bit, up to 8-channel Analog-to-Digital
Converter (A/D)
Brown-out Reset (BOR)
Analog Comparator module with:
- Two analog comparators
- Programmable on-chip voltage reference
(VREF) module
- Programmable input multiplexing from device
Inputs and internal voltage reference
- Comparator outputs are externally accessible

Special Microcontroller Features:


100,000 erase/write cycle Enhanced Flash
Program memory typical
1,000,000 erase/write cycle Data EEPROM
Memory typical
Data EEPROM Retention > 40 years
Self-reprogrammable under software control
In-Circuit Serial Programming (ICSP)
Via two pins
Single-supply 5V In-Circuit Serial Programming
Watchdog Timer (WDT) with its own on-chip RC
Oscillator for reliable operation
Programmable code protection
Power saving Sleep mode
Selectable oscillator options In-Circuit Debug (ICD) via two pins

CMOS Technology:
Low-power, high-speed Flash/EEPROM
Technology

Fully static design


Wide operating voltage range (2.0V to 5.5V)
Commercial and Industrial temperature ranges
Low-power consumption

PIN DIAGRAM:

DEVICE FEATURES:

DS1307 (64x8Serial, I2C Real-Time Clock):


FEATURES:
Real-Time Clock (RTC) Counts Seconds,
Minutes, Hours, Date of the Month, Month, Day of
The week and Year with Leap-Year
Compensation Valid Up to 2100
56-Byte, Battery-Backed, General-Purpose RAM
With Unlimited Writes
I2C Serial Interface
Programmable Square-Wave Output Signal
Automatic Power-Fail Detect and Switch Circuitry
Consumes Less than 500nA in Battery-Backup
Mode with Oscillator Running
Optional Industrial Temperature Range:
-40C to +85C
Available in 8-Pin Plastic DIP or SO

Underwriters Laboratories (UL) Recognized

LCD DISPLAY:

LCD PIC Interfacing:


Interfacing between PIC and LCD can be 4-bit or 8-bit. The difference
between 4-bit and 8-bit is how data are send to the LCD. In the 8-bit mode to
write an 8-bit character to the LCD module, ASCII data is send through
the data lines DB0- DB7 and data strobe is given through the E line.
But 4-bit mode uses only 4 data lines. In this mode the 8-bit ASCII data is
divided into 2 parts which are send sequentially through data lines DB4
DB7 with its own data strobe through the E line. The idea of 4-bit
communication is to save as much pins that used to interface with LCD. The
4-bit communication is a bit slower when compared to 8-bit. The speed
difference is only minimal, as LCDs are slow speed devices the tiny speed

difference between these two modes is not significant. Thus the 4-bit mode
data transmission is most commonly used.

INTERFACING DS1307 TO PIC MICROCONTROLLER:


DS1307 is a low power serial real time clock with full binary coded decimal
(BCD) clock/calendar plus 56 bytes of NV SRAM (Non Volatile Static Random
Access Memory). Data and Address are transferred serially through
a bidirectional I2C bus. The RTC provides year, month, date, hour, minute
and second information. The end date of months is automatically adjusted
for months fewer than 31 days including leap year compensation up to year
2100. It can operate either in 24-hour format or 12-hour format with AM/PM
indicator. DS1307 comes with built-in power sensing circuit which senses
power failures and automatically switches to back up supply. The DS1307
RTC uses an external 32.768kHz Crystal Oscillator and it does not require any
external resistors or capacitors to operate.

You might also like