C to Fpga error with LCD under Altera DE2-70 board

369 views Asked by At

I tried to display ASCII on the LCD, I am using a DE2-70 board and Handel-C using the Altera DE2 function library. This is the code I am compiling:

set clock = external "N2"; 
#include "DE2.hch"

void main(void) {

DE2_LCD_LINE line;

line = hex2ascii(0x1<-4) @ sp @ H @ e @ l @ l @ o @ sp @ w @ o @ r @ l @ d @ blank_line<-152;

DE2LCDDriver(line);
 }

I followed all the steps on the documentation and always get this error:

undefined width for all used variables sp@ H@e .....etc
1

There are 1 answers

0
AudioBubble On BEST ANSWER

I found the answer, this library is no more supported in the new DK5 the best way to use it is to convert to hex then display it as following:

/* Convert to HEX*/
y =5;
Unsigned 8 decode_to_hex(unsigned 4 x) 
{
}

/*Then display using */

Line = (decode_to_hex(y)<-8) @0;
DE2LCDDriver(Line);