Thanks for the reply Darrel
I am running PBP 2.50
The WRITE command will come straight after an interrupt is triggered since it will be from a 'save' button that happens to create an interrupt but the WRITE will not happen within the interrupt itself (unless there is some way to only enable state change interrupts on just specific pins rather than the whole port? I'm new to interrupts)
i.e
Code:
repeat
LCDOUT $FE, $c0, dec val_calib, " "
If btn_up = 0 then
if val_calib <> 254 then val_calib = val_calib + 1
endif
If btn_dn = 0 then
if val_calib <> 0 then val_calib = val_calib - 1
endif
pause 1
until btn_menu = 0 'exits menu and saves value to eeprom
'Write value to eeprom here
btn_menu is on portb of a 16f628A with port change interrupts enabled.
If my brain is correctly in gear it should mean that although the interrupt will be processed, it should then process the write command AFTER the interrupt and therefore work ok provided no other interrupts are triggered.
So, i can try the WRITE then read back/confirm and see what happens but can you be a little more specific on how the DEFINE WRITE_INT works? Does that just effectively cause an interrupt while writing so that no other interrupts can fire at the same time?
Bookmarks