我试图在LCD上显示ASCII,我使用的是DE2-70板和使用Altera DE2功能库的Handel-C。这是我正在编译的代码:
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);
}
我按照文档中的所有步骤操作,并始终收到此错误:
undefined width for all used variables sp@ H@e .....etc
答案 0 :(得分: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);