半成品

This commit is contained in:
iridiumR 2022-04-28 10:00:04 +08:00
parent 61cc77b855
commit f6fff9beef
28 changed files with 3894 additions and 1 deletions

View file

@ -153,7 +153,7 @@
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>MAIN.C</Filename>
<Filename>D:\ACPP\MCU\MCU_4 _Wave\MAIN.C</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>

View file

@ -0,0 +1,266 @@
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/14/2022 21:42:03 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?UIDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?ULDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?SLDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?LSTXDATA)
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 007AH UNIT ?XD?MAIN
XDATA 007AH 0010H UNIT ?XD?DISPLAY
XDATA 008AH 0001H UNIT _XDATA_GROUP_
* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
0003H 0008H *** GAP ***
CODE 000BH 0003H ABSOLUTE
CODE 000EH 012FH UNIT ?C?LIB_CODE
CODE 013DH 00B2H UNIT ?PR?_SET_DISPLAY?DISPLAY
CODE 01EFH 00AFH UNIT ?PR?FRESH_DISPLAY?DISPLAY
CODE 029EH 008CH UNIT ?C_C51STARTUP
CODE 032AH 0085H UNIT ?C_INITSEG
CODE 03AFH 005FH UNIT ?PR?TIME?MAIN
CODE 040EH 0044H UNIT ?C?LDIV
CODE 0452H 0029H UNIT ?PR?SETCONFIG?MAIN
CODE 047BH 0029H UNIT ?PR?FRESH_WAVE?MAIN
CODE 04A4H 0019H UNIT ?PR?MAIN?MAIN
CODE 04BDH 000EH UNIT ?PR?_DELAY?DELAY
OVERLAY MAP OF MODULE: .\Objects\MCU_1 (MAIN)
SEGMENT XDATA_GROUP
+--> CALLED SEGMENT START LENGTH
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/14/2022 21:42:03 PAGE 2
-------------------------------------------------
?C_C51STARTUP ----- -----
+--> ?PR?MAIN?MAIN
+--> ?C_INITSEG
?PR?MAIN?MAIN ----- -----
+--> ?PR?SETCONFIG?MAIN
+--> ?PR?FRESH_WAVE?MAIN
+--> ?PR?_SET_DISPLAY?DISPLAY
?PR?_SET_DISPLAY?DISPLAY 008AH 0001H
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
B:00A8H.7 PUBLIC EA
D:00A8H PUBLIC IE
X:0000H PUBLIC fresh_flag
D:00B8H PUBLIC IP
X:0001H PUBLIC TH
X:0003H PUBLIC TL
C:04A4H PUBLIC main
C:0452H PUBLIC setConfig
X:0005H PUBLIC count
C:03AFH PUBLIC time
C:047BH PUBLIC fresh_wave
D:0098H PUBLIC SCON
D:0089H PUBLIC TMOD
D:0088H PUBLIC TCON
X:0009H PUBLIC bd
B:00A8H.1 PUBLIC ET0
X:000BH PUBLIC ge
D:008CH PUBLIC TH0
D:008AH PUBLIC TL0
X:000DH PUBLIC num
B:0088H.4 PUBLIC TR0
X:000FH PUBLIC sine_var
X:0073H PUBLIC qm
X:0075H PUBLIC ui
X:0077H PUBLIC wj
X:0079H PUBLIC digital
D:00C8H PUBLIC T2CON
D:00D0H PUBLIC PSW
------- PROC SETCONFIG
C:0452H LINE# 22
C:0452H LINE# 23
C:0452H LINE# 24
C:045BH LINE# 25
C:0462H LINE# 28
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/14/2022 21:42:03 PAGE 3
C:0465H LINE# 29
C:046CH LINE# 30
C:0471H LINE# 31
C:0473H LINE# 32
C:0475H LINE# 33
C:0477H LINE# 35
C:047AH LINE# 36
------- ENDPROC SETCONFIG
------- PROC FRESH_WAVE
C:047BH LINE# 37
C:047BH LINE# 38
C:047BH LINE# 39
C:04A1H LINE# 40
C:04A3H LINE# 41
------- ENDPROC FRESH_WAVE
------- PROC TIME
C:03AFH LINE# 45
C:03C6H LINE# 48
C:03CDH LINE# 49
C:03D4H LINE# 50
C:03DAH LINE# 52
C:03F9H LINE# 54
------- ENDPROC TIME
------- PROC MAIN
C:04A4H LINE# 57
C:04A4H LINE# 58
C:04A4H LINE# 60
C:04A7H LINE# 61
C:04A7H LINE# 62
C:04A7H LINE# 63
C:04AFH LINE# 64
C:04AFH LINE# 65
C:04B0H LINE# 66
C:04B3H LINE# 67
C:04BBH LINE# 68
C:04BBH LINE# 72
------- ENDPROC MAIN
------- ENDMOD MAIN
------- MODULE DELAY
C:0000H SYMBOL _ICE_DUMMY_
C:04BDH PUBLIC _delay
------- PROC _DELAY
D:0006H SYMBOL i
C:04BDH LINE# 3
C:04BDH LINE# 5
C:04BDH LINE# 6
C:04CAH LINE# 7
------- ENDPROC _DELAY
------- ENDMOD DELAY
------- MODULE DISPLAY
C:0000H SYMBOL _ICE_DUMMY_
D:0080H PUBLIC P0
D:0090H PUBLIC P1
D:00A0H PUBLIC P2
D:00B0H PUBLIC P3
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/14/2022 21:42:03 PAGE 4
D:00A8H PUBLIC IE
D:00B8H PUBLIC IP
C:013DH PUBLIC _set_display
D:0098H PUBLIC SCON
D:0088H PUBLIC TCON
X:007AH SYMBOL bd
X:007BH SYMBOL ge
X:007CH SYMBOL qm
X:007DH SYMBOL ui
X:007EH SYMBOL wj
D:00C8H PUBLIC T2CON
X:007FH SYMBOL uw
C:01EFH PUBLIC fresh_display
D:00D0H PUBLIC PSW
X:0080H PUBLIC num_var
------- PROC FRESH_DISPLAY
C:01EFH LINE# 8
C:01EFH LINE# 9
C:01EFH LINE# 10
C:01F2H LINE# 11
C:0202H LINE# 12
C:0209H LINE# 13
C:020CH LINE# 15
C:020FH LINE# 16
C:021FH LINE# 17
C:0226H LINE# 18
C:0229H LINE# 20
C:022CH LINE# 21
C:023CH LINE# 22
C:0243H LINE# 23
C:0246H LINE# 25
C:0249H LINE# 26
C:0259H LINE# 27
C:0260H LINE# 28
C:0263H LINE# 30
C:0266H LINE# 31
C:0276H LINE# 32
C:027DH LINE# 33
C:0280H LINE# 35
C:0283H LINE# 36
C:0293H LINE# 37
C:029AH LINE# 38
C:029DH LINE# 39
------- ENDPROC FRESH_DISPLAY
------- PROC _SET_DISPLAY
X:008AH SYMBOL num
C:013DH LINE# 41
C:0142H LINE# 43
C:0142H LINE# 44
C:0168H LINE# 45
C:0192H LINE# 46
C:01B3H LINE# 47
C:01D0H LINE# 48
C:01E3H LINE# 49
C:01EEH LINE# 50
------- ENDPROC _SET_DISPLAY
------- ENDMOD DISPLAY
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/14/2022 21:42:03 PAGE 5
------- MODULE ?C?UIDIV
C:000EH PUBLIC ?C?UIDIV
------- ENDMOD ?C?UIDIV
------- MODULE ?C?ULDIV
C:009FH PUBLIC ?C?ULDIV
------- ENDMOD ?C?ULDIV
------- MODULE ?C?SLDIV
C:040EH PUBLIC ?C?SLDIV
------- ENDMOD ?C?SLDIV
------- MODULE ?C?LSTXDATA
C:0131H PUBLIC ?C?LSTXDATA
------- ENDMOD ?C?LSTXDATA
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?FRESH_DISPLAY?DISPLAY
Program Size: data=9.0 xdata=139 code=1219
LINK/LOCATE RUN COMPLETE. 1 WARNING(S), 0 ERROR(S)

