AT2402(国外英文资料).docVIP

  • 17
  • 0
  • 约1.07万字
  • 约 25页
  • 2017-07-05 发布于河南
  • 举报
AT2402(国外英文资料)

AT2402 LCM16 / 2*16 character first line 0x80 second 0xc0 00 47:59:59 / (km/h) mode 99.9kh / / 999.99kmcm 0x00-0x03: / / 24C02 storage 0x6b, 0x6d / / 0x2e, 0x05,0x06,0x07,0x20,0x3d, 0x30-0x39 to digital 0-9 / / K, M., /h, black =. //------ head -------------------------------------------------------- / / declare #include REG2051.H #include INTRINS.H #define uchar unsigned char #define uint unsigned int / / round perimeter 1.98M and members of 0.5ms 1.98* (1/0.5) *1000*10 #define girth 39600 #define girth_h 1 #define girth_l 98 SCM / / IO connection #define LCM16_IO P1 Sbit LCM16_RS = P3^0; Sbit LCM16_RW = P3^1; Sbit LCM16_EN = P3^7; Sbit AT24_SDA = P3^4; Sbit AT24_SCL = P3^5; Sbit KEY = P3^3; Sbit SIGN = P3^2; / / LCD driver function definition Void LCM_WR_CMD (uchar); / / write operation command Void LCM_WR_DAT (uchar); / / write data Void LCM_WR (uchar, uchar); / / the output of a character Void LCM_WR_STR (uchar, uchar*); / / output string Void LCM_CUSTOM_CHAR (uchar, uchar, uchar, uchar, uchar, uchar, uchar, uchar); / / custom character / / storage IC drive function definition Uchar AT24_RD (uchar); / / read a byte of data from the 24C02 address in address Void AT24_WR (uchar, uchar); / / write a byte of data to the 24C02 address address in info / / function definition Void _init (void); / / hardware initialization Void _nus (uchar); //us delay Void _nms (uchar); //ms delay Void mile_show (void); / / distance data output Void AT24_WRAMD (void); //24c02 writes to the RAM data / / variable definition Uchar d_var[4]={0,0,0,0}; / / cm value 0x00-0x03 dual distance calculation Uint timeJ; / / the number of time periods Uint int_tp; / / the number of transfer cycle Bit flg_cal; / / allow calculation Uchar SJ; //s indicating count Uchar SVJ; //save Uchar timeI; / / external interrupt number Uchar t_var[3]={0,0,0}; / / time variable Uchar times; //1s cycle count Bit flg_s; //s flag bit //---- ----------------------------------------------------- interrupt //50

文档评论(0)

1亿VIP精品文档

相关文档