Is there a better way of doing this:
LCDWrite("This is a test");
void LCDWrite(char *buffer) { while(*buffer) /* loop until buffer is empty */ { PortC = *buffer; /* write data to LCD data port */ LCDEnable(); /* clock the LCD to accept data */ buffer++; /* increment the pointer to the next character */ } }
This works fine but it seems that if I use this function a too many times it starts to overwrite some of my global variables I have declared in "main" for an interrupt routine I am using.
The above was written in C with Code Warrior for use on an 8 bit Freescale 68HC08 microcontroller.
Any help would be greatly appreciated!
JimG