View file

@ -0,0 +1,307 @@
<?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/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>count,0x0A</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>ge</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>ui</ItemText>
</Ww>
<Ww>
<count>3</count>
<WinNumber>1</WinNumber>
<ItemText>bd</ItemText>
</Ww>
<Ww>
<count>4</count>
<WinNumber>1</WinNumber>
<ItemText>qm</ItemText>
</Ww>
<Ww>
<count>5</count>
<WinNumber>1</WinNumber>
<ItemText>wj</ItemText>
</Ww>
<Ww>
<count>6</count>
<WinNumber>1</WinNumber>
<ItemText>num</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>digital</ItemText>
</Ww>
</WatchWindow1>
<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>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.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>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>2</GroupNumber>
<FileNumber>3</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>4</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>2</GroupNumber>
<FileNumber>5</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>
</Group>
</ProjectOpt>

View file

@ -0,0 +1,415 @@
<?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>
</Files>
</Group>
<Group>
<GroupName>INC</GroupName>
<Files>
<File>
<FileName>delay.c</FileName>
<FileType>1</FileType>
<FilePath>.\delay.c</FilePath>
</File>
<File>
<FileName>main.h</FileName>
<FileType>5</FileType>
<FilePath>.\main.h</FilePath>
</File>
<File>
<FileName>display.c</FileName>
<FileType>1</FileType>
<FilePath>.\display.c</FilePath>
</File>
<File>
<FileName>display.h</FileName>
<FileType>5</FileType>
<FilePath>.\display.h</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
</Project>

View file

@ -0,0 +1,7 @@
#include "delay.h"
void delay(int i)
{
for(i = 14; i > 0; i--);
}

View file

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

View file

@ -0,0 +1,50 @@
#include <reg52.h>
#include "display.h"
#include "delay.h"
const unsigned char num_var[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x90};
static unsigned char ge, ui, bd, qm, wj, uw;
void fresh_display()
{
P0 = 0xfe;
P2 = num_var[ge];
delay(1);
P2 = 0XFF;
P0 = 0xfd;
P2 = num_var[ui];
delay(1);
P2 = 0XFF;
P0 = 0xfb;
P2 = num_var[bd];
delay(1);
P2 = 0XFF;
P0 = 0xf7;
P2 = num_var[qm];
delay(1);
P2 = 0XFF;
P0 = 0xef;
P2 = num_var[wj];
delay(1);
P2 = 0XFF;
P0 = 0xdf;
P2 = num_var[uw];
delay(1);
P2 = 0XFF;
}
void set_display(unsigned char num)
{
uw = (num % 1000000) / 100000;
wj = (num % 100000) / 10000;
qm = (num % 10000) / 1000;
bd = (num % 1000) / 100;
ui = (num % 100) / 10;
ge = num % 10;
}

View file

@ -0,0 +1,9 @@
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
void fresh_display();
void set_display(unsigned char num);
#endif

View file

@ -0,0 +1,73 @@
#include <reg52.h>
#include <intrins.h>
#include "delay.h"
#include "main.h"
#include "display.h"
void fresh_wave();
unsigned char digital=0;
unsigned char fresh_flag=0;
#ifdef MODE_1
void fresh_wave()
{
digital++;
P1=digital;
}
#endif
#ifdef MODE_2
unsigned char add_flag=0;
void fresh_wave()
{
if(!add_flag)
digital++;
else
digital--;
if(digital==0&&add_flag)
add_flag=0;
else if(digital==255&&(!add_flag))
add_flag=1;
P1=digital;
}
#endif
#ifdef MODE_3
const unsigned char sine_var[]={128,136,143,151,159,167,174,182,189,196,202,209,215,220,226,231,235,239,243,246,249,251,253,254,255,255,255,254,253,251,249,246,243,239,235,231,226,220,215,209,202,196,189,182,174,167,159,151,143,136,128,119,112,104,96,88,81,73,66,59,53,46,40,35,29,24,20,16,12,9,6,4,2,1,0,0,0,1,2,4,6,9,12,16,20,24,29,35,40,46,53,59,66,73,81,88,96,104,112,119};
void fresh_wave()
{
digital=sine_var[count%100];
P1=digital;
}
#endif
void time() interrupt 1
{
TH0 = TH;
TL0 = TL+15;
fresh_flag=1;
#ifdef MODE_3
count++;
#endif
}
int main()
{
//P1 µÆ
setConfig();
while(1)
{
if(fresh_flag==1)
{
fresh_flag=0;
fresh_wave();
set_display(digital);
}
#ifndef MODE_3
fresh_display();
#endif
}
}

