0

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
4

1 回答 1

1

我找到了答案,新的 DK5 不再支持这个库,使用它的最佳方法是转换为十六进制,然后显示如下:

/* 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);
于 2014-12-01T13:58:42.790 回答