为什么CH454D不能自已动态显示?

为什么CH454D不能自已动态显示? 而要单片机不断的发显示数据给CH454D?

void main( void )//主程序 { UINT8 a,b; UINT8 vL[4],vH[4];

delayms(40);

#ifdef USE_CH454_KEY init();//初始化 ch454_write(0x443);//开显示键盘 #else ch454_write(0x441);//开显示 #endif

ch454_write(CH454_NO_BCD);//直接译码方式 while(1) { //发送显示命令 ch454_write( CH454_DIG0_LO | mBCD[0] ); ch454_write( CH454_DIG1_LO | mBCD[1] ); ch454_write( CH454_DIG2_LO | mBCD[2] ); ch454_write( CH454_DIG3_LO | mBCD[3] ); ch454_write( CH454_DIG4_LO | mBCD[4] ); ch454_write( CH454_DIG5_LO | mBCD[5] ); ch454_write( CH454_DIG6_LO | mBCD[6] ); ch454_write( CH454_DIG7_LO | mBCD[7] ); ch454_write( CH454_DIG0_HI | mBCD[8] ); ch454_write( CH454_DIG1_HI | mBCD[9] ); ch454_write( CH454_DIG2_HI | mBCD[10] ); ch454_write( CH454_DIG3_HI | mBCD[11] ); ch454_write( CH454_DIG4_HI | mBCD[12] ); ch454_write( CH454_DIG5_HI | mBCD[13] ); ch454_write( CH454_DIG6_HI | mBCD[14] ); ch454_write( CH454_DIG7_HI | mBCD[15] ); ch454_write(0x441);//开显示 } }

单片机主程序要这样一直给CH454发数据,发显示命令。CH454才会显示。 CH454D不能自已动态显示?


楼主,这个程序只是简单的应用,CH454本身是可以自动动态显示的,不需要单片机一直不停的发显示数据.


ch454_write( CH454_DIG0_LO | mBCD[0] ); ch454_write( CH454_DIG1_LO | mBCD[1] ); ch454_write( CH454_DIG2_LO | mBCD[2] ); ch454_write( CH454_DIG3_LO | mBCD[3] ); ch454_write( CH454_DIG4_LO | mBCD[4] ); ch454_write( CH454_DIG5_LO | mBCD[5] ); ch454_write( CH454_DIG6_LO | mBCD[6] ); ch454_write( CH454_DIG7_LO | mBCD[7] ); ch454_write( CH454_DIG0_HI | mBCD[8] ); ch454_write( CH454_DIG1_HI | mBCD[9] ); ch454_write( CH454_DIG2_HI | mBCD[10] ); ch454_write( CH454_DIG3_HI | mBCD[11] ); ch454_write( CH454_DIG4_HI | mBCD[12] ); ch454_write( CH454_DIG5_HI | mBCD[13] ); ch454_write( CH454_DIG6_HI | mBCD[14] ); ch454_write( CH454_DIG7_HI | mBCD[15] ); 这个只是给每一个位的寄存器一个显示的值,之后你要是不发数据,它就会动态扫描来显示这些数据,当你要更新要显示的内容的时候,再如此这般把要更新的数据发到相应的寄存器中,就会显示新的内容了。 例程只是给了一个最简的程序,没有加控制,你可以试着在后面加一个空死循环,这样你会发现即使单片机在空死循环里,数码管依然在显示之前发进去的内容。


呵呵!看来三楼朋友对CH454很熟悉.是的!说的没错!


只有登录才能回复,可以选择微信账号登录