View file

@ -0,0 +1,38 @@
#ifndef _MAIN_H_
#define _MAIN_H_
#define MODE_3
//1三角2锯齿3正弦
#ifdef MODE_3
#define RELOAD (65535-217)
//#define RELOAD (65535-217)
#else
#define RELOAD (5000)
#endif
unsigned int TH, TL;
unsigned long int count = 0;
unsigned int ge,ui,bd,qm,wj,num;
void setConfig()
{
TH = RELOAD / 256;
TL = RELOAD - (RELOAD / 256) * 256;
TMOD = 0x01; //T0 16位定时 T1 16位计数
TH0 = TH;
TL0 = TL;
EA = 1; //打开中断总开关
ET0 = 1; //打开定时器0中断开关
TR0 = 1; //启动定时器0
P1 = 0X00;
}
#endif

View file

@ -0,0 +1,388 @@
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 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?CLDPTR)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?UIDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?SLDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (PRINTF)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C_INIT)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?CLDOPTR)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?CSTPTR)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?ULDIV)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?PLDIXDATA)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?PSTXDATA)
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?CCASE)
C:\KEIL_V5\C51\LIB\C51L.LIB (PUTCHAR)
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"
DATA 0008H 0005H UNIT _DATA_GROUP_
000DH 0013H *** GAP ***
BIT 0020H.0 0001H.1 UNIT _BIT_GROUP_
0021H.1 0000H.7 *** GAP ***
IDATA 0022H 0001H UNIT ?STACK
* * * * * * * X D A T A M E M O R Y * * * * * * *
XDATA 0000H 0029H UNIT _XDATA_GROUP_
XDATA 0029H 0020H UNIT ?XD?MAIN
XDATA 0049H 0010H UNIT ?XD?DISPLAY
* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
CODE 0003H 0365H UNIT ?PR?PRINTF?PRINTF
CODE 0368H 01C1H UNIT ?C?LIB_CODE
CODE 0529H 00C3H UNIT ?PR?MAIN?MAIN
CODE 05ECH 00B2H UNIT ?PR?_SET_DISPLAY?DISPLAY
CODE 069EH 00AFH UNIT ?PR?FRESH_DISPLAY?DISPLAY
CODE 074DH 008CH UNIT ?C_C51STARTUP
CODE 07D9H 0044H UNIT ?C?LDIV
CODE 081DH 0027H UNIT ?PR?PUTCHAR?PUTCHAR
CODE 0844H 001CH UNIT ?CO?MAIN
CODE 0860H 001AH UNIT ?PR?SETCONFIG?MAIN
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 2
CODE 087AH 001AH UNIT ?PR?_DELAY?DELAY
CODE 0894H 0016H UNIT ?PR?_SENDSTRING?MAIN
CODE 08AAH 0015H UNIT ?C_INITSEG
CODE 08BFH 0011H UNIT ?PR?ADC_READ?MAIN
CODE 08D0H 000BH UNIT ?PR?DELAY100US?DELAY
CODE 08DBH 0008H UNIT ?PR?_SENDBYTE?MAIN
OVERLAY MAP OF MODULE: .\Objects\MCU_1 (MAIN)
SEGMENT BIT_GROUP DATA_GROUP XDATA_GROUP
+--> CALLED SEGMENT START LENGTH START LENGTH START LENGTH
-----------------------------------------------------------------------------------------
?C_C51STARTUP ----- ----- ----- ----- ----- -----
+--> ?PR?MAIN?MAIN
+--> ?C_INITSEG
?PR?MAIN?MAIN ----- ----- ----- ----- 0000H 0001H
+--> ?PR?_SET_DISPLAY?DISPLAY
+--> ?PR?SETCONFIG?MAIN
+--> ?CO?MAIN
+--> ?PR?_SENDSTRING?MAIN
+--> ?PR?ADC_READ?MAIN
+--> ?PR?PRINTF?PRINTF
+--> ?PR?FRESH_DISPLAY?DISPLAY
?PR?_SET_DISPLAY?DISPLAY ----- ----- ----- ----- 0001H 0001H
?PR?ADC_READ?MAIN ----- ----- ----- ----- ----- -----
+--> ?PR?_DELAY?DELAY
?PR?_DELAY?DELAY ----- ----- ----- ----- ----- -----
+--> ?PR?DELAY100US?DELAY
?PR?PRINTF?PRINTF 0020H.0 0001H.1 0008H 0005H 0001H 0028H
+--> ?PR?PUTCHAR?PUTCHAR
?PR?FRESH_DISPLAY?DISPLAY ----- ----- ----- ----- ----- -----
+--> ?PR?_DELAY?DELAY
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
X:0029H PUBLIC digital_old
D:00A8H PUBLIC IE
D:00B8H PUBLIC IP
B:0098H.0 PUBLIC RI
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 3
X:002BH PUBLIC TH
B:0098H.1 PUBLIC TI
X:002DH PUBLIC TL
C:0529H PUBLIC main
C:0894H PUBLIC _sendString
C:0860H PUBLIC setConfig
X:002FH PUBLIC count
D:0099H PUBLIC SBUF
D:0087H PUBLIC PCON
D:0098H PUBLIC SCON
D:0089H PUBLIC TMOD
D:0088H PUBLIC TCON
C:08DBH PUBLIC _sendByte
C:08BFH PUBLIC ADC_read
X:0033H PUBLIC text
D:008DH PUBLIC TH1
D:008BH PUBLIC TL1
B:0088H.6 PUBLIC TR1
X:0047H PUBLIC digital
D:00C8H PUBLIC T2CON
D:00D0H PUBLIC PSW
------- PROC SETCONFIG
C:0860H LINE# 16
C:0860H LINE# 17
C:0860H LINE# 19
C:0863H LINE# 20
C:0866H LINE# 21
C:0869H LINE# 22
C:086CH LINE# 23
C:086FH LINE# 24
C:0871H LINE# 25
C:0874H LINE# 27
C:0879H LINE# 29
------- ENDPROC SETCONFIG
------- PROC _SENDBYTE
D:0007H SYMBOL byte
C:08DBH LINE# 12
C:08DBH LINE# 13
C:08DBH LINE# 14
C:08DDH LINE# 15
C:08E0H LINE# 16
C:08E2H LINE# 17
------- ENDPROC _SENDBYTE
------- PROC _SENDSTRING
D:0001H SYMBOL s
C:0894H LINE# 19
C:0894H LINE# 20
C:0894H LINE# 21
C:0899H LINE# 22
C:0899H LINE# 23
C:089BH LINE# 24
C:08A2H LINE# 25
C:08A5H LINE# 26
C:08A7H LINE# 27
C:08A9H LINE# 28
------- ENDPROC _SENDSTRING
------- PROC ADC_READ
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 4
C:08BFH LINE# 30
C:08BFH LINE# 31
C:08BFH LINE# 32
C:08C4H LINE# 33
C:08CAH LINE# 34
C:08CFH LINE# 35
------- ENDPROC ADC_READ
------- PROC MAIN
------- DO
X:0000H SYMBOL temp
------- ENDDO
C:0529H LINE# 37
C:0529H LINE# 38
C:0529H LINE# 41
C:052EH LINE# 42
C:0531H LINE# 43
C:053AH LINE# 44
C:053AH LINE# 45
C:053AH LINE# 46
C:0542H LINE# 47
C:054FH LINE# 48
C:055AH LINE# 49
C:055AH LINE# 50
C:056AH LINE# 51
C:056DH LINE# 52
C:0593H LINE# 53
C:059CH LINE# 54
C:059CH LINE# 55
C:059FH LINE# 56
C:059FH LINE# 57
C:05A1H LINE# 58
C:05A7H LINE# 59
C:05BFH LINE# 60
C:05C6H LINE# 61
C:05E1H LINE# 62
C:05E6H LINE# 63
C:05E6H LINE# 65
C:05E9H LINE# 66
------- ENDPROC MAIN
------- ENDMOD MAIN
------- MODULE DELAY
C:0000H SYMBOL _ICE_DUMMY_
C:08D0H PUBLIC delay100us
C:087AH PUBLIC _delay
------- PROC DELAY100US
------- DO
D:0007H SYMBOL i
D:0006H SYMBOL j
------- ENDDO
C:08D0H LINE# 3
C:08D0H LINE# 4
C:08D0H LINE# 7
C:08D1H LINE# 8
C:08D2H LINE# 9
C:08D4H LINE# 10
C:08D6H LINE# 12
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 5
C:08D6H LINE# 13
C:08D8H LINE# 14
C:08DAH LINE# 15
------- ENDPROC DELAY100US
------- PROC _DELAY
D:0006H SYMBOL i
------- DO
D:0004H SYMBOL j
------- ENDDO
C:087AH LINE# 17
C:087AH LINE# 18
C:087AH LINE# 19
C:087EH LINE# 20
C:0889H LINE# 21
C:0893H LINE# 22
------- ENDPROC _DELAY
------- ENDMOD DELAY
------- MODULE DISPLAY
C:0000H SYMBOL _ICE_DUMMY_
D:0080H PUBLIC P0
D:0090H PUBLIC P1
D:00A0H PUBLIC P2
D:00B0H PUBLIC P3
D:00A8H PUBLIC IE
D:00B8H PUBLIC IP
C:05ECH PUBLIC _set_display
D:0098H PUBLIC SCON
D:0088H PUBLIC TCON
X:0049H SYMBOL bd
X:004AH SYMBOL ge
X:004BH SYMBOL qm
X:004CH SYMBOL ui
X:004DH SYMBOL wj
D:00C8H PUBLIC T2CON
X:004EH SYMBOL uw
C:069EH PUBLIC fresh_display
D:00D0H PUBLIC PSW
X:004FH PUBLIC num_var
------- PROC FRESH_DISPLAY
C:069EH LINE# 8
C:069EH LINE# 9
C:069EH LINE# 10
C:06A1H LINE# 11
C:06B1H LINE# 12
C:06B8H LINE# 13
C:06BBH LINE# 15
C:06BEH LINE# 16
C:06CEH LINE# 17
C:06D5H LINE# 18
C:06D8H LINE# 20
C:06DBH LINE# 21
C:06EBH LINE# 22
C:06F2H LINE# 23
C:06F5H LINE# 25
C:06F8H LINE# 26
C:0708H LINE# 27
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 6
C:070FH LINE# 28
C:0712H LINE# 30
C:0715H LINE# 31
C:0725H LINE# 32
C:072CH LINE# 33
C:072FH LINE# 35
C:0732H LINE# 36
C:0742H LINE# 37
C:0749H LINE# 38
C:074CH LINE# 39
------- ENDPROC FRESH_DISPLAY
------- PROC _SET_DISPLAY
X:0001H SYMBOL num
C:05ECH LINE# 41
C:05F1H LINE# 43
C:05F1H LINE# 44
C:0617H LINE# 45
C:0641H LINE# 46
C:0662H LINE# 47
C:067FH LINE# 48
C:0692H LINE# 49
C:069DH LINE# 50
------- ENDPROC _SET_DISPLAY
------- ENDMOD DISPLAY
------- MODULE ?C?CLDPTR
C:0368H PUBLIC ?C?CLDPTR
------- ENDMOD ?C?CLDPTR
------- MODULE ?C?UIDIV
C:0381H PUBLIC ?C?UIDIV
------- ENDMOD ?C?UIDIV
------- MODULE ?C?SLDIV
C:07D9H PUBLIC ?C?SLDIV
------- ENDMOD ?C?SLDIV
------- MODULE PRINTF
X:0001H PUBLIC ?_PRINTF517?BYTE
X:0001H PUBLIC ?_PRINTF?BYTE
X:0001H PUBLIC ?_SPRINTF517?BYTE
X:0001H PUBLIC ?_SPRINTF?BYTE
C:006EH PUBLIC _PRINTF
C:006EH PUBLIC _PRINTF517
C:0068H PUBLIC _SPRINTF
C:0068H PUBLIC _SPRINTF517
------- ENDMOD PRINTF
------- MODULE ?C?CLDOPTR
C:03D6H PUBLIC ?C?CLDOPTR
------- ENDMOD ?C?CLDOPTR
------- MODULE ?C?CSTPTR
C:0403H PUBLIC ?C?CSTPTR
------- ENDMOD ?C?CSTPTR
------- MODULE ?C?ULDIV
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/21/2022 21:45:26 PAGE 7
C:0451H PUBLIC ?C?ULDIV
------- ENDMOD ?C?ULDIV
------- MODULE ?C?PLDIXDATA
C:04E3H PUBLIC ?C?PLDIXDATA
------- ENDMOD ?C?PLDIXDATA
------- MODULE ?C?PSTXDATA
C:04FAH PUBLIC ?C?PSTXDATA
------- ENDMOD ?C?PSTXDATA
------- MODULE ?C?CCASE
C:0503H PUBLIC ?C?CCASE
------- ENDMOD ?C?CCASE
------- MODULE PUTCHAR
C:081DH PUBLIC _PUTCHAR
------- ENDMOD PUTCHAR
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_SENDBYTE?MAIN
Program Size: data=15.1 xdata=89 code=2275
LINK/LOCATE RUN COMPLETE. 1 WARNING(S), 0 ERROR(S)

