I want to have my pic read the AD0 and save the voltage reading to eeprom and send the reading to an excel document shortly after by serial connection and append the document each time it does so. So I will take this one step at a time, so what would be the next step to have it send the data after it saves it to eeprom? I have the this much code so far:
#chip 12F683, 8 'mhz
#config OSC=INTOSC, MCLRE=off, WDT=off
#mem 256 'Chip has 256 bytes of ram
'Set the pin directions
dir GPIO.0 in
dir GPIO.1 out 'serial send line
'Initialise
DataCount = 0 'Set the EEPROM data location to 0
'Main routine
Start:
EPWrite(DataCount, ReadAD10(AN0)) 'Write a sample to the EEPROM
if DataCount = 255 then datacount = 0 'start back at beggining when EEPROM is full-16 days worth of data
DataCount += 1 'Increment EEPROM location
Wait 15 m 'Wait before taking another reading
goto start
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to have my pic read the AD0 and save the voltage reading to eeprom and send the reading to an excel document shortly after by serial connection and append the document each time it does so. So I will take this one step at a time, so what would be the next step to have it send the data after it saves it to eeprom? I have the this much code so far:
#chip 12F683, 8 'mhz
#config OSC=INTOSC, MCLRE=off, WDT=off
#mem 256 'Chip has 256 bytes of ram
'Set the pin directions
dir GPIO.0 in
dir GPIO.1 out 'serial send line
'Initialise
DataCount = 0 'Set the EEPROM data location to 0
'Main routine
Start:
EPWrite(DataCount, ReadAD10(AN0)) 'Write a sample to the EEPROM
if DataCount = 255 then datacount = 0 'start back at beggining when EEPROM is full-16 days worth of data
DataCount += 1 'Increment EEPROM location
Wait 15 m 'Wait before taking another reading
goto start