ÄãµÄλÖ㺠Ê×Ò³ > ¼¼Êõ·þÎñ >
µãÕóÒº¾§ÆÁ¼¼Êõ·þÎñ

¶ÎÂëLCDÒº¾§ÆÁÇý¶¯·½·¨

·¢²¼Ê±¼ä£º16-12-16

Éú»îÖÐСµçÆ÷¼ûµ½×î¶àµÄlcdÄ£×é¾ÍÊǶÎÂëlcdÒº¾§ÆÁ£¬¶ÎÂëlcdÓÐÆÕͨµÄÊýÂë¹ÜµÄÌØÕ÷£¬ÓÖÓеãÕóLCDµÄÌØÕ÷£¬¹Ì¶¨µÄͼÐΣ¬ÓŵãÊÇÊ¡³É±¾¶øÓкÿ´£¬ÄÇô ¶ÎÂëLCDÒº¾§ÆÁÊÇÔõôÇý¶¯µÄÄØ£¿ÏÂÃæÎÒÃǾÍÀ´¼òµ¥Á˽âһϣº
       Ê×ÏÈ£¬²»ÒªÒÔΪÓõ¥Æ¬»úÀ´Çý¶¯¾ÍÒÔΪ¶ÎÂëÆÁÊÇÖ±Á÷Çý¶¯µÄ£¬Æäʵ£¬¶ÎÂëÆÁÊǽ»Á÷Çý¶¯£¬Ê²Ã´Êǽ»Á÷£¿¾ØÐ⨣¬ÕýÏÒ²¨µÈ¡£´ó¼Ò¿ÉÄܻᾭ³£ÓÃÇý¶¯Ð¾Æ¬À´Í棬Àý
ÈçHT1621µÈ£¬µ«ÊÇÓÐЩ¶ÎʽÆÁIO¿Ú±È½ÏÉÙ£¬»òÕß˵IO¿Ú³ä×ãµÄÇé¿öÏ£¬Ò²¿ÉÒÔʡȥд¿ØÖÆÆ÷µÄÇý¶¯ÁË¡£Ó뵥Ƭ»ú½Ó¿Ú·½±ã£¬¶øºóÕßÇý¶¯µçÁ÷С£¬¹¦ºÄµÍ¡¢ÊÙÃü³¤¡¢×ÖÐÎÃÀ¹Û¡¢ÏÔʾÇåÎú¡¢ÊӽǴó¡¢Çý¶¯·½Ê½Áé»î¡¢Ó¦Óù㷺¡¾1¡¿¡£µ«ÔÚ¿ØÖÆÉÏLCD½Ï¸´ÔÓ£¬ÒòΪLCDµç¼«Ö®¼äµÄÏà¶ÔµçѹֱÁ÷ƽ¾ùÖµ±ØÐëΪ0¡¾2¡¿£¬·ñÔòÒ×ÒýÆðLCDÑõ»¯£¬Òò´ËLCD²»Äܼòµ¥µØÓõçƽÐźſØÖÆ£¬¶øÒªÓÃÒ»¶¨²¨Ðεķ½²¨ÐòÁÐÀ´¿ØÖÆ¡£LCDÏÔʾÓо²Ì¬ºÍʱ·Ö¸îÁ½ÖÖ·½
ʽ£¬Ç°Õß¼òµ¥£¬µ«ÊÇÐèÒª½Ï¶àµÄ¿ÚÏߣ»ºóÕ߸´ÔÓ£¬µ«ËùÐè¿ÚÏß½ÏÉÙ£¬ÕâÁ½ÖÖ·½Ê½Óɵ缫ÒýÏßµÄÑ¡Ôñ·½Ê½È·¶¨¡£ÏÂÃæÒÔµç×Ó±íµÄÒº¾§ÏÔʾΪÀý,СʱµÄ¸ßλͬʱÃð»òÁÁ£¬·ÖÖӵĸßλÔÚÏÔʾÊýÂë1¡«5ʱ£¬Æ䶥²¿ºÍµ×²¿Ò²ÊÇͬʱÃð»òÁÁ£¬Á½¸ödotµãÒ²ÊÇͬʱÁÁ»òÃð£¬ÆäÇý¶¯·½Ê½ÊÇÆ«ÖñÈΪ1/2µÄʱ·Ö¸îÇý¶¯£¬¹²ÓÐ11¸ö¶Îµç¼«ºÍÁ½¸ö¹«¹²µç¼«¡£
µ«ÊÇ£¬IOÄ£ÄâÇý¶¯¶ÎʽҺ¾§ÓÐÒ»¸öÇ°ÌáÌõ¼þ£¬¾ÍÊÇIO±ØÐëÊÇÈý̬£¬
Ϊʲô£¿ÏÂÃæÎÒÃÇÒ»ÆðϸϸµÀÀ´£º
       µÚÒ»²½£¬¶ÎÂëʽҺ¾§ÆÁµÄÖØÒª²ÎÊý£º¹¤×÷µçѹ£¬ Õ¼¿Õ±È£¬ ƫѹ±È¡£ÕâÈý¸ö²ÎÊý·Ç³£ÖØÒª£¬±ØÐ붼ҪÂú×ã¡£
       µÚ¶þ²½£¬Çý¶¯·½Ê½£º¸ù¾Ý LCD µÄÇý¶¯Ô­Àí¿ÉÖª£¬LCD ÏñËصãÉÏÖ»ÄܼÓÉÏ AC µçѹ£¬LCD ÏÔʾÆ÷µÄ¶Ô±È¶ÈÓÉ COM½ÅÉϵĵçѹֵ¼õÈ¥ SEG ½ÅÉϵĵçѹֵ¾ö¶¨£¬µ±Õâ¸öµçѹ
²î´óÓÚ LCD µÄ±¥ºÍµçѹ¾ÍÄÜ´ò¿ªÏñËص㣬СÓÚ LCD ãÐÖµµçѹ¾ÍÄܹرÕÏñËص㣬LCD ÐÍ MCU ÒѾ­ÓÉÄÚ½¨µÄ LCD Çý¶¯µç·×Ô¶¯²úÉú LCD Çý¶¯Ðźţ¬Òò´ËÖ»Òª I/O ¿ÚÄÜ·ÂÕæÊä
³ö¸ÃÇý¶¯Ðźţ¬¾ÍÄÜÍê³É LCD µÄÇý¶¯¡£
      ¶ÎÂëʽҺ¾§ÆÁÄ»Ö÷ÒªÓÐÁ½ÖÖÒý½Å£¬COM£¬SEG£¬¸úÊýÂë¹ÜºÜÏñ£¬µ«ÊÇ£¬Ñ¹²î±ØÐëÊǽ»Ìæ±ä»¯£¬ÀýÈçµÚһʱ¿ÌÊÇÕýÏòµÄ3V£¬ÄÇôµÚ¶þʱ¿Ì±ØÐëÊÇ·´ÏòµÄ3V£¬×¢ÒâÒ»µã£¬Èç¹û
¸ø¶ÎÂëʽҺ¾§ÆÁֱͨÁ÷µç£¬²»Óöà¾ÃÆÁÄ»¾Í»á·ÏÁË£¬ËùÒÔǧÍò×¢Òâ¡£ÏÂÃæÎÒÃÇÀ´¿¼ÂÇÈçºÎÄ£ÄâCOM¿ÚµÄ²¨ÐΣ¬ÒÔ1/4D£¬1/2BΪÀý×Ó£º
 
ֻҪģÄâ³öÒÔÉϲ¨ÐΣ¬Òº¾§ÆÁÒѾ­³É¹¦ÁËÒ»´ó°ëÁË¡£
 
1. void display_sub(u8 y)              //lcd display subroutine
2. {
3.         switch(y)                              //4*com,VDD and -VDD LCD display,so 8 timebase interrupt one sacn period
4.         {
5.                 case 1:
6.                         {com1_output_high();break;}
7.                 case 2:
8.                         {com1_output_low();break;}
9.                 case 3:
10.                         {com2_output_high();break;}
11.                 case 4:
12.                         {com2_output_low();break;}
13.                 case 5:
14.                         {com3_output_high();break;}
15.                 case 6:
16.                         {com3_output_low();break;}
17.                 case 7:
18.                         {com4_output_high();break;}
19.                 case 8:
20.                         {com4_output_low();break;}
21.                 default:
22.                         {LCDPluseStep=0;
23.                          get_display_code(AD_Value,KeyScanRetVal);
24.                          break;}
25.         }
26. }
ÈëÒÔÉÏ´úÂëËùʾ£¬¶¨Ê±2ms£¬ÈÃ4¸öCOM½»ÌæÊä³ö²¨Ðμ´¿É¡£
ͬʱÎÒÃÇҪעÒ⣬ÔÚCOMÊä³ö¸ßµÄʱºò£¬Èç¹ûÒªÆÁÄ»ÁÁ£¬SEG¾ÍÒªÊä³öµÍ£¬ÄÇôÔÚCOMÊä³öµÍµÄʱºò£¬SEG¾ÍÒªÊä³ö¸ß£¬±£Ö¤COMºÍSEGµÄѹ²î´óÓÚ1/2B¹¤×÷µçѹ¾Í¿ÉÒÔÏÔʾÁË
ÏÂÃæÎÒÃÇ¿´ÆäÖÐÒ»¸öcom¿ÚÊä³öʱµÄº¯Êý
1. static void seg1_output(void)                        //seg1 output subroutine
2. {
3.         if(1 == (LCDPluseStep%2))                        //com_pulse is odd,com output high (VDD)
4.         {
5.                 if(0 == (DisplayCode1&0x10))
6.                 {SEG1=1;}
7.                 else
8.                 {SEG1=0;}
9.         }
10.         else                                        //com_pulse is even,com output low (VSS)
11.         {
12.                 if(0 == (DisplayCode1&0x10))
13.                 {SEG1=0;}
14.                 else
15.                 {SEG1=1;}
16.         }
17. }
ʱ¿ÌÈÃSEGµçƽ¸úCOMµÄµçƽ·´Ïò£¬ÄÇôÇý¶¯¶ÎʽҺ¾§¾Í»ù±¾Éϳɹ¦ÁË¡£
 

ÈÈÏú²úÆ·£ºµãÕóÒº¾§ÆÁ| ×Ö·ûµãÕóÒº¾§ÆÁ| ¶ÏÂëÒº¾§ÆÁ| ºÚ°×Òº¾§ÆÁ| COBµãÕóÒº¾§ÆÁ
COGµãÕóÒº¾§ÆÁ

º¼ÖÝÁ¢»Í¿Æ¼¼ÓÐÏÞ¹«Ë¾¡¡°æȨËùÓÐ ©2014 Leehon ºÚ°×Òº¾§ÆÁ:www.lcdlh.com
ÕãICP±¸09088427ºÅ-2 ¿Í·þµç»°£º0571-86684288 ÒµÎñºÏ×÷QQ£º3518470298