282
MCU/MCU_6 _UART/MCU_1.uvopt Normal file
View file

@ -0,0 +1,282 @@
<?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/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>temp</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>digital</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>text</ItemText>
</Ww>
</WatchWindow1>
<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>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.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>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>2</GroupNumber>
<FileNumber>3</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>4</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>2</GroupNumber>
<FileNumber>5</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>
</Group>
</ProjectOpt>

View file

@ -0,0 +1,415 @@
<?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>
</Files>
</Group>
<Group>
<GroupName>INC</GroupName>
<Files>
<File>
<FileName>delay.c</FileName>
<FileType>1</FileType>
<FilePath>.\delay.c</FilePath>
</File>
<File>
<FileName>main.h</FileName>
<FileType>5</FileType>
<FilePath>.\main.h</FilePath>
</File>
<File>
<FileName>display.c</FileName>
<FileType>1</FileType>
<FilePath>.\display.c</FilePath>
</File>
<File>
<FileName>display.h</FileName>
<FileType>5</FileType>
<FilePath>.\display.h</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
</Project>

22
MCU/MCU_6 _UART/delay.c Normal file
View file

@ -0,0 +1,22 @@
#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();
}

7
MCU/MCU_6 _UART/delay.h Normal file
View file

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

50
MCU/MCU_6 _UART/display.c Normal file
View file

