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

📄 lcd.lis

📁 iccavr的一个实例
💻 LIS
📖 第 1 页 / 共 5 页
字号:
 07D4 0000              .byte 0,0
 07D6 0000              .byte 0,0
 07D8 FF08              .byte 255,8
 07DA 0808              .byte 8,8
 07DC 0C08              .byte 12,8
 07DE 0000              .byte 0,0
 07E0 100C              .byte 16,12
 07E2 0424              .byte 4,36
 07E4 2424              .byte 36,36
 07E6 2526              .byte 37,38
 07E8 2424              .byte 36,36
 07EA 3424              .byte 52,36
 07EC 8414              .byte 132,20
 07EE 0C00              .byte 12,0
 07F0 0081              .byte 0,129
 07F2 8141              .byte 129,'A
 07F4 310F              .byte 49,15
 07F6 0101              .byte 1,1
 07F8 3F41              .byte 63,'A
 07FA 4141              .byte 'A,'A
 07FC 4141              .byte 'A,'A
 07FE 7000              .byte 'p,0
 0800 0080              .byte 0,128
 0802 FF88              .byte 255,136
 0804 4848              .byte 'H,'H
 0806 2800              .byte 40,0
 0808 7F88              .byte 127,136
 080A 8884              .byte 136,132
 080C 84E0              .byte 132,224
 080E 0000              .byte 0,0
 0810 0404              .byte 4,4
 0812 0504              .byte 5,4
 0814 0404              .byte 4,4
 0816 04FF              .byte 4,255
 0818 0404              .byte 4,4
 081A 0404              .byte 4,4
 081C 0406              .byte 4,6
 081E 0400              .byte 4,0
 0820 0002              .byte 0,2
 0822 F242              .byte 242,'B
 0824 4242              .byte 'B,'B
 0826 4242              .byte 'B,'B
 0828 4242              .byte 'B,'B
 082A 42FF              .byte 'B,255
 082C 0200              .byte 2,0
 082E 0000              .byte 0,0
 0830 0000              .byte 0,0
 0832 3F40              .byte 63,64
 0834 4040              .byte 64,64
 0836 4040              .byte 64,64
 0838 4040              .byte 64,64
 083A 4040              .byte 64,64
 083C 4078              .byte 64,'x
 083E 0000              .byte 0,0
 0840 1021              .byte 16,33
 0842 6206              .byte 'b,6
 0844 2424              .byte 36,36
 0846 24EF              .byte 36,239
 0848 2424              .byte 36,36
 084A EF24              .byte 239,36
 084C 34A6              .byte 52,166
 084E 0400              .byte 4,0
 0850 0404              .byte 4,4
 0852 FE01              .byte 254,1
 0854 FF11              .byte 255,17
 0856 0907              .byte 9,7
 0858 0909              .byte 9,9
 085A 0749              .byte 7,'I
 085C 917F              .byte 145,127
 085E 0100              .byte 1,0
 0860 1010              .byte 16,16
 0862 D0FF              .byte 208,255
 0864 1050              .byte 16,'P
 0866 2050              .byte 32,'P
 0868 4C43              .byte 'L,'C
 086A 4C50              .byte 'L,'P
 086C 2060              .byte 32,96
 086E 2000              .byte 32,0
 0870 0403              .byte 4,3
 0872 00FF              .byte 0,255
 0874 4142              .byte 'A,'B
 0876 425C              .byte 'B,92
 0878 405F              .byte 64,95
 087A 4050              .byte 64,'P
 087C 4E64              .byte 'N,'d
 087E 4000              .byte 64,0
 0880 00F8              .byte 0,248
 0882 0808              .byte 8,8
 0884 0808              .byte 8,8
 0886 08FF              .byte 8,255
 0888 0808              .byte 8,8
 088A 0808              .byte 8,8
 088C 08FC              .byte 8,252
 088E 0800              .byte 8,0
 0890 0003              .byte 0,3
 0892 0101              .byte 1,1
 0894 0101              .byte 1,1
 0896 01FF              .byte 1,255
 0898 0101              .byte 1,1
 089A 0101              .byte 1,1
 089C 0103              .byte 1,3
 089E 0000              .byte 0,0
 08A0 0000              .byte 0,0
 08A2 0000              .byte 0,0
 08A4 0000              .byte 0,0
 08A6 0000              .byte 0,0
 08A8 0000              .byte 0,0
 08AA 0000              .byte 0,0
 08AC 0000              .byte 0,0
 08AE 0000              .byte 0,0
 08B0 0000              .byte 0,0
 08B2 3333              .byte 51,51
 08B4 0000              .byte 0,0
 08B6 0000              .byte 0,0
 08B8 0000              .byte 0,0
 08BA 0000              .byte 0,0
 08BC 0000              .byte 0,0
 08BE 0000              .byte 0,0
 08C0 0000              .byte 0,0
 08C2 0000              .byte 0,0
 08C4 0000              .byte 0,0
 08C6 1CFE              .byte 28,254
 08C8 FE1C              .byte 254,28
 08CA 0000              .byte 0,0
 08CC 0000              .byte 0,0
 08CE 0000              .byte 0,0
 08D0 0000              .byte 0,0
 08D2 0000              .byte 0,0
 08D4 0000              .byte 0,0
 08D6 0033              .byte 0,51
 08D8 3300              .byte 51,0
 08DA 0000              .byte 0,0
 08DC 0000              .byte 0,0
 08DE 0000              .byte 0,0
 08E0                   .dbfile C:\icc\project\LCD\code.c
 08E0                   .dbsym s TAB _TAB A[2272:71:32]c
                         .area text(rom, con, rel)
 0000                   .dbfile C:\icc\project\LCD\code.c
 0000                   .dbfile C:\icc\project\LCD\lcd.c
 0000                   .dbfunc s WriInsn _WriInsn fI
                       ;          state -> R20
                       ;        command -> R16
                         .even
 0000                 _WriInsn::
 0000 00D0              rcall push_gset1
 0002                   .dbline -1
 0002                   .dbline 34
                       ; #include<io8515.h> 
                       ; //*********************************************
                       ; //**the data port,use the port a,if donot change it
                       ; #define Db     PORTA
                       ; #define DbIn   PINA
                       ; #define DbDir  DDRA
                       ; //** DB0--PA0  DB1--PA1  DB2--PA2  DB3--PA3  DB4--PA4
                       ; //** DB5--PA5  DB6--PA6  DB7--PA7
                       ; //*****************************************************  
                       ; //**the contral port,use the port c,if not change it
                       ; #define ContrPort PORTC
                       ; #define ContrIn PINC
                       ; #define ContrDir DDRC
                       ; //**D_I--PC0
                       ; #define D_I   0b00000001
                       ; //**R_W--PC1
                       ; #define R_W   0b00000010
                       ; //**E--PC4
                       ; #define E     0b00010000
                       ; //**CS1--PC7
                       ; #define CS1   0b10000000
                       ; //**CS2--PC6
                       ; #define CS2   0b01000000
                       ; //**RESET--PC5
                       ; #define RESET 0b00100000
                       ; #define All   0b11110011
                       ; //*******************************************************
                       ; /* 1 vss   2 vdd   3 vo   4 d\i   5 r\w   6 e   7 db0
                       ;    8 db1   9 db2   10 db3   11 db4   12 db5   13 db6   14 db7
                       ;    15 cs1   16 cs2   17 reset   18 vee   19 a   20 k     */
                       ; //*********************************************************    
                       ; #include"C:\icc\project\LCD\code.c" 
                       ; void WriInsn(unsigned char command)
                       ;      { unsigned char state;
 0002                   .dbline 35
                       ;        ContrDir=ContrDir|All;//set the direction out
 0002 84B3              in R24,0x14
 0004 836F              ori R24,243
 0006 84BB              out 0x14,R24
 0008                   .dbline 36
                       ;        ContrPort=ContrPort&~D_I;//D_I=0
 0008 A898              cbi 0x15,0
 000A                   .dbline 37
                       ;        ContrPort=ContrPort|R_W;//R_w=1
 000A A99A              sbi 0x15,1
 000C                   .dbline 38
                       ;        DbDir=0b00000000;//data input module
 000C 2224              clr R2
 000E 2ABA              out 0x1a,R2
 0010                 L2:
 0010                   .dbline 40
                       ;        do
                       ;        {ContrPort=ContrPort|E;//E=1,read the status;
 0010                   .dbline 40
 0010 AC9A              sbi 0x15,4
 0012                   .dbline 41
                       ;         state=DbIn;//status trans to state
 0012 49B3              in R20,0x19
 0014                   .dbline 42
                       ;         ContrPort=ContrPort&~E;}//E=0,  
 0014 AC98              cbi 0x15,4
 0016                   .dbline 42
 0016                 L3:
 0016                   .dbline 43
                       ;        while(state&0b10000000);//if "busy"
 0016 47FD              sbrc R20,7
 0018 FBCF              rjmp L2
 001A                   .dbline 44
                       ;        ContrPort=ContrPort&~R_W;//R_w=0
 001A A998              cbi 0x15,1
 001C                   .dbline 45
                       ;        DbDir=0b11111111;//data output module 
 001C 8FEF              ldi R24,255
 001E 8ABB              out 0x1a,R24
 0020                   .dbline 46
                       ;        Db=command;
 0020 0BBB              out 0x1b,R16
 0022                   .dbline 47
                       ;        ContrPort=ContrPort|E;//E=1
 0022 AC9A              sbi 0x15,4
 0024                   .dbline 48
                       ;        ContrPort=ContrPort&~E;//E=0,
 0024 AC98              cbi 0x15,4
 0026                   .dbline -2
 0026                   .dbline 50
                       ;        
                       ;      }
 0026                 L1:
 0026 00D0              rcall pop_gset1
 0028                   .dbline 0 ; func end
 0028 0895              ret
 002A                   .dbsym r state 20 c
 002A                   .dbsym r command 16 c
 002A                   .dbfunc s WriData _WriData fI
                       ;          state -> R20
                       ;        WriData -> R16
                         .even
 002A                 _WriData::
 002A 00D0              rcall push_gset1
 002C                   .dbline -1
 002C                   .dbline 53
                       ; //*********************************************************
                       ; void WriData(unsigned char WriData)
                       ;      { unsigned char state;
 002C                   .dbline 54
                       ;        ContrDir=ContrDir|All;//set the direction out
 002C 84B3              in R24,0x14
 002E 836F              ori R24,243
 0030 84BB              out 0x14,R24
 0032                   .dbline 55
                       ;        ContrPort=ContrPort&~D_I;//D_I=0
 0032 A898              cbi 0x15,0
 0034                   .dbline 56
                       ;        ContrPort=ContrPort|R_W;//R_w=1
 0034 A99A              sbi 0x15,1
 0036                   .dbline 57
                       ;        DbDir=0b00000000;//data input module
 0036 2224              clr R2
 0038 2ABA              out 0x1a,R2
 003A                 L6:
 003A                   .dbline 59
                       ;        do
                       ;        {ContrPort=ContrPort|E;//E=1,read the status;
 003A                   .dbline 59
 003A AC9A              sbi 0x15,4
 003C                   .dbline 60
                       ;         state=DbIn;//status trans to state
 003C 49B3              in R20,0x19
 003E                   .dbline 61
                       ;         ContrPort=ContrPort&~E;}//E=0,  
 003E AC98              cbi 0x15,4
 0040                   .dbline 61
 0040                 L7:
 0040                   .dbline 62
                       ;        while(state&0b10000000);//if "busy"
 0040 47FD              sbrc R20,7
 0042 FBCF              rjmp L6
 0044                   .dbline 63
                       ;        ContrPort=ContrPort|D_I;//D_I=1 
 0044 A89A              sbi 0x15,0
 0046                   .dbline 64
                       ;        ContrPort=ContrPort&~R_W;//R_w=0
 0046 A998              cbi 0x15,1
 0048                   .dbline 65
                       ;        DbDir=0b11111111;
 0048 8FEF              ldi R24,255
 004A 8ABB              out 0x1a,R24
 004C                   .dbline 66
                       ;        Db=WriData;
 004C 0BBB              out 0x1b,R16
 004E                   .dbline 67
                       ;        ContrPort=ContrPort|E;//E=1
 004E AC9A              sbi 0x15,4
 0050                   .dbline 68
                       ;        ContrPort=ContrPort&~E;//E=0,
 0050 AC98              cbi 0x15,4
 0052                   .dbline -2
 0052                   .dbline 69
                       ;      }   
 0052                 L5:
 0052 00D0              rcall pop_gset1
 0054                   .dbline 0 ; func end
 0054 0895              ret
 0056                   .dbsym r state 20 c
 0056                   .dbsym r WriData 16 c
 0056                   .dbfunc s ClearRam _ClearRam fI
                       ;     Clear_page -> R20
                       ;        Clear_Y -> R22
                         .even
 0056                 _ClearRam::
 0056 00D0              rcall push_gset2
 0058                   .dbline -1
 0058                   .dbline 92
                       ; /************************************************************
                       ; unsigned char Readdata(void)
                       ;          { unsigned char state,ReadData;
                       ;            ContrDir=ContrDir|All;//set the direction out
                       ;            ContrPort=ContrPort&~D_I;//D_I=0
                       ;            ContrPort=ContrPort|R_W;//R_w=1
                       ;            DbDir=0b00000000;//data input module
                       ;            do
                       ;              {ContrPort=ContrPort|E;//E=1,read the status;
                       ;               state=DbIn;//status trans to state
                       ;               ContrPort=ContrPort&~E;}//E=0,  
                       ;            while(state&0b10000000);//if "busy"
                       ;            ContrPort=ContrPort|D_I;//D_I=1
                       ;            ContrPort=ContrPort|E;//E=1
                       ;            ReadData=PINA;

⌨️ 快捷键说明

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