|
單片機型號msp430F247功能已驗證
單片機源程序如下:
- #include "data.h"
- void main(void)
- {
- WDTCTL = WDTPW +WDTHOLD; // 關(guān)閉看門狗
- InitClock();
- P6DIR = 0xFF; //設(shè)置為輸出
- P6OUT = 0xFF; //低電平
- P4DIR |= 0xFF;
- initNokia5110(); /* NOkia 5110 初始化 */
- clearNokia5110(); /* 清除屏幕 整屏清空 */
- Display_string(5,0,"zzYL:"); /* 寫字符 x 設(shè)置顯示字符的X位置 ; y 設(shè)置顯示字符的Y位置 *s 顯示字符的首地址 */
- Display_string(0,4,"MMDBD./,lo3"); /* 寫字符 x 設(shè)置顯示字符的X位置 ; y 設(shè)置顯示字符的Y位置 *s 顯示字符的首地址 */
- Display_string(0,2,"1369548***");
- //Display_char(0,3,'h');
- //DisPlay_HZ(1,1,"單");
- //Display_HZ16(0,1,0);
- //Display_HZ16(3,1,1);
- Display_char(0,5,'L');
- Display_char(1,5,'M');
- Display_char(2,5,'O');
- Display_char(3,5,'V');
- Display_num(0,0,7); // 寫數(shù)字
- while(1)
- {
- P4OUT = 0x00;
- delay_ms(1000);
- P4OUT = 0x38;
- delay_ms(1000);
- Display_char(3,0,'h');
-
- }
- }
復(fù)制代碼
所有資料51hei提供下載:
Nokia_5110_msp430.rar
(153.41 KB, 下載次數(shù): 11)
2019-8-7 10:53 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|
|