@ -0,0 +1,50 @@
#include <reg52.h>
#include "display.h"
#include "delay.h"
const unsigned char num_var[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x90};
static unsigned char ge, ui, bd, qm, wj, uw;
void fresh_display()
{
P0 = 0xfe;
P2 = num_var[ge];
delay(1);
P2 = 0XFF;
P0 = 0xfd;
P2 = num_var[ui];
delay(1);
P2 = 0XFF;
P0 = 0xfb;
P2 = num_var[bd];
delay(1);
P2 = 0XFF;
P0 = 0xf7;
P2 = num_var[qm];
delay(1);
P2 = 0XFF;
P0 = 0xef;
P2 = num_var[wj];
delay(1);
P2 = 0XFF;
P0 = 0xdf;
P2 = num_var[uw];
delay(1);
P2 = 0XFF;
}
void set_display(unsigned char num)
{
uw = (num % 1000000) / 100000;
wj = (num % 100000) / 10000;
qm = (num % 10000) / 1000;
bd = (num % 1000) / 100;
ui = (num % 100) / 10;
ge = num % 10;
}

View file

@ -0,0 +1,9 @@
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
void fresh_display();
void set_display(unsigned char num);
#endif

67
MCU/MCU_6 _UART/main.c Normal file
View file

@ -0,0 +1,67 @@
#include "delay.h"
#include "main.h"
#include "display.h"
#include <stdio.h>
unsigned char text[20];
unsigned int digital;
unsigned int digital_old;
void sendByte(unsigned char byte)
{
SBUF=byte;
while(!TI);
TI=0;
}
void sendString(unsigned char *s)
{
while(*s!='\0')
{
SBUF=*s;
s++;
while(!TI);
TI=0;
}
}
unsigned char ADC_read()
{
XBYTE[0X8000]=0X00;
delay(2);
return XBYTE[0X8000];
}
int main()
{
//P1 AD
unsigned char temp;
set_display(0);
setConfig();
sendString("Hello\n");
while(1)
{
temp=ADC_read();
digital=ADC_read();
if(digital!=digital_old)
{
digital_old=digital;
set_display(digital);
sprintf(text,"Digital Voltage %u \n",digital);
sendString(text);
}
if(RI)
{
RI = 0;
temp = SBUF;
if(0x40<temp&&temp<0x5b)
SBUF = temp+0x20;
else if(0x60<temp&&temp<0x7b)
SBUF=temp-0x20;
}
fresh_display();
}
}

33
MCU/MCU_6 _UART/main.h Normal file
View file

