...
Also, I can't seem to get pointers working in C18. I am trying to have a globally addressable array of text that I can read to or write from any function. Any attempt at this has failed. Here is a snippet of where I define my variables:
Code:
char dataArray[] = "Text Array";
char *pData;
void main (void)
{
OSCCON = 0b01110000; //8MHz Clock
pData = dataArray;
Then in a later function I set:
pData = "Testing";
But when I try to pull up pData[0] I get a 0 instead of a T. Also, dataArray is still equal to text array. I've tried a combination of & and * but I just can't seem to get it. Any help would be greatly appreciated!