Say I want to write this 256 bytes of data to the eeprom of a 16F876A.
$3C,$F0,$C0,$03,$04,$08,$3F,$FC
$42,$08,$21,$04,$0C,$8C,$20,$82
$81,$04,$12,$08,$14,$4A,$20,$81
$81,$04,$02,$C8,$24,$49,$20,$81
$81,$04,$02,$C8,$C4,$48,$20,$81
$81,$04,$02,$08,$04,$88,$20,$82
$81,$04,$02,$08,$04,$08,$3F,$FC
$81,$04,$C2,$0B,$04,$08,$20,$C0
$81,$04,$22,$0C,$04,$08,$20,$A0
$81,$04,$12,$08,$04,$08,$20,$90
$81,$04,$12,$C8,$04,$08,$20,$88
$81,$04,$12,$C8,$04,$08,$20,$84
$81,$04,$12,$08,$04,$08,$20,$82
$42,$08,$21,$04,$04,$08,$20,$81
$3C,$F0,$C0,$03,$04,$00,$20,$81
$00,$00,$00,$00,$00,$00,$00,$00
$00,$00,$00,$00,$00,$00,$00,$00
$7F,$F8,$03,$0F,$80,$0F,$3F,$3E
$80,$04,$80,$10,$40,$88,$20,$41
$80,$04,$40,$20,$20,$48,$20,$80
$80,$04,$40,$20,$13,$48,$20,$80
$80,$04,$40,$20,$13,$48,$20,$80
$80,$08,$40,$20,$10,$88,$20,$80
$40,$10,$40,$20,$10,$08,$3F,$40
$3C,$20,$40,$20,$10,$08,$20,$3C
$02,$40,$40,$20,$10,$08,$20,$02
$01,$80,$40,$20,$10,$08,$20,$01
$01,$00,$41,$20,$13,$08,$20,$01
$01,$00,$42,$20,$13,$08,$20,$01
$81,$00,$42,$20,$20,$08,$20,$01
$42,$00,$9A,$10,$40,$08,$20,$82
$3C,$00,$1A,$0F,$80,$0F,$20,$7C
How would this block sit in the code space? Surely not 32 variables defined and then these 32 lines. If it needs 32 lines then its as simple as incrementing the write command with a for loop. The manual says each eeprom write is 10ms long. Does that mean writing all 256 bytes takes 320ms?
Bookmarks