@ -0,0 +1,33 @@
#ifndef _MAIN_H_
#define _MAIN_H_
#include <reg52.h>
#include <intrins.h>
#include <absacc.h>
#include "display.h"
#define RELOAD (5000)
unsigned int TH, TL;
unsigned long int count = 0;
void setConfig()
{
SCON=0X50;
TMOD=0X20;
PCON=0X80;
TH1 = 0XFA;
TL1 = 0XFA;
TR1=1;
SCON=0X50;
XBYTE[0x8000]=0x00;
}
#endif

View file

@ -0,0 +1,448 @@
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 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?ILDIX)
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 0060H UNIT ?XD?DISPLAY
XDATA 0060H 000CH UNIT ?XD?MAIN
XDATA 006CH 0008H UNIT _XDATA_GROUP_
XDATA 0074H 0004H UNIT ?XD?_NAME?DISPLAY
* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
CODE 0003H 00DFH UNIT ?PR?MAIN?MAIN
CODE 00E2H 00C5H UNIT ?PR?CLEAR?DISPLAY
CODE 01A7H 008CH UNIT ?C_C51STARTUP
CODE 0233H 0070H UNIT ?C_INITSEG
CODE 02A3H 005FH UNIT ?PR?_NAME?DISPLAY
CODE 0302H 0020H UNIT ?PR?_DELAY?DELAY
CODE 0322H 001CH UNIT ?PR?INIT?DISPLAY
CODE 033EH 001AH UNIT ?PR?SETCONFIG?MAIN
CODE 0358H 0019H UNIT ?PR?WRITE?DISPLAY
CODE 0371H 0016H UNIT ?C?LIB_CODE
CODE 0387H 0014H UNIT ?PR?_WRITEDATA?DISPLAY
CODE 039BH 0014H UNIT ?PR?_WRITECOMMAND?DISPLAY
CODE 03AFH 0013H UNIT ?PR?LCDINIT?DISPLAY
CODE 03C2H 000DH UNIT ?PR?_SETY?DISPLAY
CODE 03CFH 000BH UNIT ?PR?DELAY100US?DELAY
CODE 03DAH 0007H UNIT ?PR?_SETPAGE?DISPLAY
CODE 03E1H 0007H UNIT ?PR?_SETLINE?DISPLAY
CODE 03E8H 0005H UNIT ?PR?SELA?DISPLAY
CODE 03EDH 0005H UNIT ?PR?SELB?DISPLAY
OVERLAY MAP OF MODULE: .\Objects\MCU_1 (MAIN)
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 2
SEGMENT XDATA_GROUP
+--> CALLED SEGMENT START LENGTH
-------------------------------------------------
?C_C51STARTUP ----- -----
+--> ?PR?MAIN?MAIN
+--> ?C_INITSEG
?PR?MAIN?MAIN 006CH 0004H
+--> ?PR?INIT?DISPLAY
+--> ?PR?CLEAR?DISPLAY
+--> ?PR?WRITE?DISPLAY
?PR?INIT?DISPLAY ----- -----
+--> ?PR?WRITE?DISPLAY
?PR?WRITE?DISPLAY ----- -----
+--> ?PR?_DELAY?DELAY
?PR?CLEAR?DISPLAY 0070H 0004H
+--> ?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
X:0060H PUBLIC TH
X:0062H PUBLIC TL
B:00B0H.0 PUBLIC RS
C:0003H PUBLIC main
C:033EH PUBLIC setConfig
B:00B0H.1 PUBLIC RW
X:0064H PUBLIC count
D:0087H PUBLIC PCON
D:0098H PUBLIC SCON
D:0089H PUBLIC TMOD
D:0088H PUBLIC TCON
D:008DH PUBLIC TH1
D:008BH PUBLIC TL1
B:00B0H.4 PUBLIC CSA
B:0088H.6 PUBLIC TR1
B:00B0H.5 PUBLIC CSB
D:00C8H PUBLIC T2CON
X:0068H PUBLIC i
X:006AH PUBLIC j
D:00D0H PUBLIC PSW
------- PROC SETCONFIG
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 3
C:033EH LINE# 16
C:033EH LINE# 17
C:033EH LINE# 19
C:0341H LINE# 20
C:0344H LINE# 21
C:0347H LINE# 22
C:034AH LINE# 23
C:034DH LINE# 24
C:034FH LINE# 25
C:0352H LINE# 27
C:0357H LINE# 29
------- ENDPROC SETCONFIG
------- PROC MAIN
------- DO
X:006CH SYMBOL i
X:006EH SYMBOL j
------- ENDDO
C:0003H LINE# 15
C:0003H LINE# 16
C:0003H LINE# 17
C:0006H LINE# 18
C:0009H LINE# 20
C:0009H LINE# 21
C:0009H LINE# 23
C:000BH LINE# 24
C:000DH LINE# 25
C:0024H LINE# 26
C:0024H LINE# 27
C:0026H LINE# 28
C:0028H LINE# 29
C:002DH LINE# 30
C:0030H LINE# 31
C:0033H LINE# 32
C:0036H LINE# 34
C:003DH LINE# 35
C:003DH LINE# 36
C:003FH LINE# 37
C:0041H LINE# 38
C:0044H LINE# 39
C:0047H LINE# 40
C:0064H LINE# 41
C:0074H LINE# 42
C:0076H LINE# 43
C:0078H LINE# 44
C:0092H LINE# 45
C:0092H LINE# 46
C:0094H LINE# 47
C:0096H LINE# 48
C:009BH LINE# 49
C:009EH LINE# 50
C:00A1H LINE# 51
C:00A4H LINE# 53
C:00ABH LINE# 54
C:00ABH LINE# 55
C:00ADH LINE# 56
C:00AFH LINE# 57
C:00B2H LINE# 58
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 4
C:00B5H LINE# 59
C:00D2H LINE# 60
------- ENDPROC MAIN
------- ENDMOD MAIN
------- MODULE DELAY
C:0000H SYMBOL _ICE_DUMMY_
C:03CFH PUBLIC delay100us
C:0302H PUBLIC _delay
------- PROC DELAY100US
------- DO
D:0007H SYMBOL i
D:0006H SYMBOL j
------- ENDDO
C:03CFH LINE# 3
C:03CFH LINE# 4
C:03CFH LINE# 7
C:03D0H LINE# 8
C:03D1H LINE# 9
C:03D3H LINE# 10
C:03D5H LINE# 12
C:03D5H LINE# 13
C:03D7H LINE# 14
C:03D9H LINE# 15
------- ENDPROC DELAY100US
------- PROC _DELAY
D:0006H SYMBOL n
------- DO
D:0006H SYMBOL i
D:0004H SYMBOL j
------- ENDDO
C:0302H LINE# 24
C:0302H LINE# 26
C:0302H LINE# 27
C:030DH LINE# 28
C:0321H LINE# 29
------- ENDPROC _DELAY
------- ENDMOD DELAY
------- MODULE DISPLAY
C:0000H SYMBOL _ICE_DUMMY_
D:0090H PUBLIC P1
D:00B0H PUBLIC P3
C:03E8H PUBLIC selA
C:03EDH PUBLIC selB
C:00E2H PUBLIC clear
X:0000H PUBLIC Z2
D:00A8H PUBLIC IE
D:00B8H PUBLIC IP
C:02A3H PUBLIC _name
B:00B0H.0 PUBLIC RS
C:03C8H PUBLIC _setY
B:00B0H.1 PUBLIC RW
C:0387H PUBLIC _writeData
C:0361H PUBLIC write
D:0098H PUBLIC SCON
D:0088H PUBLIC TCON
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 5
C:0322H PUBLIC init
B:00B0H.2 PUBLIC E
C:03AFH PUBLIC lcdInit
C:03DAH PUBLIC _setPage
B:00B0H.4 PUBLIC CSA
B:00B0H.5 PUBLIC CSB
C:03E1H PUBLIC _setLine
X:0030H PUBLIC Z
D:00C8H PUBLIC T2CON
C:039BH PUBLIC _writeCommand
D:00D0H PUBLIC PSW
------- PROC SELA
C:03E8H LINE# 38
C:03E8H LINE# 39
C:03E8H LINE# 40
C:03EAH LINE# 41
C:03ECH LINE# 42
------- ENDPROC SELA
------- PROC SELB
C:03EDH LINE# 43
C:03EDH LINE# 44
C:03EDH LINE# 45
C:03EFH LINE# 46
C:03F1H LINE# 47
------- ENDPROC SELB
------- PROC _WRITEDATA
D:0007H SYMBOL d
C:0387H LINE# 48
C:0387H LINE# 49
C:0387H LINE# 50
C:0389H LINE# 51
C:038BH LINE# 52
C:038DH LINE# 53
C:038FH LINE# 54
C:0391H LINE# 55
C:0398H LINE# 56
C:039AH LINE# 57
------- ENDPROC _WRITEDATA
------- PROC _WRITECOMMAND
D:0007H SYMBOL d
C:039BH LINE# 59
C:039BH LINE# 60
C:039BH LINE# 61
C:039DH LINE# 62
C:039FH LINE# 63
C:03A1H LINE# 64
C:03A3H LINE# 65
C:03A5H LINE# 66
C:03ACH LINE# 67
C:03AEH LINE# 68
------- ENDPROC _WRITECOMMAND
------- PROC LCDINIT
C:03AFH LINE# 70
C:03AFH LINE# 71
C:03AFH LINE# 72
C:03B2H LINE# 73
C:03B7H LINE# 74
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 6
C:03BAH LINE# 75
C:03BFH LINE# 76
------- ENDPROC LCDINIT
------- PROC _SETPAGE
D:0007H SYMBOL p
C:03DAH LINE# 79
C:03DAH LINE# 80
C:03DAH LINE# 81
------- ENDPROC _SETPAGE
------- PROC _SETLINE
D:0007H SYMBOL p
C:03E1H LINE# 84
C:03E1H LINE# 85
C:03E1H LINE# 86
------- ENDPROC _SETLINE
------- PROC L?0032
------- ENDPROC L?0032
------- PROC _SETY
D:0007H SYMBOL p
C:03C8H LINE# 89
C:03C8H LINE# 90
C:03C8H LINE# 91
------- ENDPROC _SETY
------- PROC _NAME
X:0074H SYMBOL i
------- DO
X:0076H SYMBOL line
------- ENDDO
C:02A3H LINE# 94
C:02ABH LINE# 95
C:02ABH LINE# 96
C:02B0H LINE# 97
C:02BFH LINE# 98
C:02BFH LINE# 99
C:02C4H LINE# 100
C:02C7H LINE# 101
C:02DCH LINE# 102
C:02E1H LINE# 103
C:02E4H LINE# 104
C:02FFH LINE# 105
C:0301H LINE# 106
------- ENDPROC _NAME
------- PROC L?0031
------- ENDPROC L?0031
------- PROC WRITE
C:0361H LINE# 109
C:0361H LINE# 110
C:0361H LINE# 111
C:0363H LINE# 112
C:0365H LINE# 113
C:0367H LINE# 114
C:036EH LINE# 115
C:0370H LINE# 116
------- ENDPROC WRITE
------- PROC CLEAR
------- DO
X:0070H SYMBOL i
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 7
X:0072H SYMBOL j
------- ENDDO
C:00E2H LINE# 118
C:00E2H LINE# 119
C:00E2H LINE# 121
C:00E4H LINE# 122
C:00E6H LINE# 123
C:00FDH LINE# 124
C:00FDH LINE# 125
C:00FDH LINE# 126
C:00FDH LINE# 127
C:00FDH LINE# 128
C:0100H LINE# 129
C:0103H LINE# 130
C:0106H LINE# 132
C:010DH LINE# 133
C:010DH LINE# 134
C:010FH LINE# 135
C:0111H LINE# 136
C:0114H LINE# 137
C:0117H LINE# 138
C:0134H LINE# 139
C:0144H LINE# 140
C:0146H LINE# 141
C:0148H LINE# 142
C:015FH LINE# 143
C:015FH LINE# 144
C:015FH LINE# 145
C:015FH LINE# 146
C:015FH LINE# 147
C:0162H LINE# 148
C:0165H LINE# 149
C:0168H LINE# 151
C:016FH LINE# 152
C:016FH LINE# 153
C:0171H LINE# 154
C:0173H LINE# 155
C:0176H LINE# 156
C:0179H LINE# 157
C:0196H LINE# 158
C:01A6H LINE# 159
------- ENDPROC CLEAR
------- PROC INIT
C:0322H LINE# 160
C:0322H LINE# 161
C:0322H LINE# 162
C:0324H LINE# 163
C:0326H LINE# 164
C:0328H LINE# 165
C:032AH LINE# 166
C:032CH LINE# 167
C:032FH LINE# 168
C:0332H LINE# 170
C:0334H LINE# 171
C:0336H LINE# 172
C:0338H LINE# 173
C:033BH LINE# 174
BL51 BANKED LINKER/LOCATER V6.22.2.0 04/27/2022 21:57:02 PAGE 8
------- ENDPROC INIT
------- ENDMOD DISPLAY
------- MODULE ?C?ILDIX
C:0371H PUBLIC ?C?ILDIX
------- ENDMOD ?C?ILDIX
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?SETCONFIG?MAIN
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?DELAY100US?DELAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?LCDINIT?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_SETLINE?DISPLAY
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_NAME?DISPLAY
Program Size: data=9.0 xdata=120 code=1010
LINK/LOCATE RUN COMPLETE. 5 WARNING(S), 0 ERROR(S)

