Initially i was attempting to use Page write mode and that is why data1 is declared as an array of 64 bytes. To write each page with the read value value.
I did this to save the 10mS required to write each page and to have only one 10mS for each page.
Now i kept the declaration of the data1 as it is, i though i'm writing 64 bytes at a time, it is wrong isn't it.
What i want to do is after reading the result of the converted signal i want to store it in the EEPROM when i call getch0.
So everytime i come to getch0 with new digital data i want to store it in a different location and later read all of my stored data and display it.
My A/D is shown below:
getad:
Pauseus 50 ' Wait for channel to setup
ADCON0.0 = 1
ADCON0.2 = 1 ' Start conversion
notFinished:
Pause 5
if ADCON0.2 = 1 Then notdone 'wait for low on bit-2 of ADCON0, conversion finished
data1 = ADRESL 'move HIGH bit of result to adval
Pauseus 50 ' Wait for conversion
Return
Bookmarks