PIC16F874-04/PT Microchip Technology, PIC16F874-04/PT Datasheet - Page 117
![IC MCU FLASH 4KX14 EE 44TQFP](/photos/6/82/68251/c04-076_pt_sml.jpg)
PIC16F874-04/PT
Manufacturer Part Number
PIC16F874-04/PT
Description
IC MCU FLASH 4KX14 EE 44TQFP
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets
1.PIC16F616T-ISL.pdf
(8 pages)
2.PIC16F688T-ISL.pdf
(688 pages)
3.PIC16F873-04SO.pdf
(218 pages)
4.PIC16F873-04SO.pdf
(5 pages)
5.PIC16F873-04SO.pdf
(5 pages)
Specifications of PIC16F874-04/PT
Core Size
8-Bit
Program Memory Size
7KB (4K x 14)
Oscillator Type
External
Core Processor
PIC
Speed
4MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
33
Program Memory Type
FLASH
Eeprom Size
128 x 8
Ram Size
192 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Data Converters
A/D 8x10b
Operating Temperature
0°C ~ 70°C
Package / Case
44-TQFP, 44-VQFP
Controller Family/series
PIC16F
No. Of I/o's
33
Eeprom Memory Size
128Byte
Ram Memory Size
192Byte
Cpu Speed
4MHz
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC16F874-04/PT
Manufacturer:
MICROCHIP
Quantity:
4 500
Company:
Part Number:
PIC16F874-04/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
- PIC16F616T-ISL PDF datasheet
- PIC16F688T-ISL PDF datasheet #2
- PIC16F873-04SO PDF datasheet #3
- PIC16F873-04SO PDF datasheet #4
- PIC16F873-04SO PDF datasheet #5
- Current page: 117 of 688
- Download datasheet (3Mb)
7.5
7.6
1997 Microchip Technology Inc.
Reading the EEPROM Data Memory
Writing to the EEPROM Data Memory
To read a data memory location, the user must write the address to the EEADR register and then
set control bit RD (EECON1<0>). The data is available, in the very next instruction cycle, in the
EEDATA register; therefore it can be read by the next instruction. EEDATA will hold this value until
another read or until it is written to by the user (during a write operation).
Example 7-1: Data EEPROM Read
To write an EEPROM data location, the user must first write the address to the EEADR register
and the data to the EEDATA register. Then the user must follow a specific sequence to initiate the
write for each byte.
Example 7-2: Data EEPROM Write
The write will not initiate if the above sequence is not exactly followed (write 55h to EECON2,
write AAh to EECON2, then set WR bit) for each byte. We strongly recommend that interrupts be
disabled during this code segment.
Additionally, the WREN bit in EECON1 must be set to enable write. This mechanism prevents
accidental writes to data EEPROM due to errant (unexpected) code execution (i.e., lost pro-
grams). The user should keep the WREN bit clear at all times, except when updating EEPROM.
The WREN bit is not cleared by hardware
After a write sequence has been initiated, clearing the WREN bit will not affect this write cycle.
The WR bit will be inhibited from being set unless the WREN bit is set.
At the completion of the write cycle, the WR bit is cleared in hardware and the EE Write Complete
Interrupt Flag bit (EEIF) is set. The user can either enable this interrupt or poll this bit. EEIF must
be cleared by software.
Sequence
Required
BCF
MOVLW
MOVWF
BSF
BSF
BCF
MOVF
STATUS, RP0
CONFIG_ADDR
EEADR
STATUS, RP0
EECON1, RD
STATUS, RP0
EEDATA, W
BSF
BCF
BSF
MOVLW
MOVWF
MOVLW
MOVWF
BSF
BSF
Section 7. Data EEPROM
; Bank0
; Any location in Data EEPROM memory space
; Address to read
; Bank1
; EE Read
; Bank0
; W = EEDATA
STATUS, RP0
INTCON, GIE
EECON1, WREN ; Enable Write
55h
EECON2
AAh
EECON2
EECON1,WR
INTCON, GIE
; Bank1
; Disable INTs.
;
; 55h must be written to EECON2
;
; Write AAh
; Set WR bit begin write
; Enable INTs.
to start write sequence
DS31007A-page 7-5
7
Related parts for PIC16F874-04/PT
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC16F874-20/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04I/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-20I/PT](/photos/6/82/68251/c04-076_pt_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-20I/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-20/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04I/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,QFP,44PIN,PLASTIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-20I/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04I/PT](/photos/6/82/68251/c04-076_pt_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44TQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44MQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-20I/PQ](/photos/6/59/65984/150-44-pqfp_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44-MQFP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-10E/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 40DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-10E/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44PLCC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16F874-04E/L](/photos/6/63/66325/150-44-plcc_tmb.jpg)
Part Number:
Description:
IC MCU FLASH 4KX14 EE 44PLCC
Manufacturer:
Microchip Technology
Datasheet: