📄 3510i.lst
字号:
1A2F 2700 CLR R16
(0166) clr_bit(LCD_SIO_DDR, LCD_SIO); //set SDI.DDR = 0
1A30 98BD CBI 0x17,5
(0167) set_bit(LCD_SIO_PORT, LCD_SIO);
1A31 9AC5 SBI 0x18,5
(0168) clr_bit(LCD_CS_PORT, LCD_CS); //set CS = L
1A32 98C4 CBI 0x18,4
(0169) //Bit 0(MSB)
(0170) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A33 98C7 CBI 0x18,7
(0171) set_bit(LCD_SCL_PORT, LCD_SCL);
1A34 9AC7 SBI 0x18,7
(0172) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A35 B386 IN R24,0x16
1A36 6280 ORI R24,0x20
1A37 BB86 OUT 0x16,R24
1A38 2388 TST R24
1A39 F011 BEQ 0x1A3C
(0173) r |= 0x80;
1A3A 6800 ORI R16,0x80
1A3B C001 RJMP 0x1A3D
(0174) else
(0175) r &= ~0x80;
1A3C 770F ANDI R16,0x7F
(0176) //Bit 1
(0177) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A3D 98C7 CBI 0x18,7
(0178) set_bit(LCD_SCL_PORT, LCD_SCL);
1A3E 9AC7 SBI 0x18,7
(0179) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A3F B386 IN R24,0x16
1A40 6280 ORI R24,0x20
1A41 BB86 OUT 0x16,R24
1A42 2388 TST R24
1A43 F011 BEQ 0x1A46
(0180) r |= 0x40;
1A44 6400 ORI R16,0x40
1A45 C001 RJMP 0x1A47
(0181) else
(0182) r &= ~0x40;
1A46 7B0F ANDI R16,0xBF
(0183) //Bit 2
(0184) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A47 98C7 CBI 0x18,7
(0185) set_bit(LCD_SCL_PORT, LCD_SCL);
1A48 9AC7 SBI 0x18,7
(0186) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A49 B386 IN R24,0x16
1A4A 6280 ORI R24,0x20
1A4B BB86 OUT 0x16,R24
1A4C 2388 TST R24
1A4D F011 BEQ 0x1A50
(0187) r |= 0x20;
1A4E 6200 ORI R16,0x20
1A4F C001 RJMP 0x1A51
(0188) else
(0189) r &= ~0x20;
1A50 7D0F ANDI R16,0xDF
(0190) //Bit 3
(0191) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A51 98C7 CBI 0x18,7
(0192) set_bit(LCD_SCL_PORT, LCD_SCL);
1A52 9AC7 SBI 0x18,7
(0193) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A53 B386 IN R24,0x16
1A54 6280 ORI R24,0x20
1A55 BB86 OUT 0x16,R24
1A56 2388 TST R24
1A57 F011 BEQ 0x1A5A
(0194) r |= 0x10;
1A58 6100 ORI R16,0x10
1A59 C001 RJMP 0x1A5B
(0195) else
(0196) r &= ~0x10;
1A5A 7E0F ANDI R16,0xEF
(0197) //Bit 4
(0198) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A5B 98C7 CBI 0x18,7
(0199) set_bit(LCD_SCL_PORT, LCD_SCL);
1A5C 9AC7 SBI 0x18,7
(0200) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A5D B386 IN R24,0x16
1A5E 6280 ORI R24,0x20
1A5F BB86 OUT 0x16,R24
1A60 2388 TST R24
1A61 F011 BEQ 0x1A64
(0201) r |= 0x08;
1A62 6008 ORI R16,0x8
1A63 C001 RJMP 0x1A65
(0202) else
(0203) r &= ~0x08;
1A64 7F07 ANDI R16,0xF7
(0204) //Bit 5
(0205) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A65 98C7 CBI 0x18,7
(0206) set_bit(LCD_SCL_PORT, LCD_SCL);
1A66 9AC7 SBI 0x18,7
(0207) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A67 B386 IN R24,0x16
1A68 6280 ORI R24,0x20
1A69 BB86 OUT 0x16,R24
1A6A 2388 TST R24
1A6B F011 BEQ 0x1A6E
(0208) r |= 0x04;
1A6C 6004 ORI R16,4
1A6D C001 RJMP 0x1A6F
(0209) else
(0210) r &= ~0x04;
1A6E 7F0B ANDI R16,0xFB
(0211) //Bit 6
(0212) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A6F 98C7 CBI 0x18,7
(0213) set_bit(LCD_SCL_PORT, LCD_SCL);
1A70 9AC7 SBI 0x18,7
(0214) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A71 B386 IN R24,0x16
1A72 6280 ORI R24,0x20
1A73 BB86 OUT 0x16,R24
1A74 2388 TST R24
1A75 F011 BEQ 0x1A78
(0215) r |= 0x02;
1A76 6002 ORI R16,2
1A77 C001 RJMP 0x1A79
(0216) else
(0217) r &= ~0x02;
1A78 7F0D ANDI R16,0xFD
(0218) //Bit 7(LSB)
(0219) clr_bit(LCD_SCL_PORT, LCD_SCL);
1A79 98C7 CBI 0x18,7
(0220) set_bit(LCD_SCL_PORT, LCD_SCL);
1A7A 9AC7 SBI 0x18,7
(0221) if(set_bit(LCD_SIO_PIN, LCD_SIO))
1A7B B386 IN R24,0x16
1A7C 6280 ORI R24,0x20
1A7D BB86 OUT 0x16,R24
1A7E 2388 TST R24
1A7F F011 BEQ 0x1A82
(0222) r |= 0x01;
1A80 6001 ORI R16,1
1A81 C001 RJMP 0x1A83
(0223) else
(0224) r &= ~0x01;
1A82 7F0E ANDI R16,0xFE
(0225) //done
(0226) return r;
1A83 9508 RET
_LCD_Initialize:
i --> R10
1A84 940E1E85 CALL push_gset3x
(0227) }
(0228)
(0229) void LCD_Initialize(void)
(0230) {
(0231) uchar i;
(0232)
(0233) set_bit(LCD_RST_PORT, LCD_RST); //set RST = H
1A86 9AC3 SBI 0x18,3
(0234) set_bit(LCD_RST_DDR, LCD_RST); //set RST.DDR = 1
1A87 9ABB SBI 0x17,3
(0235) set_bit(LCD_CS_PORT, LCD_CS); //set CS = H
1A88 9AC4 SBI 0x18,4
(0236) set_bit(LCD_CS_DDR, LCD_CS); //set CS.DDR = 1
1A89 9ABC SBI 0x17,4
(0237) clr_bit(LCD_SIO_PORT, LCD_SIO); //set SDI = L
1A8A 98C5 CBI 0x18,5
(0238) clr_bit(LCD_SIO_DDR, LCD_SIO); //set SDI.DDR = 0
1A8B 98BD CBI 0x17,5
(0239) set_bit(LCD_SCL_PORT, LCD_SCL); //set SCK = H
1A8C 9AC7 SBI 0x18,7
(0240) set_bit(LCD_SCL_DDR, LCD_SCL); //set SCK.DDR = 1
1A8D 9ABF SBI 0x17,7
(0241)
(0242) LCD_Reset();
1A8E DF19 RCALL _LCD_Reset
(0243)
(0244) LCD_SendCommand(0x01); //software reset
1A8F E001 LDI R16,1
1A90 DF1C RCALL _LCD_SendCommand
(0245) LCD_DataOver();
1A91 9AC4 SBI 0x18,4
(0246) LCD_Delay();
1A92 DF0A RCALL _LCD_Delay
(0247)
(0248) LCD_SendCommand(0xc6); //initial escape
1A93 EC06 LDI R16,0xC6
1A94 DF18 RCALL _LCD_SendCommand
(0249) LCD_DataOver();
1A95 9AC4 SBI 0x18,4
(0250)
(0251) LCD_SendCommand(0xb9); //refresh set
1A96 EB09 LDI R16,0xB9
1A97 DF15 RCALL _LCD_SendCommand
(0252) LCD_SendData(0x00);
1A98 2700 CLR R16
1A99 DF51 RCALL _LCD_SendData
(0253) LCD_DataOver();
1A9A 9AC4 SBI 0x18,4
(0254)
(0255) LCD_SendCommand(0xb6); //display control
1A9B EB06 LDI R16,0xB6
1A9C DF10 RCALL _LCD_SendCommand
(0256) LCD_SendData(0x80);
1A9D E800 LDI R16,0x80
1A9E DF4C RCALL _LCD_SendData
(0257) LCD_SendData(0x80);
1A9F E800 LDI R16,0x80
1AA0 DF4A RCALL _LCD_SendData
(0258) LCD_SendData(0x81);
1AA1 E801 LDI R16,0x81
1AA2 DF48 RCALL _LCD_SendData
(0259) //LCD_SendData(0x7f);
(0260) //LCD_SendData(0x14);
(0261) LCD_SendData(84);
1AA3 E504 LDI R16,0x54
1AA4 DF46 RCALL _LCD_SendData
(0262) LCD_SendData(69);
1AA5 E405 LDI R16,0x45
1AA6 DF44 RCALL _LCD_SendData
(0263) LCD_SendData(82);
1AA7 E502 LDI R16,0x52
1AA8 DF42 RCALL _LCD_SendData
(0264) LCD_SendData(67);
1AA9 E403 LDI R16,0x43
1AAA DF40 RCALL _LCD_SendData
(0265) LCD_DataOver();
1AAB 9AC4 SBI 0x18,4
(0266)
(0267) LCD_SendCommand(0xb3); //gray scale position set
1AAC EB03 LDI R16,0xB3
1AAD DEFF RCALL _LCD_SendCommand
(0268) LCD_SendData(1);
1AAE E001 LDI R16,1
1AAF DF3B RCALL _LCD_SendData
(0269) LCD_SendData(2);
1AB0 E002 LDI R16,2
1AB1 DF39 RCALL _LCD_SendData
(0270) LCD_SendData(4);
1AB2 E004 LDI R16,4
1AB3 DF37 RCALL _LCD_SendData
(0271) LCD_SendData(8);
1AB4 E008 LDI R16,0x8
1AB5 DF35 RCALL _LCD_SendData
(0272) LCD_SendData(16);
1AB6 E100 LDI R16,0x10
1AB7 DF33 RCALL _LCD_SendData
(0273) LCD_SendData(30);
1AB8 E10E LDI R16,0x1E
1AB9 DF31 RCALL _LCD_SendData
(0274) LCD_SendData(40);
1ABA E208 LDI R16,0x28
1ABB DF2F RCALL _LCD_SendData
(0275) LCD_SendData(50);
1ABC E302 LDI R16,0x32
1ABD DF2D RCALL _LCD_SendData
(0276) LCD_SendData(60);
1ABE E30C LDI R16,0x3C
1ABF DF2B RCALL _LCD_SendData
(0277) LCD_SendData(70);
1AC0 E406 LDI R16,0x46
1AC1 DF29 RCALL _LCD_SendData
(0278) LCD_SendData(80);
1AC2 E500 LDI R16,0x50
1AC3 DF27 RCALL _LCD_SendData
(0279) LCD_SendData(90);
1AC4 E50A LDI R16,0x5A
1AC5 DF25 RCALL _LCD_SendData
(0280) LCD_SendData(100);
1AC6 E604 LDI R16,0x64
1AC7 DF23 RCALL _LCD_SendData
(0281) LCD_SendData(110);
1AC8 E60E LDI R16,0x6E
1AC9 DF21 RCALL _LCD_SendData
(0282) LCD_SendData(127);
1ACA E70F LDI R16,0x7F
1ACB DF1F RCALL _LCD_SendData
(0283) LCD_DataOver();
1ACC 9AC4 SBI 0x18,4
(0284)
(0285) LCD_SendCommand(0xb5); //gamma curve set
1ACD EB05 LDI R16,0xB5
1ACE DEDE RCALL _LCD_SendCommand
(0286) LCD_SendData(0x01);
1ACF E001 LDI R16,1
1AD0 DF1A RCALL _LCD_SendData
(0287) LCD_DataOver();
1AD1 9AC4 SBI 0x18,4
(0288)
(0289) LCD_SendCommand(0x36); //memery access control
1AD2 E306 LDI R16,0x36
1AD3 DED9 RCALL _LCD_SendCommand
(0290) LCD_SendData(0x00);
1AD4 2700 CLR R16
1AD5 DF15 RCALL _LCD_SendData
(0291) LCD_DataOver();
1AD6 9AC4 SBI 0x18,4
(0292)
(0293) LCD_SendCommand(0xbd); //common driver output select//很重要的
1AD7 EB0D LDI R16,0xBD
1AD8 DED4 RCALL _LCD_SendCommand
(0294) LCD_SendData(0x04);
1AD9 E004 LDI R16,4
1ADA DF10 RCALL _LCD_SendData
(0295) LCD_DataOver();
1ADB 9AC4 SBI 0x18,4
(0296)
(0297) LCD_SendCommand(0xbe); //power control
1ADC EB0E LDI R16,0xBE
1ADD DECF RCALL _LCD_SendCommand
(0298) LCD_SendData(0x04);
1ADE E004 LDI R16,4
1ADF DF0B RCALL _LCD_SendData
(0299) LCD_DataOver();
1AE0 9AC4 SBI 0x18,4
(0300)
(0301) LCD_SendCommand(0x11); //sleep out
1AE1 E101 LDI R16,0x11
1AE2 DECA RCALL _LCD_SendCommand
(0302) LCD_DataOver();
1AE3 9AC4 SBI 0x18,4
(0303)
(0304) LCD_SendCommand(0xba); //voltage control
1AE4 EB0A LDI R16,0xBA
1AE5 DEC7 RCALL _LCD_SendCommand
(0305) LCD_SendData(127);
1AE6 E70F LDI R16,0x7F
1AE7 DF03 RCALL _LCD_SendData
(0306) LCD_SendData(3);
1AE8 E003 LDI R16,3
1AE9 DF01 RCALL _LCD_SendData
(0307) LCD_DataOver();
1AEA 9AC4 SBI 0x18,4
(0308)
(0309) LCD_SendCommand(0xb7); //temperature gradient set
1AEB EB07 LDI R16,0xB7
1AEC DEC0 RCALL _LCD_SendCommand
(0310) for(i = 0; i < 14; i ++)
1AED 24AA CLR R10
1AEE C003 RJMP 0x1AF2
(0311) LCD_SendData(0x00);
1AEF 2700 CLR R16
1AF0 DEFA RCALL _LCD_SendData
1AF1 94A3 INC R10
1AF2 2D8A MOV R24,R10
1AF3 308E CPI R24,0xE
1AF4 F3D0 BCS 0x1AEF
(0312) LCD_DataOver();
1AF5 9AC4 SBI 0x18,4
(0313)
(0314) LCD_SendCommand(0x29); //display ON
1AF6 E209 LDI R16,0x29
1AF7 DEB5 RCALL _LCD_SendCommand
(0315) LCD_DataOver();
1AF8 9AC4 SBI 0x18,4
(0316)
(0317) LCD_SendCommand(0x03); //booster voltage ON
1AF9 E003 LDI R16,3
1AFA DEB2 RCALL _LCD_SendCommand
(0318) LCD_DataOver();
1AFB 9AC4 SBI 0x18,4
(0319) LCD_Delay();
1AFC DEA0 RCALL _LCD_Delay
(0320)
(0321) LCD_SendCommand(0x20); //display inversion OFF
1AFD E200 LDI R16,0x20
1AFE DEAE RCALL _LCD_SendCommand
(0322) LCD_DataOver();
1AFF 9AC4 SBI 0x18,4
(0323)
(0324) LCD_SendCommand(0x3a); //interface pixel format
1B00 E30A LDI R16,0x3A
1B01 DEAB RCALL _LCD_SendCommand
(0325) LCD_SendData(0x02);
1B02 E002 LDI R16,2
1B03 DEE7 RCALL _LCD_SendData
(0326) LCD_DataOver();
1B04 9AC4 SBI 0x18,4
(0327)
(0328) LCD_SendCommand(0x2d); //colour set
1B05 E20D LDI R16,0x2D
1B06 DEA6 RCALL _LCD_SendCommand
(0329) //red
(0330) LCD_SendData(0x00);
1B07 2700 CLR R16
1B08 DEE2 RCALL _LCD_SendData
(0331) LCD_SendData(0x02);
1B09 E002 LDI R16,2
1B0A DEE0 RCALL _LCD_SendData
(0332) LCD_SendData(0x03);
1B0B E003 LDI R16,3
1B0C DEDE RCALL _LCD_SendData
(0333) LCD_SendData(0x04);
1B0D E004 LDI R16,4
1B0E DEDC RCALL _LCD_SendData
(0334) LCD_SendData(0x05);
1B0F E005 LDI R16,5
1B10 DEDA RCALL _LCD_SendData
(0335) LCD_SendData(0x06);
1B11 E006 LDI R16,6
1B12 DED8 RCALL _LCD_SendData
(0336) LCD_SendData(0x08);
1B13 E008 LDI R16,0x8
1B14 DED6 RCALL _LCD_SendData
(0337) //green
(0338) LCD_SendData(0x0f);
1B15 E00F LDI R16,0xF
1B16 DED4 RCALL _LCD_SendData
(0339) LCD_SendData(0x00);
1B17 2700 CLR R16
1B18 DED2 RCALL _LCD_SendData
(0340) LCD_SendData(0x02);
1B19 E002 LDI R16,2
1B1A DED0 RCALL _LCD_SendData
(0341) LCD_SendData(0x03);
1B1B E003 LDI R16,3
1B1C DECE RCALL _LCD_SendData
(0342) LCD_SendData(0x04);
1B1D E004 LDI R16,4
1B1E DECC RCALL _LCD_SendData
(0343) LCD_SendData(0x05);
1B1F E005 LDI R16,5
1B20 DECA RCALL _LCD_SendData
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -