📄 splc501.lss
字号:
536: d0 e0 ldi r29, 0x00 ; 0
for(j=0;j<8;j++)
{
SPLC501SPIWrite(0xb0+j,0);//
538: 60 e0 ldi r22, 0x00 ; 0
53a: 8c 2f mov r24, r28
53c: 80 55 subi r24, 0x50 ; 80
53e: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
SPLC501SPIWrite(0x10|((0xf0&i)>>4),0); //SET COLUMN ADDRESS MSB
542: 8c 2d mov r24, r12
544: 82 95 swap r24
546: 8f 70 andi r24, 0x0F ; 15
548: 60 e0 ldi r22, 0x00 ; 0
54a: 80 61 ori r24, 0x10 ; 16
54c: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
SPLC501SPIWrite(0x00|(0x0f&i),0); //SET COLUMN ADDRESS LSB,
550: 60 e0 ldi r22, 0x00 ; 0
552: 8c 2d mov r24, r12
554: 8f 70 andi r24, 0x0F ; 15
556: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
if(j!=x)SPLC501SPIWrite(0,1);
55a: cd 15 cp r28, r13
55c: 19 f0 breq .+6 ; 0x564 <Plot+0x86>
55e: 61 e0 ldi r22, 0x01 ; 1
560: 80 e0 ldi r24, 0x00 ; 0
562: 08 c0 rjmp .+16 ; 0x574 <Plot+0x96>
else SPLC501SPIWrite(1<<x1,1);
564: 61 e0 ldi r22, 0x01 ; 1
566: 81 e0 ldi r24, 0x01 ; 1
568: 90 e0 ldi r25, 0x00 ; 0
56a: 00 2e mov r0, r16
56c: 01 c0 rjmp .+2 ; 0x570 <Plot+0x92>
56e: 88 0f add r24, r24
570: 0a 94 dec r0
572: ea f7 brpl .-6 ; 0x56e <Plot+0x90>
574: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
578: 21 96 adiw r28, 0x01 ; 1
57a: c8 30 cpi r28, 0x08 ; 8
57c: d1 05 cpc r29, r1
57e: e1 f6 brne .-72 ; 0x538 <Plot+0x5a>
580: 08 94 sec
582: e1 1c adc r14, r1
584: f1 1c adc r15, r1
586: f0 e8 ldi r31, 0x80 ; 128
588: ef 16 cp r14, r31
58a: f1 04 cpc r15, r1
58c: 09 f0 breq .+2 ; 0x590 <Plot+0xb2>
58e: bc cf rjmp .-136 ; 0x508 <Plot+0x2a>
}
}
SPLC501SPIWrite(0x40,0); //start h
590: 60 e0 ldi r22, 0x00 ; 0
592: 80 e4 ldi r24, 0x40 ; 64
594: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
598: df 91 pop r29
59a: cf 91 pop r28
59c: 1f 91 pop r17
59e: 0f 91 pop r16
5a0: ff 90 pop r15
5a2: ef 90 pop r14
5a4: df 90 pop r13
5a6: cf 90 pop r12
5a8: bf 90 pop r11
5aa: af 90 pop r10
5ac: 08 95 ret
000005ae <LCD501_PutPixel>:
}
/////----- 图形显示模式 -----/////
void LCD501_PutPixel(unsigned char x,unsigned char y) //画点子程序
{
5ae: ff 92 push r15
5b0: 0f 93 push r16
5b2: 1f 93 push r17
unsigned char x_low,x_hight; //定义列地址的高低位指令
unsigned char Dot_Mask_Buf=0x01;
unsigned char y_Page; //用于存放要画点的位置所在的byte数据位置
x+=4;
5b4: 08 2f mov r16, r24
5b6: 0c 5f subi r16, 0xFC ; 252
x_low=(x&0x0f); //定位列地址设置的低位指令
x_hight=(x>>4)+0x10; //定位列地址设置的高位指令
y_Page=y&0x07; //取低三位
5b8: 86 2f mov r24, r22
5ba: 87 70 andi r24, 0x07 ; 7
5bc: 41 e0 ldi r20, 0x01 ; 1
5be: f4 2e mov r15, r20
5c0: 02 c0 rjmp .+4 ; 0x5c6 <LCD501_PutPixel+0x18>
while(y_Page!=0)
{
Dot_Mask_Buf<<=1;
5c2: ff 0c add r15, r15
y_Page--;
5c4: 81 50 subi r24, 0x01 ; 1
5c6: 88 23 and r24, r24
5c8: e1 f7 brne .-8 ; 0x5c2 <LCD501_PutPixel+0x14>
}
y_Page=y>>3; //Get the page of the byte
5ca: 16 2f mov r17, r22
5cc: 16 95 lsr r17
5ce: 16 95 lsr r17
5d0: 16 95 lsr r17
SPLC501SPIWrite(0xb0+y_Page,0);
5d2: 60 e0 ldi r22, 0x00 ; 0
5d4: 81 2f mov r24, r17
5d6: 80 55 subi r24, 0x50 ; 80
5d8: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
SPLC501SPIWrite(x_low,0);
5dc: 60 e0 ldi r22, 0x00 ; 0
5de: 80 2f mov r24, r16
5e0: 8f 70 andi r24, 0x0F ; 15
5e2: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
SPLC501SPIWrite(x_hight,0);
5e6: 02 95 swap r16
5e8: 0f 70 andi r16, 0x0F ; 15
5ea: 60 e0 ldi r22, 0x00 ; 0
5ec: 80 2f mov r24, r16
5ee: 80 5f subi r24, 0xF0 ; 240
5f0: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
//SPLC501SPIWrite(0xe0,0); //设置为读写改模式
/*y_Page = F_SPLC501_Read_Data(); //
switch(CurPaintMode)
{
case 2: y_Page=y_Page&(~Dot_Mask_Buf);
break;
case 3: x=y_Page^Dot_Mask_Buf;
x=x&Dot_Mask_Buf;
y_Page=(y_Page&(~Dot_Mask_Buf))|x;
break;
default: y_Page=y_Page|Dot_Mask_Buf;
break;
}*/
y_Page=y_Page|Dot_Mask_Buf;
SPLC501SPIWrite(y_Page,1); //
5f4: 61 e0 ldi r22, 0x01 ; 1
5f6: 81 2f mov r24, r17
5f8: 8f 29 or r24, r15
5fa: 0e 94 c9 00 call 0x192 ; 0x192 <SPLC501SPIWrite>
5fe: 1f 91 pop r17
600: 0f 91 pop r16
602: ff 90 pop r15
604: 08 95 ret
00000606 <LCD501_Line>:
//SPLC501SPIWrite(0xee,0); //读写改模式结束
}
//参数:x 要画线的x起点坐标 y 要画的线的y起点坐标
// ex 要画线的x终点坐标 ey要画的线的y起点坐标
void LCD501_Line(char x,char y,char ex,char ey) //画直线程序
{
606: cf 92 push r12
608: df 92 push r13
60a: ef 92 push r14
60c: ff 92 push r15
60e: 0f 93 push r16
610: 1f 93 push r17
612: cf 93 push r28
614: df 93 push r29
616: cd b7 in r28, 0x3d ; 61
618: de b7 in r29, 0x3e ; 62
61a: 21 97 sbiw r28, 0x01 ; 1
61c: 0f b6 in r0, 0x3f ; 63
61e: f8 94 cli
620: de bf out 0x3e, r29 ; 62
622: 0f be out 0x3f, r0 ; 63
624: cd bf out 0x3d, r28 ; 61
626: 18 2f mov r17, r24
628: 06 2f mov r16, r22
62a: f4 2e mov r15, r20
char Offset_x,Offset_y;
char Offset_k=0;
unsigned char signErr_d=1;
if(y>ey)
62c: 26 17 cp r18, r22
62e: 28 f4 brcc .+10 ; 0x63a <LCD501_Line+0x34>
630: f1 2e mov r15, r17
632: 14 2f mov r17, r20
634: 82 2f mov r24, r18
636: 26 2f mov r18, r22
638: 08 2f mov r16, r24
{
Offset_x=x;
x=ex;
ex=Offset_x;
Offset_x=y;
y=ey;
ey=Offset_x;
}
Offset_x=ex-x;
63a: ef 2c mov r14, r15
63c: e1 1a sub r14, r17
Offset_y=ey-y;
63e: d2 2e mov r13, r18
640: d0 1a sub r13, r16
LCD501_PutPixel(x,y);
642: 60 2f mov r22, r16
644: 81 2f mov r24, r17
646: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
if(Offset_x<=0)
64a: ee 20 and r14, r14
64c: 19 f0 breq .+6 ; 0x654 <LCD501_Line+0x4e>
64e: 51 e0 ldi r21, 0x01 ; 1
650: c5 2e mov r12, r21
652: 03 c0 rjmp .+6 ; 0x65a <LCD501_Line+0x54>
{
Offset_x = x-ex;
654: e1 2e mov r14, r17
656: ef 18 sub r14, r15
658: cc 24 eor r12, r12
signErr_d=0;
}
if(Offset_x>Offset_y)
65a: de 14 cp r13, r14
65c: 18 f0 brcs .+6 ; 0x664 <LCD501_Line+0x5e>
65e: f0 2e mov r15, r16
660: 90 e0 ldi r25, 0x00 ; 0
662: 2b c0 rjmp .+86 ; 0x6ba <LCD501_Line+0xb4>
664: 90 e0 ldi r25, 0x00 ; 0
666: 13 c0 rjmp .+38 ; 0x68e <LCD501_Line+0x88>
{
while(x!=ex)
{
if(Offset_k>0)
668: 99 23 and r25, r25
66a: 11 f4 brne .+4 ; 0x670 <LCD501_Line+0x6a>
66c: 9d 2d mov r25, r13
66e: 04 c0 rjmp .+8 ; 0x678 <LCD501_Line+0x72>
{
y+=1;
670: 0f 5f subi r16, 0xFF ; 255
Offset_k+=(Offset_y-Offset_x);
672: 8d 2d mov r24, r13
674: 8e 19 sub r24, r14
676: 98 0f add r25, r24
}
else Offset_k+=Offset_y;
if(signErr_d)x+=1;
678: cc 20 and r12, r12
67a: 11 f0 breq .+4 ; 0x680 <LCD501_Line+0x7a>
67c: 1f 5f subi r17, 0xFF ; 255
67e: 01 c0 rjmp .+2 ; 0x682 <LCD501_Line+0x7c>
else x-=1;
680: 11 50 subi r17, 0x01 ; 1
LCD501_PutPixel(x,y);
682: 60 2f mov r22, r16
684: 81 2f mov r24, r17
686: 99 83 std Y+1, r25 ; 0x01
688: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
68c: 99 81 ldd r25, Y+1 ; 0x01
68e: 1f 15 cp r17, r15
690: 59 f7 brne .-42 ; 0x668 <LCD501_Line+0x62>
692: 17 c0 rjmp .+46 ; 0x6c2 <LCD501_Line+0xbc>
}
}
else
{
while(y!=ey)
{
if(Offset_k>0)
694: 99 23 and r25, r25
696: 11 f4 brne .+4 ; 0x69c <LCD501_Line+0x96>
698: 9e 2d mov r25, r14
69a: 08 c0 rjmp .+16 ; 0x6ac <LCD501_Line+0xa6>
{
if(signErr_d)x+=1;
69c: cc 20 and r12, r12
69e: 11 f0 breq .+4 ; 0x6a4 <LCD501_Line+0x9e>
6a0: 1f 5f subi r17, 0xFF ; 255
6a2: 01 c0 rjmp .+2 ; 0x6a6 <LCD501_Line+0xa0>
else x-=1;
6a4: 11 50 subi r17, 0x01 ; 1
Offset_k+=(Offset_x-Offset_y);
6a6: 8e 2d mov r24, r14
6a8: 8d 19 sub r24, r13
6aa: 98 0f add r25, r24
}
else Offset_k+=Offset_x;
y+=1;
6ac: f3 94 inc r15
LCD501_PutPixel(x,y);
6ae: 6f 2d mov r22, r15
6b0: 81 2f mov r24, r17
6b2: 99 83 std Y+1, r25 ; 0x01
6b4: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
6b8: 99 81 ldd r25, Y+1 ; 0x01
6ba: 80 2f mov r24, r16
6bc: 8d 0d add r24, r13
6be: f8 16 cp r15, r24
6c0: 49 f7 brne .-46 ; 0x694 <LCD501_Line+0x8e>
6c2: 21 96 adiw r28, 0x01 ; 1
6c4: 0f b6 in r0, 0x3f ; 63
6c6: f8 94 cli
6c8: de bf out 0x3e, r29 ; 62
6ca: 0f be out 0x3f, r0 ; 63
6cc: cd bf out 0x3d, r28 ; 61
6ce: df 91 pop r29
6d0: cf 91 pop r28
6d2: 1f 91 pop r17
6d4: 0f 91 pop r16
6d6: ff 90 pop r15
6d8: ef 90 pop r14
6da: df 90 pop r13
6dc: cf 90 pop r12
6de: 08 95 ret
000006e0 <LCD_PaintRed_Dot>:
}
}
}
//参数:x要画的圆心的x坐标 y要画的圆心的y坐标 r半径
// Mode绘点模式:0 画圆框;1 画实心圆
//extern void W_Red_Err(int *a,int *b,int *r);
void LCD_PaintRed_Dot(char x,char y,char a,char b,char mode)//画圆程序
{
6e0: df 92 push r13
6e2: ef 92 push r14
6e4: ff 92 push r15
6e6: 0f 93 push r16
6e8: 1f 93 push r17
6ea: 16 2f mov r17, r22
6ec: 12 0f add r17, r18
6ee: d8 2e mov r13, r24
6f0: d4 1a sub r13, r20
6f2: f8 2e mov r15, r24
6f4: f4 0e add r15, r20
6f6: e6 2e mov r14, r22
6f8: e2 1a sub r14, r18
if(mode)
6fa: 00 23 and r16, r16
6fc: 69 f0 breq .+26 ; 0x718 <LCD_PaintRed_Dot+0x38>
{
LCD501_Line(x+a,y+b,x-a,y+b);
6fe: 21 2f mov r18, r17
700: 4d 2d mov r20, r13
702: 61 2f mov r22, r17
704: 8f 2d mov r24, r15
706: 0e 94 03 03 call 0x606 ; 0x606 <LCD501_Line>
LCD501_Line(x+a,y-b,x-a,y-b);
70a: 2e 2d mov r18, r14
70c: 4d 2d mov r20, r13
70e: 6e 2d mov r22, r14
710: 8f 2d mov r24, r15
712: 0e 94 03 03 call 0x606 ; 0x606 <LCD501_Line>
716: 10 c0 rjmp .+32 ; 0x738 <LCD_PaintRed_Dot+0x58>
}
else
{
LCD501_PutPixel(x+a,y+b);
718: 61 2f mov r22, r17
71a: 8f 2d mov r24, r15
71c: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
LCD501_PutPixel(x-a,y+b);
720: 61 2f mov r22, r17
722: 8d 2d mov r24, r13
724: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
LCD501_PutPixel(x+a,y-b);
728: 6e 2d mov r22, r14
72a: 8f 2d mov r24, r15
72c: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
LCD501_PutPixel(x-a,y-b);
730: 6e 2d mov r22, r14
732: 8d 2d mov r24, r13
734: 0e 94 d7 02 call 0x5ae ; 0x5ae <LCD501_PutPixel>
738: 1f 91 pop r17
73a: 0f 91 pop r16
73c: ff 90 pop r15
73e: ef 90 pop r14
740: df 90 pop r13
742: 08 95 ret
00000744 <_exit>:
744: ff cf rjmp .-2 ; 0x744 <_exit>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -