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

📄 cplcd.lst

📁 使用ATMEGA8L+1602LCD写的万年历
💻 LST
📖 第 1 页 / 共 5 页
字号:
000090 9478             sei
000091 cffa             rjmp    here  
                 ;*
                 ;************************digital key deal with program**************************
                 one_nine_deal:
000092 9563              inc    counter_temp
000093 3061              cpi    counter_temp,  $01       ; if counter_temp = $03
000094 f0e1              breq    high_year_high
000095 3062              cpi    counter_temp,  $02       ; if counter_temp = $04
000096 f0f1              breq    high_year_low
000097 3063              cpi    counter_temp,  $03
000098 f101              breq    low_year_high
000099 3064              cpi    counter_temp,  $04
00009a f111              breq    low_year_low
00009b 3065              cpi    counter_temp,  $05
00009c f121              breq    high_month_deal
00009d 3066              cpi    counter_temp,  $06
00009e f131              breq    low_month_deal
00009f 3067              cpi    counter_temp,  $07
0000a0 f141              breq    high_day_deal
0000a1 3068              cpi    counter_temp,  $08
0000a2 f151              breq    low_day_deal
0000a3 3069              cpi    counter_temp,  $09
0000a4 f161              breq    high_hour_deal
0000a5 306a              cpi    counter_temp,  $0a
0000a6 f179              breq    low_hour_deal
0000a7 306b              cpi    counter_temp,  $0b
0000a8 f189              breq    high_minute_deal
0000a9 306c              cpi    counter_temp,  $0c
0000aa f199              breq    low_minute_deal
0000ab 306d              cpi    counter_temp,  $0d
0000ac f1a9              breq    high_sec_deal
0000ad 306e              cpi    counter_temp,  $0e
0000ae f1b9              breq    low_sec_deal
                 one_nine_finish:
0000af d048              rcall    delay_loop
0000b0 cf94              rjmp    key_press_scan
                 ;*
                 ;************************ high year high deal program *************************
                 high_year_high:
0000b1 e9a6              ldi    xl,  low(dtpnt+6)
0000b2 e0b2              ldi    xh,  high(dtpnt+6)
0000b3 d037              rcall    high_bit_deal
0000b4 c034             rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high year low deal program ***************************
                 high_year_low:
0000b5 e9a6            ldi    xl,  low(dtpnt+6)
0000b6 e0b2            ldi    xh,  high(dtpnt+6)
0000b7 d03a            rcall    low_bit_deal
0000b8 c030            rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low year high deal program ***************************
                 low_year_high:
0000b9 e9a5              ldi    xl,  low(dtpnt+5)
0000ba e0b2              ldi    xh,  high(dtpnt+5)
0000bb d02f              rcall    high_bit_deal
0000bc c02c             rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low year low deal program ***************************
                 low_year_low:
0000bd e9a5            ldi    xl,  low(dtpnt+5)
0000be e0b2            ldi    xh,  high(dtpnt+5)
0000bf d032            rcall    low_bit_deal
0000c0 c028           rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high month deal program ******************************
                 high_month_deal:
0000c1 e9a4              ldi    xl,  low(dtpnt+4)
0000c2 e0b2              ldi    xh,  high(dtpnt+4)
0000c3 d027              rcall    high_bit_deal
0000c4 c024             rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low month deal program *******************************
                 low_month_deal:
0000c5 e9a4            ldi    xl,  low(dtpnt+4)
0000c6 e0b2            ldi    xh,  high(dtpnt+4)
0000c7 d02a            rcall    low_bit_deal
0000c8 c020           rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high day deal program ********************************
                 high_day_deal:
0000c9 e9a3              ldi    xl,  low(dtpnt+3)
0000ca e0b2              ldi    xh,  high(dtpnt+3)
0000cb d01f              rcall    high_bit_deal
0000cc c01c             rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low day deal program ********************************
                 low_day_deal:
0000cd e9a3              ldi    xl,  low(dtpnt+3)
0000ce e0b2              ldi    xh,  high(dtpnt+3)
0000cf d022              rcall    low_bit_deal
0000d0 c018              rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high hour deal program ******************************
                 high_hour_deal:
0000d1 e9a2              ldi    xl,  low(dtpnt+2)
0000d2 e0b2              ldi    xh,  high(dtpnt+2)
0000d3 d017              rcall    high_bit_deal
0000d4 d037              rcall    Read_data_x            ; tranfer display data
0000d5 cfd9              rjmp    one_nine_finish
                 ;*
                 ;************************ low hour deal program *******************************
                 low_hour_deal:
0000d6 e9a2              ldi    xl,  low(dtpnt+2)
0000d7 e0b2              ldi    xh,  high(dtpnt+2)
0000d8 d019              rcall    low_bit_deal
0000d9 c00f              rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high minute deal program ****************************
                 high_minute_deal:
0000da e9a1              ldi    xl,  low(dtpnt+1)
0000db e0b2              ldi    xh,  high(dtpnt+1)
0000dc d00e              rcall    high_bit_deal
0000dd c00b              rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low minute deal program ****************************
                 low_minute_deal:
0000de e9a1              ldi    xl,  low(dtpnt+1)
0000df e0b2              ldi    xh,  high(dtpnt+1)
0000e0 d011              rcall    low_bit_deal
0000e1 c007             rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ high sec deal program *******************************
                 high_sec_deal:
0000e2 e9a0              ldi    xl,  low(dtpnt)
0000e3 e0b2              ldi    xh,  high(dtpnt)
0000e4 d006              rcall    high_bit_deal
0000e5 c003              rjmp    LCD_data_display       ; tranfer display data
                 ;*
                 ;************************ low sec deal program ********************************
                 low_sec_deal:
