📄 lcd.lis
字号:
019A 7C08 .byte 124,8
019C 0404 .byte 4,4
019E 08 .byte 8
019F 4854 .byte 'H,'T
01A1 5454 .byte 'T,'T
01A3 20 .byte 32
01A4 043F .byte 4,63
01A6 4440 .byte 'D,64
01A8 20 .byte 32
01A9 3C40 .byte 60,64
01AB 4020 .byte 64,32
01AD 7C .byte 124
01AE 1C20 .byte 28,32
01B0 4020 .byte 64,32
01B2 1C .byte 28
01B3 3C40 .byte 60,64
01B5 3040 .byte 48,64
01B7 3C .byte 60
01B8 4428 .byte 'D,40
01BA 1028 .byte 16,40
01BC 44 .byte 'D
01BD 0C50 .byte 12,'P
01BF 5050 .byte 'P,'P
01C1 3C .byte 60
01C2 4464 .byte 'D,'d
01C4 544C .byte 'T,'L
01C6 44 .byte 'D
01C7 .dbfile C:\DOCUME~1\charon\MYDOCU~1\AVR\NRF905\lcd.c
01C7 .dbsym s CharList _CharList A[455:91:5]kc
.area text(rom, con, rel)
0000 .dbfile C:\DOCUME~1\charon\MYDOCU~1\AVR\NRF905\lcd.c
0000 .dbfunc e init_lcd _init_lcd fV
.even
0000 _init_lcd::
0000 .dbline -1
0000 .dbline 135
0000 ; //ICC-AVR application builder : 2007-6-8 23:42:55
0000 ; // Target : M16
0000 ; // Crystal: 7.3728Mhz
0000 ;
0000 ; #include "config.h"
0000 ;
0000 ; #define RST 0x01
0000 ; // PD0
0000 ; #define CE 0x02
0000 ; // PD1
0000 ; #define DC 0x04
0000 ; // PD2
0000 ; //#define MOSI 0x20
0000 ; // PB5
0000 ; //#define CLK 0x80
0000 ; // PB7
0000 ;
0000 ; //字模数组长度
0000 ; #define X_Length 160
0000 ; // 初始位置
0000 ; #define X_Init 10
0000 ; #define Y_Init 2
0000 ;
0000 ;
0000 ; static const unsigned char CharList[][5] =
0000 ; {
0000 ; { 0x00, 0x00, 0x00, 0x00, 0x00 }, // sp //0
0000 ; { 0x00, 0x00, 0x2f, 0x00, 0x00 }, // !
0000 ; { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
0000 ; { 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #
0000 ; { 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // $
0000 ; { 0xc4, 0xc8, 0x10, 0x26, 0x46 }, // %
0000 ; { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
0000 ; { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
0000 ; { 0x00, 0x1c, 0x22, 0x41, 0x00 }, // (
0000 ; { 0x00, 0x41, 0x22, 0x1c, 0x00 }, // )
0000 ; { 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
0000 ; { 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
0000 ; { 0x00, 0x00, 0x50, 0x30, 0x00 }, // ,
0000 ; { 0x10, 0x10, 0x10, 0x10, 0x10 }, // -
0000 ; { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
0000 ; { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
0000 ; { 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0 //16
0000 ; { 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
0000 ; { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
0000 ; { 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
0000 ; { 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
0000 ; { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
0000 ; { 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
0000 ; { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
0000 ; { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
0000 ; { 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
0000 ; { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
0000 ; { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
0000 ; { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
0000 ; { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
0000 ; { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
0000 ; { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
0000 ; { 0x32, 0x49, 0x59, 0x51, 0x3E }, // @
0000 ; { 0x7E, 0x11, 0x11, 0x11, 0x7E }, // A //33
0000 ; { 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
0000 ; { 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
0000 ; { 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
0000 ; { 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
0000 ; { 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
0000 ; { 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
0000 ; { 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
0000 ; { 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
0000 ; { 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
0000 ; { 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
0000 ; { 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
0000 ; { 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
0000 ; { 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
0000 ; { 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
0000 ; { 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
0000 ; { 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
0000 ; { 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
0000 ; { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
0000 ; { 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
0000 ; { 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
0000 ; { 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
0000 ; { 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
0000 ; { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
0000 ; { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
0000 ; { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
0000 ; { 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
0000 ; { 0x55, 0x2A, 0x55, 0x2A, 0x55 }, // \
0000 ; { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
0000 ; { 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
0000 ; { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
0000 ; { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
0000 ; { 0x00, 0x01, 0x02, 0x04, 0x00 }, // '
0000 ; { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
0000 ; { 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
0000 ; { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
0000 ; { 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
0000 ; { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
0000 ; { 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
0000 ; { 0x0C, 0x52, 0x52, 0x52, 0x3E }, // g
0000 ; { 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
0000 ; { 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
0000 ; { 0x20, 0x40, 0x44, 0x3D, 0x00 }, // j
0000 ; { 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
0000 ; { 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
0000 ; { 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
0000 ; { 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
0000 ; { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
0000 ; { 0x7C, 0x14, 0x14, 0x14, 0x08 }, // p
0000 ; { 0x08, 0x14, 0x14, 0x18, 0x7C }, // q
0000 ; { 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
0000 ; { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
0000 ; { 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
0000 ; { 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
0000 ; { 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
0000 ; { 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
0000 ; { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
0000 ; { 0x0C, 0x50, 0x50, 0x50, 0x3C }, // y
0000 ; { 0x44, 0x64, 0x54, 0x4C, 0x44 } // z
0000 ; };
0000 ; /*--------------------------------------------------------------------------------------------------
0000 ; 函数原型声明
0000 ; --------------------------------------------------------------------------------------------------*/
0000 ; void init_lcd ( void );
0000 ; void clear_lcd ( void );
0000 ; void display_lcd ( unsigned char, unsigned char);
0000 ; void locat_lcd ( unsigned char, unsigned char);
0000 ;
0000 ;
0000 ; ////////////////////////////////////////////////////////////////////////////////////////////////////
0000 ; ////////////////////////////////////////////////////////////////////////////////////////////////////
0000 ; ////////////////////////////////////////////////////////////////////////////////////////////////////
0000 ; ////////////////////////////////////////////////////////////////////////////////////////////////////
0000 ;
0000 ; void init_lcd(void)
0000 ; {
0000 .dbline 136
0000 ; PORTD|=RST; //RESET LCD
0000 909A sbi 0x12,0
0002 .dbline 137
0002 ; DIS905();
0002 C49A sbi 0x18,4
0004 .dbline 138
0004 ; ENLCD();
0004 9198 cbi 0x12,1
0006 .dbline 139
0006 ; PORTB&=~RST; //RESETED
0006 C098 cbi 0x18,0
0008 .dbline 147
0008 ;
0008 ;
0008 ;
0008 ; //SPI SETTINGS
0008 ;
0008 ;
0008 ; //DISABLE LCD
0008 ; PORTD|=CE;
0008 919A sbi 0x12,1
000A .dbline 148
000A ; display_lcd( 0x21, 0 ); // LCD Extended Commands.
000A 2227 clr R18
000C 01E2 ldi R16,33
000E 2FD0 xcall _display_lcd
0010 .dbline 149
0010 ; display_lcd( 0xC8, 0 ); // Set LCD Vop (Contrast).
0010 2227 clr R18
0012 08EC ldi R16,200
0014 2CD0 xcall _display_lcd
0016 .dbline 150
0016 ; display_lcd( 0x06, 0 ); // Set Temp coefficent.
0016 2227 clr R18
0018 06E0 ldi R16,6
001A 29D0 xcall _display_lcd
001C .dbline 151
001C ; display_lcd( 0x13, 0 ); // LCD bias mode 1:48.
001C 2227 clr R18
001E 03E1 ldi R16,19
0020 26D0 xcall _display_lcd
0022 .dbline 152
0022 ; display_lcd( 0x20, 0 ); // LCD Standard Commands, Horizontal addressing mode.
0022 2227 clr R18
0024 00E2 ldi R16,32
0026 23D0 xcall _display_lcd
0028 .dbline 153
0028 ; display_lcd( 0x0C, 0 ); // LCD in normal mode.
0028 2227 clr R18
002A 0CE0 ldi R16,12
002C 20D0 xcall _display_lcd
002E .dbline 156
002E ;
002E ;
002E ; clear_lcd();
002E 05D0 xcall _clear_lcd
0030 .dbline 157
0030 ; locat_lcd(X_Init,Y_Init);
0030 22E0 ldi R18,2
0032 0AE0 ldi R16,10
0034 29D0 xcall _locat_lcd
0036 .dbline 158
0036 ; DISLCD();
0036 919A sbi 0x12,1
0038 .dbline -2
0038 L1:
0038 .dbline 0 ; func end
0038 0895 ret
003A .dbend
003A .dbfunc e clear_lcd _clear_lcd fV
003A ; i -> R20,R21
.even
003A _clear_lcd::
003A 0E940000 xcall push_gset1
003E .dbline -1
003E .dbline 163
003E ; }
003E ; //
003E ; //
003E ; void clear_lcd(void)
003E ; {
003E .dbline 166
003E ; unsigned int i;
003E ;
003E ; display_lcd(0x0c, 0);
003E 2227 clr R18
0040 0CE0 ldi R16,12
0042 15D0 xcall _display_lcd
0044 .dbline 167
0044 ; display_lcd(0x80, 0);
0044 2227 clr R18
0046 00E8 ldi R16,128
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -