AVR串口128-64液晶(国外英语资料).docVIP

  • 1
  • 0
  • 约 9页
  • 2017-06-24 发布于河南
  • 举报
AVR串口128-64液晶(国外英语资料)

AVR串口128-64液晶 In A0 / * d0 port connected to D1 port connected to CS 501 LCD serial communication example, from mag16 bit host, d0 port connected to A0 (3) D1 port, connected to CS (1) B5, connect 13 B7, connect 12 Hardware connections from right to left, 1--D1, 2--, positive, 3--D0 (4--/5--/, 6~11--/) 12, 13--b7, B5, 14--, positive, 15--, 16--, positive, 17--, negative, 18--, positive CS RES A0 (WR RD DB0~DB7) serial communication line, VDD, VSS, timing, parallel port background * / #includeavr/io.h #includeutil/delay.h #define uchar unsigned char #define uint unsigned int #define A0_1 PORTD|=0x01 #define A0_0 PORTD=0xFE #define CS_1 PORTD|=0x02 #define CS_0 PORTD=0xFD #define, mosi_1, PORTB|=0x20//b5 feet #define mosi_0 PORTB=0xdf #define, clk_1, PORTB|=0x80//B7 feet #define clk_0 PORTB=0x7f Uchar const zhu[32]={/*-- words: Zhu --*/ /*--, 12; the corresponding lattice fonts: width x height =16x16 --*/ 0x40,0x60,0x58,0x4E, 0x48,0x48,0x48,0xFF, 0x48,0x48,0x48,0x48,0x48,0x40,0x40,0x00, 0x20,0x20,0x10,0x08,0x04,0x02,0x01,0xFF, 0x01,0x02,0x04,0x08,0x18,0x30,0x10,0x00}; Uchar const jun[32]={/*-- --*/ in the text: /*--, 12; the corresponding lattice fonts: width x height =16x16 --*/ 0x00,0x18,0x26,0x22,0xA2,0x72,0x2E, 0xAA, 0x22,0x22,0x22,0x32,0x22,0x0A, 0x06,0x00, 0x00,0x10,0x10,0x12,0x13,0x12,0x12,0xFF, 0x12,0x12,0x12,0x13,0x12,0x18,0x10,0x00}; Uchar const kaokaola[128]={ 32,34,35,37,38,40,41,43,44,46, 47,48,50,51,52,53,55,56,57,58, 59,59,60,61,62,62,63,63,63,64, 64,64,64,64,64,64,63,63,63,62, 62,61,60,59,59,58,57,56,55,53, 52,51,50,48,47,46,44,43,41,40, 38,37,35,34,32,30,29,27,26,24, 23,21,20,18,17,16,14,13,12,11, 9,8,7,6,5,5,4,3,2,2, 1,1,1,0,0,0,0,0,0,0, 1,1,1,2,2,3,4,5,5,6, 7,8,9,11,12,13,14,16,17,18, 20,21,23,24,26,27,29,30}; Void write (unsigned, char, data, unsigned, char, A0) { If (A0) A0_1; Else A0_0; CS_0; SPDR=data; While ((SPSR (1SPIF)); / / _delay_us (300); CS_1; } Void write_ (uchar x, uchar y, uchar date) / / to the first few pages the first few columns

文档评论(0)

1亿VIP精品文档

相关文档