课设开个头

This commit is contained in:
iridiumR 2022-05-07 13:56:47 +08:00
parent 70a819dc7f
commit ede662b491
12 changed files with 1445 additions and 0 deletions

View file

@ -0,0 +1,410 @@
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 1
BL51 BANKED LINKER/LOCATER V6.22.2.0, INVOKED BY:
C:\KEIL_V5\C51\BIN\BL51.EXE .\Objects\main.obj, .\Objects\delay.obj, .\Objects\display.obj TO .\Objects\MCU_1 PRINT (.\L
>> istings\MCU_1.m51)
MEMORY MODEL: LARGE
INPUT MODULES INCLUDED:
.\Objects\main.obj (MAIN)
.\Objects\delay.obj (DELAY)
.\Objects\display.obj (DISPLAY)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C_STARTUP)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C_INIT)
LINK MAP OF MODULE: .\Objects\MCU_1 (MAIN)
TYPE BASE LENGTH RELOCATION SEGMENT NAME
-----------------------------------------------------
* * * * * * * D A T A M E M O R Y * * * * * * *
REG 0000H 0008H ABSOLUTE "REG BANK 0"
IDATA 0008H 0001H UNIT ?STACK
* * * * * * * X D A T A M E M O R Y * * * * * * *
XDATA 0000H 0080H UNIT ?XD?DISPLAY
XDATA 0080H 0004H UNIT ?XD?MAIN
XDATA 0084H 0004H UNIT ?XD?TEST?DISPLAY
XDATA 0088H 0004H UNIT _XDATA_GROUP_
* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
CODE 0003H 00EDH UNIT ?PR?DRAW?DISPLAY
CODE 00F0H 00C5H UNIT ?PR?CLEAR?DISPLAY
CODE 01B5H 00C5H UNIT ?PR?TEST?DISPLAY
CODE 027AH 008CH UNIT ?C_C51STARTUP
CODE 0306H 0085H UNIT ?C_INITSEG
CODE 038BH 0020H UNIT ?PR?_DELAY?DELAY
CODE 03ABH 001CH UNIT ?PR?INIT?DISPLAY
CODE 03C7H 0019H UNIT ?PR?WRITE?DISPLAY
CODE 03E0H 000BH UNIT ?PR?MAIN?MAIN
CODE 03EBH 000BH UNIT ?PR?DELAY100US?DELAY
CODE 03F6H 0007H UNIT ?PR?_WRITEDATA?DISPLAY
CODE 03FDH 0007H UNIT ?PR?_SETCOMMAND?DISPLAY
CODE 0404H 0007H UNIT ?PR?_SETPAGE?DISPLAY
CODE 040BH 0007H UNIT ?PR?_SETLINE?DISPLAY
CODE 0412H 0007H UNIT ?PR?_SETY?DISPLAY
OVERLAY MAP OF MODULE: .\Objects\MCU_1 (MAIN)
SEGMENT XDATA_GROUP
+--> CALLED SEGMENT START LENGTH
-----------------------------------------------
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 2
?C_C51STARTUP ----- -----
+--> ?PR?MAIN?MAIN
+--> ?C_INITSEG
?PR?MAIN?MAIN ----- -----
+--> ?PR?INIT?DISPLAY
+--> ?PR?CLEAR?DISPLAY
+--> ?PR?DRAW?DISPLAY
?PR?INIT?DISPLAY ----- -----
+--> ?PR?WRITE?DISPLAY
?PR?WRITE?DISPLAY ----- -----
+--> ?PR?_DELAY?DELAY
?PR?CLEAR?DISPLAY 0088H 0004H
+--> ?PR?WRITE?DISPLAY
?PR?DRAW?DISPLAY 0088H 0002H
+--> ?PR?WRITE?DISPLAY
SYMBOL TABLE OF MODULE: .\Objects\MCU_1 (MAIN)
VALUE TYPE NAME
----------------------------------
------- MODULE MAIN
C:0000H SYMBOL _ICE_DUMMY_
D:0090H PUBLIC P1
D:00B0H PUBLIC P3
D:00A8H PUBLIC IE
D:00B8H PUBLIC IP
C:03E0H PUBLIC main
D:0098H PUBLIC SCON
D:0088H PUBLIC TCON
D:00C8H PUBLIC T2CON
X:0080H PUBLIC i
X:0082H PUBLIC j
D:00D0H PUBLIC PSW
------- PROC MAIN
C:03E0H LINE# 14
C:03E0H LINE# 15
C:03E0H LINE# 16
C:03E3H LINE# 17
C:03E6H LINE# 19
C:03E6H LINE# 20
C:03E6H LINE# 21
C:03E9H LINE# 23
------- ENDPROC MAIN
------- ENDMOD MAIN
------- MODULE DELAY
C:0000H SYMBOL _ICE_DUMMY_
C:03EBH PUBLIC delay100us
C:038BH PUBLIC _delay
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 3
------- PROC DELAY100US
------- DO
D:0007H SYMBOL i
D:0006H SYMBOL j
------- ENDDO
C:03EBH LINE# 3
C:03EBH LINE# 4
C:03EBH LINE# 7
C:03ECH LINE# 8
C:03EDH LINE# 9
C:03EFH LINE# 10
C:03F1H LINE# 12
C:03F1H LINE# 13
C:03F3H LINE# 14
C:03F5H LINE# 15
------- ENDPROC DELAY100US
------- PROC _DELAY
D:0006H SYMBOL n
------- DO
D:0006H SYMBOL i
D:0004H SYMBOL j
------- ENDDO
C:038BH LINE# 24
C:038BH LINE# 26
C:038BH LINE# 27
C:0396H LINE# 28
C:03AAH LINE# 29
------- ENDPROC _DELAY
------- ENDMOD DELAY
------- MODULE DISPLAY
C:0000H SYMBOL _ICE_DUMMY_
D:0090H PUBLIC P1
D:00B0H PUBLIC P3
C:00F0H PUBLIC clear
D:00A8H PUBLIC IE
C:03FDH PUBLIC _setCommand
D:00B8H PUBLIC IP
B:00B0H.0 PUBLIC RS
C:0412H PUBLIC _setY
B:00B0H.1 PUBLIC RW
C:03F6H PUBLIC _writeData
C:03D0H PUBLIC write
C:0003H PUBLIC draw
X:0000H PUBLIC sine
D:0098H PUBLIC SCON
D:0088H PUBLIC TCON
C:03ABH PUBLIC init
C:01B5H PUBLIC test
B:00B0H.2 PUBLIC E
C:0404H PUBLIC _setPage
B:00B0H.4 PUBLIC CSA
B:00B0H.5 PUBLIC CSB
C:040BH PUBLIC _setLine
D:00C8H PUBLIC T2CON
D:00D0H PUBLIC PSW
C:03C7H SYMBOL L?0056
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 4
C:03CCH SYMBOL L?0057
------- PROC L?0055
------- ENDPROC L?0055
C:03C7H SYMBOL L?0056
C:03CCH SYMBOL L?0057
------- PROC WRITE
C:03D0H LINE# 18
C:03D0H LINE# 19
C:03D0H LINE# 20
C:03D2H LINE# 21
C:03D4H LINE# 22
C:03D6H LINE# 23
C:03DDH LINE# 24
C:03DFH LINE# 25
------- ENDPROC WRITE
------- PROC DRAW
------- DO
X:0088H SYMBOL j
------- ENDDO
C:0003H LINE# 27
C:0003H LINE# 28
C:0003H LINE# 30
C:0005H LINE# 31
C:0007H LINE# 33
C:001EH LINE# 34
C:001EH LINE# 36
C:0020H LINE# 37
C:0022H LINE# 38
C:0033H LINE# 39
C:0036H LINE# 40
C:003FH LINE# 41
C:0042H LINE# 42
C:0044H LINE# 43
C:0046H LINE# 44
C:0066H LINE# 45
C:0069H LINE# 46
C:0079H LINE# 48
C:007BH LINE# 49
C:007DH LINE# 50
C:0094H LINE# 51
C:0094H LINE# 53
C:0096H LINE# 54
C:0098H LINE# 55
C:00A9H LINE# 56
C:00ACH LINE# 57
C:00B5H LINE# 58
C:00B8H LINE# 61
C:00BAH LINE# 62
C:00BCH LINE# 63
C:00DCH LINE# 64
C:00DFH LINE# 65
C:00EFH LINE# 66
------- ENDPROC DRAW
------- PROC CLEAR
------- DO
X:0088H SYMBOL i
X:008AH SYMBOL j
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 5
------- ENDDO
C:00F0H LINE# 69
C:00F0H LINE# 70
C:00F0H LINE# 72
C:00F2H LINE# 73
C:00F4H LINE# 74
C:010BH LINE# 75
C:010BH LINE# 76
C:010BH LINE# 77
C:010BH LINE# 78
C:010BH LINE# 79
C:010EH LINE# 80
C:0111H LINE# 81
C:0114H LINE# 83
C:011BH LINE# 84
C:011BH LINE# 85
C:011DH LINE# 86
C:011FH LINE# 87
C:0122H LINE# 88
C:0125H LINE# 89
C:0142H LINE# 90
C:0152H LINE# 91
C:0154H LINE# 92
C:0156H LINE# 93
C:016DH LINE# 94
C:016DH LINE# 95
C:016DH LINE# 96
C:016DH LINE# 97
C:016DH LINE# 98
C:0170H LINE# 99
C:0173H LINE# 100
C:0176H LINE# 102
C:017DH LINE# 103
C:017DH LINE# 104
C:017FH LINE# 105
C:0181H LINE# 106
C:0184H LINE# 107
C:0187H LINE# 108
C:01A4H LINE# 109
C:01B4H LINE# 110
------- ENDPROC CLEAR
------- PROC INIT
C:03ABH LINE# 111
C:03ABH LINE# 112
C:03ABH LINE# 113
C:03ADH LINE# 114
C:03AFH LINE# 115
C:03B1H LINE# 116
C:03B3H LINE# 117
C:03B5H LINE# 118
C:03B8H LINE# 119
C:03BBH LINE# 121
C:03BDH LINE# 122
C:03BFH LINE# 123
C:03C1H LINE# 124
C:03C4H LINE# 125
------- ENDPROC INIT
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 6
------- PROC TEST
------- DO
X:0084H SYMBOL i
X:0086H SYMBOL j
------- ENDDO
C:01B5H LINE# 128
C:01B5H LINE# 129
C:01B5H LINE# 131
C:01B7H LINE# 132
C:01B9H LINE# 133
C:01D0H LINE# 134
C:01D0H LINE# 135
C:01D0H LINE# 136
C:01D0H LINE# 137
C:01D0H LINE# 138
C:01D3H LINE# 139
C:01D6H LINE# 140
C:01D9H LINE# 142
C:01E0H LINE# 143
C:01E0H LINE# 144
C:01E2H LINE# 145
C:01E4H LINE# 146
C:01E7H LINE# 147
C:01EAH LINE# 148
C:0207H LINE# 149
C:0217H LINE# 150
C:0219H LINE# 151
C:021BH LINE# 152
C:0232H LINE# 153
C:0232H LINE# 154
C:0232H LINE# 155
C:0232H LINE# 156
C:0232H LINE# 157
C:0235H LINE# 158
C:0238H LINE# 159
C:023BH LINE# 161
C:0242H LINE# 162
C:0242H LINE# 163
C:0244H LINE# 164
C:0246H LINE# 165
C:0249H LINE# 166
C:024CH LINE# 167
C:0269H LINE# 168
C:0279H LINE# 169
------- ENDPROC TEST
------- PROC _WRITEDATA
D:0007H SYMBOL d
C:03F6H LINE# 172
C:03F6H LINE# 173
C:03F6H LINE# 174
C:03F8H LINE# 175
C:03FAH LINE# 176
C:03FCH LINE# 177
------- ENDPROC _WRITEDATA
------- PROC _SETCOMMAND
D:0007H SYMBOL d
C:03FDH LINE# 179
BL51 BANKED LINKER/LOCATER V6.22.2.0 05/05/2022 20:42:31 PAGE 7
C:03FDH LINE# 180
C:03FDH LINE# 181
C:03FFH LINE# 182
C:0401H LINE# 183
C:0403H LINE# 184
------- ENDPROC _SETCOMMAND
------- PROC _SETPAGE
D:0007H SYMBOL p
C:0404H LINE# 187
C:0404H LINE# 188
C:0404H LINE# 189
------- ENDPROC _SETPAGE
------- PROC _SETLINE
D:0007H SYMBOL p
C:040BH LINE# 192
C:040BH LINE# 193
C:040BH LINE# 194
------- ENDPROC _SETLINE
------- PROC _SETY
D:0007H SYMBOL p
C:0412H LINE# 197
C:0412H LINE# 198
C:0412H LINE# 199
------- ENDPROC _SETY
------- ENDMOD DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?DELAY100US?DELAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?TEST?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_WRITEDATA?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_SETPAGE?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_SETLINE?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_SETY?DISPLAY
Program Size: data=9.0 xdata=140 code=1049
LINK/LOCATE RUN COMPLETE. 6 WARNING(S), 0 ERROR(S)

