標題: Nokia5110_msp430F247驅(qū)動程序 [打印本頁]

作者: leng寶    時間: 2019-8-7 10:53
標題: Nokia5110_msp430F247驅(qū)動程序
單片機型號msp430F247功能已驗證

單片機源程序如下:




  1. #include "data.h"




  2.    void main(void)
  3. {
  4.         WDTCTL = WDTPW +WDTHOLD;                // 關(guān)閉看門狗
  5.         InitClock();
  6.         P6DIR = 0xFF;                           //設(shè)置為輸出
  7.         P6OUT = 0xFF;                           //低電平
  8.         P4DIR |= 0xFF;
  9.         initNokia5110();                         /* NOkia 5110 初始化   */
  10.         clearNokia5110();                         /* 清除屏幕 整屏清空 */
  11.         Display_string(5,0,"zzYL:");   /* 寫字符 x 設(shè)置顯示字符的X位置 ; y 設(shè)置顯示字符的Y位置   *s 顯示字符的首地址 */
  12.         Display_string(0,4,"MMDBD./,lo3");   /* 寫字符 x 設(shè)置顯示字符的X位置 ; y 設(shè)置顯示字符的Y位置   *s 顯示字符的首地址 */
  13.         Display_string(0,2,"1369548***");
  14.         //Display_char(0,3,'h');
  15.         //DisPlay_HZ(1,1,"單");
  16.         //Display_HZ16(0,1,0);
  17.         //Display_HZ16(3,1,1);
  18.         Display_char(0,5,'L');
  19.         Display_char(1,5,'M');
  20.         Display_char(2,5,'O');
  21.         Display_char(3,5,'V');
  22.         Display_num(0,0,7);   // 寫數(shù)字
  23.   while(1)
  24.    {
  25.         P4OUT = 0x00;
  26.         delay_ms(1000);
  27.         P4OUT = 0x38;
  28.         delay_ms(1000);
  29.         Display_char(3,0,'h');
  30.         
  31.    }
  32. }
復制代碼

所有資料51hei提供下載:
Nokia_5110_msp430.rar (153.41 KB, 下載次數(shù): 11)







歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1