新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 最后算是搞定12232單片機(jī)驅(qū)動(dòng)了

最后算是搞定12232單片機(jī)驅(qū)動(dòng)了

作者: 時(shí)間:2016-11-29 來源:網(wǎng)絡(luò) 收藏
還是那個(gè)89C52和12232的組合。但是這個(gè)12232沒有Datasheet。最后我還是靠自己的分析能力和對(duì)賣家資料那么一點(diǎn)點(diǎn)的信任(現(xiàn)在看來是錯(cuò)誤的)搞定(?)了這個(gè)的驅(qū)動(dòng)。

現(xiàn)在我一直找不到方法讓這個(gè)玩意顯示下半屏?,F(xiàn)在上半屏顯示什么,下半屏就跟著顯示。我暈……

本文引用地址:http://m.butianyuan.cn/article/201611/323414.htm

不過至少靠前面兩個(gè)程序的幫助顯示出了可以辨認(rèn)的字符。

不過說道這個(gè)倒讓我說一下,我的P0口上的上拉電阻貌似掛掉了,結(jié)果導(dǎo)致我顯示漢字老是掉筆畫,很奇怪,嘗試了用NE555/4046產(chǎn)生的時(shí)鐘信號(hào)驅(qū)動(dòng)CLK端均未成功。結(jié)果加上上拉電阻就好了。

這個(gè)是上次的驅(qū)動(dòng)http://www.51hei.com/mcu/1560.html 效果好像更好些了

上顯示效果圖:


上程序(還是3/4成品,我得看看怎么著讓下半屏亮起來):
完整的源代碼下載:http://www.51hei.com/f/12232de.rar

