NE5532 发表于 2013-7-12 08:46 
波形,就是不断刷新的图片,12864的串行液晶,楼主用的是不是ST7294的主控? ... - uchar re_byte(void)
- {
- uchar re=0,i;
- P6DIR = 0x00;
- for(i=0;i<8;i++)
- {
- LCD_CLK_Low;
- delay_ms(10);
- if(P6IN&0x10)
- {
- re = re| 0x01;
- delay_ms(2);
- re <<= 1;
- }
- else
- {
- re = re| 0x00;
- delay_ms(2);
- re <<= 1;
- }
- LCD_CLK_High; //上升沿触发发送
- delay_ms(10);
- LCD_CLK_Low;delay_ms(2);
- }
- return re;
- }
- unsigned char ReadByte(void)
- {
- unsigned char byReturnValue,a ;
- delay_ms(1);
- Send_Byte(0xfe); //11111,RW(1),RS(1),0
- delay_ms(1);
- byReturnValue=re_byte() ;
- delay_ms(1);
- a=re_byte()>>4;
- byReturnValue = byReturnValue|a;
- return byReturnValue ;
- }
|