View file

@ -0,0 +1,265 @@
<?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>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.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>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>2</GroupNumber>
<FileNumber>3</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>4</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>2</GroupNumber>
<FileNumber>5</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>
</Group>
</ProjectOpt>

View file

@ -0,0 +1,415 @@
<?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>
</Files>
</Group>
<Group>
<GroupName>INC</GroupName>
<Files>
<File>
<FileName>delay.c</FileName>
<FileType>1</FileType>
<FilePath>.\delay.c</FilePath>
</File>
<File>
<FileName>main.h</FileName>
<FileType>5</FileType>
<FilePath>.\main.h</FilePath>
</File>
<File>
<FileName>display.c</FileName>
<FileType>1</FileType>
<FilePath>.\display.c</FilePath>
</File>
<File>
<FileName>display.h</FileName>
<FileType>5</FileType>
<FilePath>.\display.h</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
</Project>

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--);
}

View file

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

View file

@ -0,0 +1,175 @@
#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;
const unsigned char Z[] =
{
/*-- 文字: 江 --*/
/*-- 宋体12; 此字体下对应的点阵为宽x高=16x16 --*/
0x10, 0x60, 0x02, 0x0C, 0xC0, 0x04, 0x04, 0x04, 0x04, 0xFC, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
/*-- 文字: 一 --*/
/*-- 宋体12; 此字体下对应的点阵为宽x高=16x16 --*/
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
/*-- 文字: 和 --*/
/*-- 宋体12; 此字体下对应的点阵为宽x高=16x16 --*/
0x20, 0x24, 0x24, 0xA4, 0xFE, 0x23, 0x22, 0x20, 0x00, 0xF8, 0x08, 0x08, 0x08, 0xF8, 0x00, 0x00,
};
const unsigned char Z2[] =
{
0x04, 0x04, 0x7C, 0x03, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x08, 0x06, 0x01, 0xFF, 0x01, 0x06, 0x00, 0x00, 0x3F, 0x10, 0x10, 0x10, 0x3F, 0x00, 0x00
};
void selA()
{
CSA = 1;
CSB = 0;
}
void selB()
{
CSA = 0;
CSB = 1;
}
void writeData(unsigned char d)
{
RS = 1;
RW = 0;
P1 = d;
E = 0;
E = 1;
delay(3);
E = 0;
}
void writeCommand(unsigned char d)
{
RS = 0;
RW = 0;
P1 = d;
E = 0;
E = 1;
delay(3);
E = 0;
}
void lcdInit()
{
selA();
writeCommand(0x3f);
selB();
writeCommand(0x3f);
selA();
}
void setPage(unsigned char p)
{
writeCommand(0xb8 + p);
}
void setLine(unsigned char p)
{
writeCommand(0xc0 + p);
}
void setY(unsigned char p)
{
writeCommand(0x40 + p);
}
void name(unsigned int i)
{
unsigned int line = 0;
while(line < 48)
{
setPage(0);
setY(i);
writeData(Z[line]);
setPage(1);
setY(i);
writeData(Z2[line++]);
}
}
void write()
{
RW = 0;
E = 0;
E = 1;
delay(2);
E = 0;
}
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 = 0XFF;
write();
}

View file

@ -0,0 +1,16 @@
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
void writeData(unsigned char d);
void writeCommand(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 selA();
void selB();
void init();
void clear();
void name(unsigned int i);
#endif

View file

@ -0,0 +1,60 @@
#include "delay.h"
#include "main.h"
#include "display.h"
sbit RS = P3 ^ 0;
sbit RW = P3 ^ 1;
sbit E = P3 ^ 2;
sbit CSA = P3 ^ 4;
sbit CSB = P3 ^ 5;
unsigned int i;
unsigned int j;
int main()
{
init();
clear();
while(1)
{
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();
}
}
}
}

View file

@ -0,0 +1,33 @@
#ifndef _MAIN_H_
#define _MAIN_H_
#include <reg52.h>
#include <intrins.h>
#include <absacc.h>
#include "display.h"
#define RELOAD (5000)
unsigned int TH, TL;
unsigned long int count = 0;
void setConfig()
{
SCON=0X50;
TMOD=0X20;
PCON=0X80;
TH1 = 0XFA;
TL1 = 0XFA;
TR1=1;
SCON=0X50;
XBYTE[0x8000]=0x00;
}
#endif