AnsweredAssumed Answered

Problems setting up SCI in CW

Question asked by Kyle Anderson on Nov 24, 2008
Latest reply on Nov 26, 2008 by bigmac
CW version - 5.9 build - 2830
MCU - m68mod9s12c32 using 9s12c dev board
 
I'm trying to send commands to my LCD using SCI and I'm having trouble using it correctly.  i've tried using the processor expert, but it keeps complaining and throwing errors so I tried to set it up myself.  Heres the function i'm using.
 
Code:
void send_LCD(unsigned char *array){  int count = 0;  int i;  int dummy = 0;  count = intlen(array);  for (i = 0; i < count+1; i++) {    while (SCISR1_TDRE == 1) {      SCISR2 = 0x08;      dummy = SCISR1;      SCIDRL = array[i];    }    SCICR2_TE = 0;  }

 
array is a function of commands (254, 87, 1, 'Z') in this case.  I want to loop through and send each one once TDRE says that is ready to go.  I can't seem to get the loops to work properly, and of course, nothing happens to my LCD.  Any suggestions?  Thanks

Outcomes