www.pudn.com > pd16682(2006).zip > port.h


#include 
#include 
/*--------дָÁî------------*/ 
 sbit RES=0x93; 
 sbit CS1=0x94; 
 sbit A0=0x95; 
 sbit SCL=0x96; 
 sbit SI=0x97; 
 void WriteCommand(unsigned char dat)  //дָÁî 
  { 
   unsigned char i; 
   for(i=0;i<8;i++) 
    { 
     CS1=0; 
     A0=0; 
     SCL=0; 
     SI=(bit)(dat&0x80); 
     _nop_(); 
     _nop_(); 
     _nop_(); 
     _nop_(); 
     _nop_(); 
     SCL=1; 
     _nop_(); 
     _nop_(); 
     dat<<=1; 
     SCL=0; 
    } 
  } 
  /*-------дÊý¾Ý----------*/ 
 void WriteData(unsigned char dat) 
 { 
   unsigned char i; 
   for(i=0;i<8;i++) 
     { 
      CS1=0; 
      A0=1; 
      SCL=0; 
      SI=(bit)(dat&0x80); 
      _nop_(); 
      _nop_(); 
      _nop_(); 
      _nop_(); 
      _nop_(); 
      SCL=1; 
      _nop_(); 
      _nop_(); 
      dat<<=1; 
      SCL=0; 
     } 
 }