⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vfd.bak

📁 日本FAMILY按摩椅W-1用的配套操作器程序。带VFD显示
💻 BAK
字号:
 #define VFD_BK P2.3
 #define VFD_LAT P2.4
 #define VFD_F_CON P3.4
 #define VFD_V_CON P3.6
 #define CLK P2.2
 #define DATA P2.1
 
 #define  THREE_WIRE_MODE 0x82
 
 #define  FIX_DISP_MODE  1
 #define  LIU_DISP_MODE  0
/*********** data define ************/

#define SCAN_MAX 38
#define BYTE_MAX 18

typedef union {
               struct {                       
                       unsigned int a6:		1;
                       unsigned int c5:		1;
                       unsigned int b5:		1;
                       unsigned int a5:		1;
                       
                       unsigned int c4:		1;
                       unsigned int b4:		1;
                       unsigned int a4:		1;
                       unsigned int c3:		1;
                       
                       unsigned int b3:		1;
                       unsigned int a3:		1;
                       unsigned int c2:		1;
                       unsigned int b2:		1;
                       
                       unsigned int a2:		1;
                       unsigned int c1:		1;
                       unsigned int b1:		1;
                       unsigned int a1:		1;
                       /**** first int ****/
                       
                       unsigned int b11:    1;
                       unsigned int a11:    1;
                       unsigned int c10:	1;
                       unsigned int b10:	1;
                       
                       unsigned int a10:	1;
                       unsigned int c9:		1;
                       unsigned int b9:		1;
                       unsigned int a9:		1;
                       
                       unsigned int c8:		1;
                       unsigned int b8:		1;
                       unsigned int a8:		1;
                       unsigned int c7:		1;
                       
                       unsigned int b7:		1;
                       unsigned int a7:		1;
                       unsigned int c6:		1;
                       unsigned int b6:		1;
                       /**second int ***/
                       
                       unsigned int c16:		1;
                       unsigned int b16:		1;
                       unsigned int a16:		1;
                       unsigned int c15:		1;
                       
                       unsigned int b15:		1;
                       unsigned int a15:		1;
                       unsigned int c14:		1;
                       unsigned int b14:		1;
                       
                       unsigned int a14:		1;
                       unsigned int c13:		1;
                       unsigned int b13:		1;
                       unsigned int a13:		1;
                       
                       unsigned int c12:		1;
                       unsigned int b12:		1;
                       unsigned int a12:		1;
                       unsigned int c11:        1;
                      /*** third int  ***/
                     }abc_data;
                     unsigned int abc_arry[3];
                }A_B_C;   
   
typedef union {
               struct {
                       unsigned int f6:		1;
                       unsigned int d5:		1;
                       unsigned int e5:		1;
                       unsigned int f5:		1;
                       
                       unsigned int d4:		1;
                       unsigned int e4:		1;
                       unsigned int f4:		1;
                       unsigned int d3:		1;
                       
                       unsigned int e3:		1;
                       unsigned int f3:		1;
                       unsigned int d2:		1;
                       unsigned int e2:		1;
                       
                       unsigned int f2:		1;
                       unsigned int d1:		1;
                       unsigned int e1:		1;
                       unsigned int f1:		1;
                       /**** first int ****/
                       unsigned int e11:    1;
                       unsigned int f11:    1;
                       unsigned int d10:	1;
                       unsigned int e10:	1;
                       
                       unsigned int f10:	1;
                       unsigned int d9:		1;
                       unsigned int e9:		1;
                       unsigned int f9:		1;
                       
                       unsigned int d8:		1;
                       unsigned int e8:		1;
                       unsigned int f8:		1;
                       unsigned int d7:		1;
                       
                       unsigned int e7:		1;
                       unsigned int f7:		1;
                       unsigned int d6:		1;
                       unsigned int e6:		1;
                       
                       /**second int ***/
                       unsigned int d16:		1;
                       unsigned int e16:		1;
                       unsigned int f16:		1;
                       unsigned int d15:		1;
                       
                       unsigned int e15:		1;
                       unsigned int f15:		1;
                       unsigned int d14:		1;
                       unsigned int e14:		1;
                       
                       unsigned int f14:		1;
                       unsigned int d13:		1;
                       unsigned int e13:		1;
                       unsigned int f13:		1;
                       
                       unsigned int d12:		1;
                       unsigned int e12:		1;
                       unsigned int f12:		1;
                       unsigned int d11:        1;
                      /*** third int  ***/
                     }def_data;
                     unsigned int def_arry[3];
                }D_E_F;   
                    
