I hope someone can tell me what is going wrong, im fairly new to both codewarrior/c and the HCS08 family.
I'm making a LED driver on a HCS08GT32A.
I have the following method:
BUFFER_LENGTH = 4 BUFFER_HEIGHT = 10
void display_string_still(const unsigned char *str0, const unsigned char
*str, const unsigned long int time){ unsigned char disp_con[4][6] = {0}; unsigned char disp_buffer[BUFFER_LENGTH][BUFFER_HEIGHT] ={0}; unsigned char *stillptr; unsigned char *tempptr; unsigned char i; unsigned char j; unsigned char x; unsigned char y; unsigned long int time_cnt; unsigned int length_of_incomming_str; unsigned char *charptr;
length_of_incomming_str = strlen(str); for(j = 0; j < length_of_incomming_str; j++) { charptr = (unsigned char *)ascii_to_font(str[j]); for(i = 0; i < BUFFER_HEIGHT; i++) { disp_buffer[j][i] = charptr[i]; } } //fixes byte0 and byte1 for(y = 0; y < BUFFER_HEIGHT; y++) { disp_buffer[0][y] = disp_buffer[0][y] >> 1; }
for(y = 0; y < BUFFER_HEIGHT; y++) { if(disp_buffer[1][y] & 0b10000000) // MSB from byte1 becomes LSB in byte0
{ disp_buffer[0][y] = disp_buffer[0][y] | (1