Hi, Boroko
Here's an example of what I usually do ...
Code:
mesure VAR WORD
duree VAR WORD
dureeprog VAR WORD
dureeral VAR WORD
dureesafe VAR WORD
echantillon VAR WORD
lastok VAR WORD
delay VAR BYTE
wrong VAR BYTE
ohoh VAR BYTE
side VAR BIT
flagbougie VAR BIT
battok VAR BIT
dejavu VAR BIT
PORTA = 0
PORTB = 0
'Pour 16F628
CMCON = 7
CCP1CON = 0
' End of Config.
'******************************************************************************
' EEPROM checking
'******************************************************************************
Read 2,dureeprog.lowbyte
Read 1,dureeprog.highbyte
Read 3,side
Read 5,dureesafe.lowbyte
Read 4,dureesafe.highbyte
Read 7,dureeral.lowbyte
Read 6,dureeral.highbyte
' Read 8,flagbougie 'Seulement si déverrouillé, sinon 0
IF ( dureeprog <> $FFFF ) AND ( dureesafe <> $FFFF ) AND ( dureeral <> $FFFF ) Then
lastok = dureesafe ' If memory programmed
flagbougie = 0 ' Start on locked position ... for safety.
GoTo locked ' Starting address
EndIF
'******************************************************************************
' Measure of programming pulse
'******************************************************************************
IF reset = 0 Then mesurepro ' If jumper ON jump to programming mode
'******************************************************************************
' Check if programming jumper ON and lock if not
'******************************************************************************
oubli:
error = 1
Pause 50
error = 0
Pause 50
GoTo oubli
'********************************************************************
mesurepro: ' Programming mode
led = 1 : error = 1
mesurepro1:
Pause 50
led = 0 : error = 0
...
...
Looks EXACTLY what Darrel told you ... no ???
Alain
Bookmarks