/*------*FILE main.c* 測(cè)試驅(qū)動(dòng)12232*/#include #include //#define DEBUG#ifdef DEBUG#include #endif/*-----DEVICE IO Pin map.* NMTB-S000389FGHSAY-A* 死馬當(dāng)活馬醫(yī)吧!?。? 時(shí)序68 series 	*///仿二進(jìn)制賦值#define  HEX__(n)   0x##n##UL#define  B8__(x)   ( (x & 0x0000000FUL) ? 1:0 )+( (x & 0x000000F0UL) ? 2:0 )+( (x & 0x00000F00UL) ? 4:0 )+( (x & 0x0000F000UL) ? 8:0 )+( (x & 0x000F0000UL) ? 16:0 )+( (x & 0x00F00000UL) ? 32:0 )+( (x & 0x0F000000UL) ? 64:0 )+( (x & 0xF0000000UL) ? 128:0 )#define  B8(x)                                     ((unsigned char)B8__(HEX__(x)))#define  B16(x_msb,x_lsb)                (((unsigned int)B8(x_msb)<<8) + B8(x_lsb))#define  B32(x_msb,x_2,x_3,x_lsb)   (((unsigned long)B8(x_msb)<<24) + ((unsigned long)B8(x_2)<<16) + ((unsigned long)B8(x_3)<<8) + B8(x_lsb))#define TH		0xFE#define TL		0x40//2K定時(shí)器值#define LCD_RESET        0xE2    //復(fù)位 #define LCD_DISPLAY_ON	 0xAF    //顯示開 #define LCD_DISPLAY_OFF	 0xAE	 //顯示關(guān) #define LCD_PS_ON   	 0xA5    //節(jié)電驅(qū)動(dòng)    #define LCD_PS_OFF  	 0xA4	 //正常驅(qū)動(dòng) #define LCD_DUTY16       0xA8    //占空比1/16 #define LCD_DUTY32       0xA9	 //占空比1/32 #define LCD_END          0xEE #define LCD_RWMODE       0xE0 #define LCD_LINE0        0xC0     //開始行 #define LCD_PAGE0        0xB8     //開始頁(yè) #define LCD_COLUMN0      0x00	  //開始列 #define Both_Write_Cmd(cmd) LCD_Write(0,0,cmd);LCD_Write(1,0,cmd)#define Both_Write_Data(dat) LCD_Write(0,1,dat);LCD_Write(1,1,dat)#define CLK		P1_3#define RESET	P1_6#define A0		P1_0#define E1		P1_2#define E2		P1_1#define LCD_RD		P1_4	#define LCD_WR		P1_5	#define DATA	P0//渣字庫(kù),從16x8轉(zhuǎn)到8x8unsigned char __code ASCII[][8]={{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x0,0x0,0xE,0xFF,0xFF,0xE,0x0,0x0},{0x0,0x3,0x7,0x0,0x0,0x7,0x3,0x0},{0x8,0xFE,0xFE,0x8,0xFE,0xFE,0x8,0x0},{0xE,0x9F,0x91,0x91,0x91,0xF3,0x66,0x0},{0x8C,0xC,0x40,0x60,0x30,0x98,0x8C,0x0},{0x60,0xF6,0x9F,0xB9,0x6F,0xF6,0x90,0x0},{0x0,0x4,0x7,0x3,0x0,0x0,0x0,0x0},{0x0,0x0,0x7C,0x7E,0x83,0x81,0x0,0x0},{0x0,0x0,0x81,0x83,0x7E,0x7C,0x0,0x0},{0x20,0x28,0x78,0x70,0x70,0x78,0x28,0x20},{0x0,0x20,0x20,0x78,0x78,0x20,0x20,0x0},{0x0,0x0,0x0,0x80,0x80,0x0,0x0,0x0},{0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x0},{0x0,0x0,0x0,0x80,0x80,0x0,0x0,0x0},{0x80,0x0,0x40,0x60,0x30,0x18,0xC,0x0},{0x7C,0x7E,0x83,0xB1,0x83,0x7E,0x7C,0x0},{0x0,0x84,0x86,0xFF,0xFF,0x80,0x80,0x0},{0x82,0xC3,0xE1,0xB1,0x99,0x8F,0x86,0x0},{0x2,0x83,0x91,0x91,0x91,0xFF,0x6E,0x0},{0x30,0x38,0x2C,0xA6,0xFF,0xFF,0xA0,0x0},{0x1F,0x9F,0x91,0x91,0x91,0xF1,0x61,0x0},{0x7C,0xFE,0x93,0x91,0x91,0xF0,0x60,0x0},{0x3,0x3,0xC1,0xE1,0x31,0x1F,0xF,0x0},{0x6E,0xFF,0x91,0x91,0x91,0xFF,0x6E,0x0},{0xE,0x9F,0x91,0x91,0x91,0x7F,0x7E,0x0},{0x0,0x0,0x0,0xC,0xC,0x0,0x0,0x0},{0x0,0x0,0x80,0x8C,0xC,0x0,0x0,0x0},{0x0,0x20,0x70,0x58,0xC,0x86,0x82,0x0},{0x0,0x48,0x48,0x48,0x48,0x48,0x48,0x0},{0x0,0x82,0x86,0xC,0x58,0x70,0x20,0x0},{0x6,0x7,0x1,0xF1,0xF9,0xF,0x6,0x0},{0x7C,0xFE,0x82,0xF2,0xF2,0xFE,0x7C,0x0},{0xF8,0xFC,0x26,0x23,0x26,0xFC,0xF8,0x0},{0x81,0xFF,0xFF,0x91,0x91,0xFF,0x6E,0x0},{0x7C,0x7E,0x83,0x81,0x81,0x83,0x6,0x0},{0x81,0xFF,0xFF,0x81,0x83,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40,0xE8,0xA8,0xA8,0x78,0xF0,0x80,0x0},{0x1,0xFF,0xFF,0x88,0x98,0xF0,0x60,0x0},{0x70,0xF8,0x88,0x88,0x88,0x98,0x10,0x0},{0x60,0xF0,0x98,0x89,0x7F,0xFF,0x80,0x0},{0x70,0xF8,0xA8,0xA8,0xA8,0xB8,0x30,0x0},{0x90,0xFE,0xFF,0x91,0x3,0x6,0x0,0x0},{0x70,0xF8,0x88,0x88,0xF0,0xF8,0x8,0x0},{0x81,0xFF,0xFF,0x10,0x8,0xF8,0xF0,0x0},{0x0,0x0,0x88,0xFB,0xFB,0x80,0x0,0x0},{0x0,0x0,0x0,0x0,0x8,0xFB,0xFB,0x0},{0x81,0xFF,0xFF,0x60,0x70,0x98,0x88,0x0},{0x0,0x0,0x81,0xFF,0xFF,0x80,0x0,0x0},{0xF8,0xF8,0x18,0x70,0x18,0xF8,0xF0,0x0},{0x8,0xF8,0xF0,0x8,0x8,0xF8,0xF0,0x0},{0x70,0xF8,0x88,0x88,0x88,0xF8,0x70,0x0},{0x8,0xF8,0xF0,0x88,0x88,0xF8,0x70,0x0},{0x70,0xF8,0x88,0x88,0xF0,0xF8,0x8,0x0},{0x88,0xF8,0xF0,0x98,0x8,0x38,0x30,0x0},{0x10,0xB8,0xE8,0xC8,0xC8,0x98,0x10,0x0},{0x8,0x8,0x7E,0xFF,0x88,0x88,0x0,0x0},{0x78,0xF8,0x80,0x80,0x78,0xF8,0x80,0x0},{0x0,0x78,0x78,0x80,0x80,0x78,0x78,0x0},{0x78,0xF8,0x80,0x60,0x80,0xF8,0x78,0x0},{0x88,0x98,0x70,0x60,0x70,0x98,0x88,0x0},{0x78,0xF8,0x80,0x80,0x80,0xF8,0xF8,0x0},{0x98,0x98,0xC8,0xE8,0xB8,0x98,0x88,0x0},{0x0,0x10,0x10,0x7E,0xEF,0x81,0x81,0x0},{0x0,0x0,0x0,0xEF,0xEF,0x0,0x0,0x0},{0x0,0x81,0x81,0xEF,0x7E,0x10,0x10,0x0},{0x2,0x3,0x1,0x3,0x2,0x3,0x1,0x0}};
				
            
                
			
							
上一頁(yè) 1 2 3 下一頁(yè)

關(guān)鍵詞: 12232單片機(jī)驅(qū)

評(píng)論


技術(shù)專區(qū)

關(guān)閉