View file

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>MCU_1</TargetName>
<ToolsetNumber>0x0</ToolsetNumber>
<ToolsetName>MCS-51</ToolsetName>
<TargetOption>
<CLK51>24000000</CLK51>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>0</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>120</PageWidth>
<PageLength>65</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Listings\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>255</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Data Sheet</Title>
<Path>DATASHTS\ATMEL\AT89C51_DS.PDF</Path>
</Book>
<Book>
<Number>1</Number>
<Title>Instruction Set Manual</Title>
<Path>DATASHTS\ATMEL\AT_C51ISM.PDF</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>0</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\MON51.DLL</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTP51</Key>
<Name>(98=-1,-1,-1,-1,0)(82=-1,-1,-1,-1,0)(83=-1,-1,-1,-1,0)(84=-1,-1,-1,-1,0)(85=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(91=-1,-1,-1,-1,0)(92=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>MON51</Key>
<Name>-S2 -B115200 -O15</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</Target>
<Group>
<GroupName>SRC</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\delay.c</PathWithFileName>
<FilenameWithoutPath>delay.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\display.c</PathWithFileName>
<FilenameWithoutPath>display.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\snake.c</PathWithFileName>
<FilenameWithoutPath>snake.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>INC</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.h</PathWithFileName>
<FilenameWithoutPath>main.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\display.h</PathWithFileName>
<FilenameWithoutPath>display.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\snake.h</PathWithFileName>
<FilenameWithoutPath>snake.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>

View file

@ -0,0 +1,425 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_proj.xsd">
<SchemaVersion>1.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Targets>
<Target>
<TargetName>MCU_1</TargetName>
<ToolsetNumber>0x0</ToolsetNumber>
<ToolsetName>MCS-51</ToolsetName>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>AT89C51</Device>
<Vendor>Microchip</Vendor>
<Cpu>IRAM(0-0x7F) IROM(0-0xFFF) CLOCK(24000000)</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile>"LIB\STARTUP.A51" ("Standard 8051 Startup Code")</StartupFile>
<FlashDriverDll></FlashDriverDll>
<DeviceId>2976</DeviceId>
<RegisterFile>REGX51.H</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile></SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath>Atmel\</RegisterFilePath>
<DBRegisterFilePath>Atmel\</DBRegisterFilePath>
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
<ButtonStop>0</ButtonStop>
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>MCU_1</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>1</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Listings\</ListingPath>
<HexFormatSelection>0</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>0</AlwaysBuild>
<GenerateAssemblyFile>0</GenerateAssemblyFile>
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
<BankNo>65535</BankNo>
</CommonProperty>
<DllOption>
<SimDllName>S8051.DLL</SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll>DP51.DLL</SimDlgDll>
<SimDlgDllArguments>-p51</SimDlgDllArguments>
<TargetDllName>S8051.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDlgDll>TP51.DLL</TargetDlgDll>
<TargetDlgDllArguments>-p51</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
<HexSelection>0</HexSelection>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
<Simulator>
<UseSimulator>0</UseSimulator>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>1</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
<RestoreSysVw>1</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>1</UseTarget>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>0</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<RestoreTracepoints>1</RestoreTracepoints>
<RestoreSysVw>1</RestoreSysVw>
</Target>
<RunDebugAfterBuild>0</RunDebugAfterBuild>
<TargetSelection>0</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
</SimDlls>
<TargetDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
<Driver>BIN\MON51.DLL</Driver>
</TargetDlls>
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>0</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging>
<Capability>0</Capability>
<DriverSelection>-1</DriverSelection>
</Flash1>
<bUseTDR>0</bUseTDR>
<Flash2></Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>0</FcArmLst>
</Utilities>
<Target51>
<Target51Misc>
<MemoryModel>2</MemoryModel>
<RTOS>0</RTOS>
<RomSize>2</RomSize>
<DataHold>0</DataHold>
<XDataHold>0</XDataHold>
<UseOnchipRom>0</UseOnchipRom>
<UseOnchipArithmetic>0</UseOnchipArithmetic>
<UseMultipleDPTR>0</UseMultipleDPTR>
<UseOnchipXram>0</UseOnchipXram>
<HadIRAM>1</HadIRAM>
<HadXRAM>0</HadXRAM>
<HadIROM>1</HadIROM>
<Moda2>0</Moda2>
<Moddp2>0</Moddp2>
<Modp2>0</Modp2>
<Mod517dp>0</Mod517dp>
<Mod517au>0</Mod517au>
<Mode2>0</Mode2>
<useCB>0</useCB>
<useXB>0</useXB>
<useL251>0</useL251>
<useA251>0</useA251>
<Mx51>0</Mx51>
<ModC812>0</ModC812>
<ModCont>0</ModCont>
<Lp51>0</Lp51>
<useXBS>0</useXBS>
<ModDA>0</ModDA>
<ModAB2>0</ModAB2>
<Mx51P>0</Mx51P>
<hadXRAM2>0</hadXRAM2>
<uocXram2>0</uocXram2>
<hadXRAM3>0</hadXRAM3>
<ModC2>0</ModC2>
<ModH2>0</ModH2>
<Mdu_R515>0</Mdu_R515>
<Mdu_F120>0</Mdu_F120>
<Psoc>0</Psoc>
<hadIROM2>0</hadIROM2>
<hadIROM3>0</hadIROM3>
<ModSmx2>0</ModSmx2>
<cBanks>0</cBanks>
<xBanks>0</xBanks>
<OnChipMemories>
<RCB>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0xffff</Size>
</RCB>
<RXB>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</RXB>
<Ocm1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm1>
<Ocm2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm2>
<Ocm3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm3>
<Ocr1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocr1>
<Ocr2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocr2>
<Ocr3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocr3>
<IRO>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x1000</Size>
</IRO>
<IRA>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x80</Size>
</IRA>
<XRA>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRA>
<XRA512>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRA512>
<IROM512>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</IROM512>
<XRA513>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRA513>
<IROM513>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</IROM513>
</OnChipMemories>
</Target51Misc>
<C51>
<RegisterColoring>0</RegisterColoring>
<VariablesInOrder>0</VariablesInOrder>
<IntegerPromotion>1</IntegerPromotion>
<uAregs>0</uAregs>
<UseInterruptVector>1</UseInterruptVector>
<Fuzzy>3</Fuzzy>
<Optimize>8</Optimize>
<WarningLevel>2</WarningLevel>
<SizeSpeed>1</SizeSpeed>
<ObjectExtend>1</ObjectExtend>
<ACallAJmp>0</ACallAJmp>
<InterruptVectorAddress>0</InterruptVectorAddress>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\MCU</IncludePath>
</VariousControls>
</C51>
<Ax51>
<UseMpl>0</UseMpl>
<UseStandard>1</UseStandard>
<UseCase>0</UseCase>
<UseMod51>0</UseMod51>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Ax51>
<Lx51>
<useFile>0</useFile>
<linkonly>0</linkonly>
<UseMemoryFromTarget>1</UseMemoryFromTarget>
<CaseSensitiveSymbols>0</CaseSensitiveSymbols>
<WarningLevel>2</WarningLevel>
<DataOverlaying>1</DataOverlaying>
<OverlayString></OverlayString>
<MiscControls></MiscControls>
<DisableWarningNumbers></DisableWarningNumbers>
<LinkerCmdFile></LinkerCmdFile>
<Assign></Assign>
<ReserveString></ReserveString>
<CClasses></CClasses>
<UserClasses></UserClasses>
<CSection></CSection>
<UserSection></UserSection>
<CodeBaseAddress></CodeBaseAddress>
<XDataBaseAddress></XDataBaseAddress>
<PDataBaseAddress></PDataBaseAddress>
<BitBaseAddress></BitBaseAddress>
<DataBaseAddress></DataBaseAddress>
<IDataBaseAddress></IDataBaseAddress>
<Precede></Precede>
<Stack></Stack>
<CodeSegmentName></CodeSegmentName>
<XDataSegmentName></XDataSegmentName>
<BitSegmentName></BitSegmentName>
<DataSegmentName></DataSegmentName>
<IDataSegmentName></IDataSegmentName>
</Lx51>
</Target51>
</TargetOption>
<Groups>
<Group>
<GroupName>SRC</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
</File>
<File>
<FileName>delay.c</FileName>
<FileType>1</FileType>
<FilePath>.\delay.c</FilePath>
</File>
<File>
<FileName>display.c</FileName>
<FileType>1</FileType>
<FilePath>.\display.c</FilePath>
</File>
<File>
<FileName>snake.c</FileName>
<FileType>1</FileType>
<FilePath>.\snake.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>INC</GroupName>
<Files>
<File>
<FileName>main.h</FileName>
<FileType>5</FileType>
<FilePath>.\main.h</FilePath>
</File>
<File>
<FileName>display.h</FileName>
<FileType>5</FileType>
<FilePath>.\display.h</FilePath>
</File>
<File>
<FileName>snake.h</FileName>
<FileType>5</FileType>
<FilePath>.\snake.h</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
</Project>

29
MCU/Final_Design/delay.c Normal file
View file

@ -0,0 +1,29 @@
#include "delay.h"
#include <intrins.h>
void delay100us()
{
unsigned char i, j;
_nop_();
_nop_();
i = 2;
j = 15;
do
{
while (--j);
} while (--i);
}
//void delay(int i)
//{
// int j = i;
// for(;j>0;j--)
// delay100us();
//}
void delay(int n)
{int i, j;
for(i=n;i>0;i--)
for(j = 28; j > 0; j--);
}

7
MCU/Final_Design/delay.h Normal file
View file

@ -0,0 +1,7 @@
#ifndef _DELAY_H_
#define _DELAY_H_
void delay(int i);
void delay100us();
#endif

200
MCU/Final_Design/display.c Normal file
View file

@ -0,0 +1,200 @@
#include <reg52.h>
#include "display.h"
#include "delay.h"
// DB P1
// CTL P3
sbit RS = P3 ^ 0;
sbit RW = P3 ^ 1;
sbit E = P3 ^ 2;
sbit CSA = P3 ^ 4;
sbit CSB = P3 ^ 5;
unsigned char sine[] = {32,33,34,36,37,39,40,42,43,44,46,47,48,49,51,52,53,54,55,56,56,57,58,59,59,60,60,61,61,61,61,61,61,61,61,61,61,61,60,60,59,59,58,57,56,56,55,54,53,52,51,49,48,47,46,44,43,42,40,39,37,36,34,33,32,30,29,27,26,24,23,21,20,19,17,16,15,14,12,11,10,9,8,7,7,6,5,4,4,3,3,2,2,2,2,2,2,2,2,2,2,2,3,3,4,4,5,6,7,7,8,9,10,11,12,14,15,16,17,19,20,21,23,24,26,27,29,30};
void write()
{
RW = 0;
E = 0;
E = 1;
delay(2);
E = 0;
}
void draw()
{
unsigned int j;
CSA = 1;
CSB = 0;
for(j = 0; j < 64; j++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + (sine[j] / 8); //页
write();
P1 = 0X40 + j; //Y
write();
RS = 1;
RW = 0;
P1 = 1<<(sine[j] % 8);
write();
}
CSA = 0;
CSB = 1;
for(j = 0; j < 64; j++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + (sine[63 + j] / 8); //页
write();
P1 = 0X40 + j; //Y
write();
RS = 1;
RW = 0;
P1 = 1<<(sine[j+63] % 8);
write();
}
}
void clear()
{
unsigned int i, j;
CSA = 1;
CSB = 0;
for(i = 0; i < 8; i++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + i;
write();
P1 = 0X40;
write();
for(j = 0; j < 64; j++)
{
RS = 1;
RW = 0;
P1 = 0x00;;
write();
}
}
CSA = 0;
CSB = 1;
for(i = 0; i < 8; i++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + i;
write();
P1 = 0X40;
write();
for(j = 0; j < 64; j++)
{
RS = 1;
RW = 0;
P1 = 0x00;
write();
}
}
}
void init()
{
E = 0;
RS = 1;
CSA = 1;
CSB = 0;
RS = 0;
P1 = 0X3F;
write();
CSA = 0;
CSB = 1;
RS = 0;
P1 = 0X3F;
write();
}
void test()
{
unsigned int i, j;
CSA = 1;
CSB = 0;
for(i = 0; i < 8; i++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + i;
write();
P1 = 0X40;
write();
for(j = 0; j < 64; j++)
{
RS = 1;
RW = 0;
P1 = 0x55;
write();
}
}
CSA = 0;
CSB = 1;
for(i = 0; i < 8; i++)
{
RS = 0;
RW = 0;
P1 = 0xb8 + i;
write();
P1 = 0X40;
write();
for(j = 0; j < 64; j++)
{
RS = 1;
RW = 0;
P1 = 0x55;;
write();
}
}
}
void writeData(unsigned char d)
{
RS = 1;
RW = 0;
P1 = d;
}
void setCommand(unsigned char d)
{
RS = 0;
RW = 0;
P1 = d;
}
void setPage(unsigned char p)
{
setCommand(0xb8 + p);
}
void setLine(unsigned char p)
{
setCommand(0xc0 + p);
}
void setY(unsigned char p)
{
setCommand(0x40 + p);
}

View file

@ -0,0 +1,17 @@
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
void setData(unsigned char d);
void setCommand(unsigned char d);
void lcdInit();
void setPage(unsigned char p);
void setPage(unsigned char p);
void setLine(unsigned char p);
void setY(unsigned char p);
void test();
void init();
void clear();
void name(unsigned int i);
void write();
void draw();
#endif

19
MCU/Final_Design/main.c Normal file
View file

@ -0,0 +1,19 @@
#include "delay.h"
#include "main.h"
#include "display.h"
unsigned int i;
unsigned int j;
int main()
{
init();
clear();
while(1)
{
draw();
}
}

11
MCU/Final_Design/main.h Normal file
View file

@ -0,0 +1,11 @@
#ifndef _MAIN_H_
#define _MAIN_H_
#include <reg52.h>
#include <intrins.h>
#include <absacc.h>
#include "display.h"
#endif

8
MCU/Final_Design/snake.c Normal file
View file

@ -0,0 +1,8 @@
#include "snake.h"
Body head[40]={{0,0},0,-1};
void snake_init()
{
}

26
MCU/Final_Design/snake.h Normal file
View file

@ -0,0 +1,26 @@
#include <reg52.h>
#include <stdio.h>
#define bool char
typedef enum
{
N=0,U, D, L, R
} MOVE_STATE;
struct DOT
{
unsigned char x;
unsigned char y;
} ;
struct BODY
{
dot d;
MOVE_STATE ms;
char id;
};
typedef struct BODY Body;
typedef struct DOT Dot;

View file

@ -2,6 +2,10 @@
"folders": [ "folders": [
{ {
"path": "." "path": "."
},
{
"name": "esp32",
"path": "E:\\esp32"
} }
], ],
"settings": {} "settings": {}