今天帶大家了解數(shù)碼管的詳細(xì)段碼,,數(shù)碼管主要分共陽數(shù)碼管和共陰數(shù)碼管。區(qū)別在于其公共端是接電源還是接地,。這里我們講解共陰(共陽)數(shù)碼管的0-F不帶小數(shù)點(diǎn)段碼和0-F帶小數(shù)點(diǎn)段碼,。 共陰數(shù)碼管 1.共陰不帶小數(shù)點(diǎn)0-F段碼為:{0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; 效果如下: 2.共陰帶小數(shù)點(diǎn)0-F段碼為:{0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,0x87,0xff,0xef,0xf7,0xfc,0xb9,0xde,0xf9,0xf1}; 效果如下: ?。,。∵@里說一下,,共陰數(shù)碼管帶小數(shù)點(diǎn)也就是使dp(第八段為高電平即可點(diǎn)亮小數(shù)點(diǎn)),,所以在不帶點(diǎn)的段碼上加0x80即可得到帶小數(shù)點(diǎn)的0-F段碼,大家可以試試看,。 共陽數(shù)碼管 3.共陽不帶小數(shù)點(diǎn)0-F段碼為:{0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e}; 效果如下: 這里講一下規(guī)律,,共陽數(shù)碼管0-F的段碼大家其實(shí)可以發(fā)現(xiàn)是0xff減去共陰數(shù)碼管的段碼即可得到,舉例共陰不帶點(diǎn)數(shù)字0的段碼為0x3f,,0xff-0x3f=0xc0,,而0xc0是共陰不帶小數(shù)點(diǎn)數(shù)字0的段碼。大家可以去試試看,。 4.共陽帶小數(shù)點(diǎn)0-F段碼為:{0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10,0x08,0x03,0x46,0x21,0x06,0x0e}; 效果如下: 這里說一下,,共陽數(shù)碼管帶小數(shù)點(diǎn)也就是使dp(第八段為低電平即可點(diǎn)亮小數(shù)點(diǎn)),所以在不帶點(diǎn)的段碼上減0x80即可得到帶小數(shù)點(diǎn)的0-F段碼,,大家可以試試看,。 本人水平有限,上述信息僅供學(xué)習(xí)參考,,如有錯(cuò)誤和不妥之處,,請(qǐng)多多指教。 另外創(chuàng)作不易,,請(qǐng)勿抄襲,,如果有幫助到大家的話希望大家可以點(diǎn)個(gè)贊,,謝謝~ |
|