0000e6 e9a0              ldi    xl,  low(dtpnt)
0000e7 e0b2              ldi    xh,  high(dtpnt)
0000e8 d009              rcall    low_bit_deal
                 ;*
                 ;************************ LCD data display program*****************************
                 LCD_data_display:
0000e9 d022              rcall    Read_data_x            ; tranfer display data
0000ea cfc4              rjmp    one_nine_finish 
                 ;************************ high bit deal program *******************************
                 high_bit_deal:
0000eb 9542            swap    key
0000ec 7f40            andi    key,  $f0         ; save high bit
0000ed 910c            ld    temp,  x
0000ee 700f            andi    temp,  $0f              ; save x register low bit
0000ef 0f04            add    temp,  key
0000f0 930c            st    x,  temp
0000f1 9508            ret
                 ;*
                 ;************************ low bit deal program ********************************
                 low_bit_deal:
0000f2 704f            andi    key,  $0f          ; save low bit
0000f3 910c            ld    temp,  x
0000f4 7f00            andi   temp,  $f0                 ; save x register high bit
0000f5 0f04            add    temp,  key
0000f6 930c            st    x,  temp
0000f7 9508            ret
                 ;*
                 ;************************ loop program *****************************************
                 delay_loop:
0000f8 e100              ldi    temp,  $10
0000f9 d0d4              rcall    delay1500us
0000fa 950a              dec    temp
0000fb f7e9              brne    delay_loop+1
0000fc 9508              ret
                 ;*
                 ;************************ write data to x register*****************************
                 write_data_x:
0000fd e9a0            ldi    xl,  low(dtpnt)
0000fe e0b2            ldi    xh,  high(dtpnt)
0000ff e000            ldi    temp,  $00            ; "00" storage to the address $0130-$0132
000100 930d            st     x+,  temp
000101 930d            st     x+,  temp
000102 930d            st     x+,  temp
000103 e001            ldi    temp,  $01            ; "01" storage to the address $0133-4
000104 930d            st     x+,  temp
000105 930d            st     x+,  temp
000106 e006            ldi    temp,  $06            ; "06" storage to the address $0135
000107 930d            st     x+,  temp
000108 e200            ldi    temp,  $20            ; "20" storage to the address $0136
000109 930c            st     x,  temp
00010a 9717            sbiw   xl,  7
00010b 9508            ret
                 ;*
                 ;************************Read data x register program***************************
                 Read_data_x:
00010c e9a0            ldi    xl,  low(dtpnt)
00010d e0b2            ldi    xh,  high(dtpnt)
00010e 910d            ld     temp,  x+                  ; data tranfer to temp
00010f d00d            rcall    LCD_display_sec           ; tranfer second display
000110 910d            ld     temp,  x+
000111 d022            rcall    LCD_display_minute       ; tranfer minute display
000112 910d            ld     temp,  x+
000113 d037            rcall    LCD_display_hour         ; tranfer hour display
000114 910d            ld     temp,  x+
000115 d04c            rcall    LCD_display_day          ; tranfer day display
000116 910d            ld     temp,  x+
000117 d061            rcall    LCD_display_month        ; tranfer month display
000118 910d            ld     temp,  x+
000119 d076            rcall    LCD_display_low_year     ; tranfer low year display
00011a 910c            ld     temp,  x
00011b d08b            rcall    LCD_display_high_year    ; tranfer high year display
00011c 9508            ret
                 ;*
                 ;************************LCD display sec program********************************
                 LCD_display_sec:
00011d 2ef0             mov    next_temp,  temp
00011e e02a             ldi    coodrinate_x,  $0a
00011f e031             ldi    coodrinate_y,  1
000120 5430             subi   coodrinate_y,  $40
000121 0f32             add    coodrinate_y,  coodrinate_x
000122 2f03             mov    temp,  coodrinate_y
000123 d09a             rcall    LCD_write_command
000124 2d0f             mov    temp,  next_temp
000125 700f             andi    temp,  $0f
000126 0f05             add    temp,  temp30
000127 d0c4             rcall    LCD_write_data
000128 e029             ldi    coodrinate_x,  $09
000129 e031             ldi    coodrinate_y,  1
00012a 5430             subi   coodrinate_y,  $40
00012b 0f32             add    coodrinate_y,  coodrinate_x
00012c 2f03             mov    temp,  coodrinate_y
00012d d090             rcall    LCD_write_command
00012e 2d0f             mov    temp,  next_temp
00012f 9502             swap    temp
000130 700f             andi    temp,  $0f
000131 0f05             add    temp,  temp30
000132 d0b9             rcall    LCD_write_data
000133 9508             ret
                 ;*
                 ;************************LCD display minute program*****************************
                 LCD_display_minute:
000134 2ef0             mov    next_temp,  temp
000135 e027             ldi    coodrinate_x,  $07
000136 e031             ldi    coodrinate_y,  1
000137 5430             subi   coodrinate_y,  $40
000138 0f32             add    coodrinate_y,  coodrinate_x
000139 2f03             mov    temp,  coodrinate_y
00013a d083             rcall    LCD_write_command
00013b 2d0f             mov    temp,  next_temp
00013c 700f             andi    temp,  $0f
00013d 0f05             add    temp,  temp30
00013e d0ad             rcall    LCD_write_data
00013f e026             ldi    coodrinate_x,  $06
000140 e031             ldi    coodrinate_y,  1
000141 5430             subi   coodrinate_y

⌨️ 快捷键说明

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