/***********************************************/
/******** update:   2003-10-14 *****************/ 
 
         typedef  union
         {
                  struct{
                          unsigned int bit_16: 1;
                          unsigned int bit_15: 1;
                          unsigned int bit_14: 1;
                          unsigned int bit_13: 1;
                          unsigned int bit_12: 1;
                          unsigned int bit_11: 1;
                          unsigned int bit_10: 1;
                          unsigned int bit_9:  1;
                          unsigned int bit_8:  1;
                          unsigned int bit_7:  1;
                          unsigned int bit_6:  1;
                          unsigned int bit_5:  1;
                          unsigned int bit_4:  1;
                          unsigned int bit_3:  1;
                          unsigned int bit_2:  1;
                          unsigned int bit_1:  1;
                         }bit_no;
                         unsigned int bit_combi; 
                          
                       }BIT_D;
 
typedef struct{
                unsigned char disp_F;          //need repeat disp is set 1
                 unsigned  char *font_p;           //point disp font arry
               }WORD_P;                         

/* VFD-DISP variable declare */
extern  WORD_P one_time_disp_p[];                         //txtprc() changed first_disp_p
extern  WORD_P repeat_disp_p;
extern  WORD_P time_disp_p ;

extern   unsigned char d_d_send_data[39][18];
extern   unsigned char one_direct_data[38][12];               //c
extern   unsigned char two_direct_data[38][12];               //b c
extern   unsigned char three_direct_data[38][12];             //a b c
extern    unsigned char four_direct_data[38][12];
extern    unsigned char five_direct_data[38][12];
extern   unsigned  char six_direct_data[38][12];

extern   unsigned  char *code_p,*old_code_p;
extern A_B_C abc_combi;
extern D_E_F def_combi;
extern  BIT_D bit_arry; 
extern   unsigned int *font_dot_p,*old_font_dot_p;                      //point font dot matrix data
extern unsigned char disp_empty_count,move_count,fetch_dot_no;   
//extern  unsigned char font_end_count;
extern unsigned char scan_count,disp_mode;
extern unsigned char disp_mode ;

//extern unsigned  char *pp;
//unsigned char prc_data_flag;                         //one equ flag.0 two equ flag.1 three equ flag.2

extern unsigned char CSIMMD1,CSICHP1,MP_H;
extern unsigned int  MSC;
extern unsigned char SFRP;
extern unsigned int MP_L;


/**** fix disp ***/
extern unsigned char fix_data_prc_count ;              //abc or def for one unit
extern unsigned char fdisp_prc_column,fdisp_start_column ;     

extern bit clrscr_F,prc_column_F,disp_empty_F ;

// extern bit fix_data_prc_F ;

extern void G1_g2_init(void);                     //modify
extern void Get_bit_d( int dot_data);     //modify
extern void Get_new_code_p(void);                 //modify
extern void Get_0_34_disp_data(void);             //modify
extern void Get_35_disp_data(void) ;              //modify
extern void Get_36_disp_data(void) ;              //modify
extern void Get_37_disp_data(void) ;              //modify
extern void D_data_prc(unsigned char number,  unsigned char *pp);        //modify
extern void Vfd_disp_init(void) ;                 //modify
extern void Clear_d_send_ram(void) ;              //modify
extern void Clear_ram_buff( unsigned  char *pp);    //modify
extern void Clrscr(void);                         //modify
extern void  Change_d_d_send_data(void) ;         //modify
extern void Column_move_data_prc(void);           //modify
extern void G1g2_scan_data(void);      //modify
extern void Clear_disp_p(void);                   //modify
extern void Clear_one_time_disp_F(unsigned char i) ;
extern void Reset_disp_p(void);                   //modify
//vfdprc.c
extern void A_b_c_precess(void);                //modify          
extern void D_e_f_precess(void) ;               //modidfy
extern void Fix_data_prc(void);                 //modify
extern void Get_abc_data( unsigned  char *vp);    //modify
extern void Fix_d_e_f_precess(void) ;           //modify
extern void Get_def_data(  unsigned char *vp) ;   //modify   
extern void  Get_next_font_adr( unsigned  char *s); //modify
extern void Fix_disp_prc(void) ;

extern unsigned char  time_need_disp_F ;

extern const  unsigned char init_d_data[16][3];
extern const  unsigned char init_abc_data[16];
extern const  unsigned char init_def_data[16];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -