PIC12C672 MICROCHIP [Microchip Technology], PIC12C672 Datasheet - Page 79
![no-image](/images/no-image-200.jpg)
PIC12C672
Manufacturer Part Number
PIC12C672
Description
8-Pin, 8-Bit CMOS Microcontroller with EEPROM Data Memory
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
1.PIC12C672.pdf
(88 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC12C672-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC12C672-04/SM
Manufacturer:
MIC
Quantity:
141
Part Number:
PIC12C672-04/SM
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C672-04/SO
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC12C672-10E/SM
Manufacturer:
MICROCH
Quantity:
20 000
Company:
Part Number:
PIC12C672/JW
Manufacturer:
MICKO
Quantity:
2 100
;***************************************************************************
;***************************
;***************************************************************************
OK
NO
I2C_PORT
SCL
SDA
EE_OK
PC_OFFSET
EEADDR
EEBYTE
COUNTER
EEDATA
;********************** Set up EEPROM control bytes ************************
;***************************************************************************
READ_CURRENT
WRITE_BYTE
READ_RANDOM
INIT_WRITE_CONTROL
START_BIT
;******* Set up output data (control, address, or data) and counter ********
;***************************************************************************
PREP_TRANSFER_BYTE
1997 Microchip Technology Inc.
global
global
global
global
global
global
MOVLW
MOVWF
GOTO
MOVLW
GOTO
MOVLW
MOVWF
MOVLW
BCF
MOVWF
MOVLW
MOVWF
udata_ovr
udata
code
EQU
EQU
EQU
EQU
EQU
EQU
RES
res
res
res
res
READ_CURRENT
READ_RANDOM
WRITE_BYTE
EEADDR
EEDATA
PC_OFFSET
B'10000100'
PC_OFFSET
INIT_READ_CONTROL
B'10000000'
INIT_WRITE_CONTROL
B'10000011'
PC_OFFSET
B'10100000'
I2C_PORT,SDA
EEBYTE
.8
COUNTER
01H
00H
GPIO
07H
06H
07H
1
1
1
1
1
Variable Listing
; Port B control register, used for I2C
; EEPROM Clock, SCL (I/O bit 7)
; EEPROM Data,
; Bit 7 in PC_OFFSET used as OK flag for EE
; PC offset register (low order 4 bits),
;
;
; EEPROM Address
; Byte sent to or received from
; EEPROM (control, address, or data)
; Bit counter for serial transfer
; EEPROM Data
; PC offset for read current addr.
; Load PC offset
; PC offset for write byte.
; PC offset for read random.
; Load PC offset register, value preset in W
; Control byte with write bit, bit 0 = '0'
; Start bit, SDA and SCL preset to '1'
; Byte to transfer to EEPROM already in W
; Counter to transfer 8 bits
value based on operating mode of EEPROM.
Also, bit 7 used for EE_OK flag
Preliminary
****************************
SDA (I/O bit 6)
EE_OK: bit7 = '1'
EE_OK: bit7 = '1'
PIC12CE5XX
EE_OK bit7='1'
DS40172A-page 79