Ok, so far i have got this code, which works fine as far as getting the input for the port name
Code:
INCLUDE "modedefs.bas" ' Modes for SerOut
CMCON = 7 ' set portA to digital
TRISA = %00100000 ' Port A all output but MCLR
TRISB = %00001010 ' Port B all output but 1 - debug in
DEFINE DEBUGIN_REG PORTB ' Set Debug pin port
DEFINE DEBUGIN_BIT 1 ' Set Debug pin bit
DEFINE DEBUGIN_BAUD 9600 ' Set Debug baud rate
DEFINE DEBUGIN_MODE 1 ' Set Debug mode: 0 = true, 1 = inverted
DEFINE DEBUG_REG PORTB ' Set Debug pin port
DEFINE DEBUG_BIT 2 ' Set Debug pin bit
DEFINE DEBUG_BAUD 9600 ' Set Debug baud rate
DEFINE DEBUG_MODE 1 ' Set Debug mode: 0 = true, 1 = inverted
port1name var byte[8]
Main: ' Display "Waiting for input" every 5 seconds if timeout period expires
DEBUGIN 5000, idle, [STR port1name\8\13]
DEBUG "Received: ",STR port1name\8,13,10
Goto Main
idle:
DEBUG "Waiting for input"
goto main
So from here, now i need some help on how i write the byte array to the eeprom and terminate with decimal 0, and also read the strings from the eeprom, upto the decimal 0?
The byte array will need to be converted into a word? and then write highbyte and lowbyte?
Bookmarks