My code looks something like as shown below, i get a converted result from the getad subroutine the put the value in data1. Then i select device, finally go to store the data. Now i'm thinking to have storePage before calling StoreData (as you told me).
The problem is i think i need to increment storePage as i come to getch0 subroutine more than once.
Can i set storePage to 0 first and second time i come to the routine 1 and so on, so that it will be updated every time getch0 is called.
Something like
storePage = storePage + 1
before calling StoreData . . .
data1 VAR BYTE [64]
getch0:
ADCON0 = $41 ' Set A/D to Fosc/8, Channel 0, On
Gosub getad ' go to the conversion routine
data1 = ADRESL ' put the digital result in data1
EE_addr = $A0 ' pass device address
Gosub StoreData
Return
. . .
Start
gosub getch0 'called 3 times
Regards,
Tom
Bookmarks