diff --git a/README.md b/README.md index b944bd3..6b19684 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ * 09. homework 点击SW1改变LED状态 * 10. task010 一阶段考核:通过SW1对流水灯进行操作,当按下SW1时暂停流水灯并保持当前状态,当再次按下时在上次保存状态开始继续向下执行。 * 11. Zigbee无线通信 A、B两板相互控制LED +* 12. task010 上电时D3,D4,D5,D6跑马效果,当SW1按下,同时当D6亮起时控制双联继电器打开,D6熄灭控制双联继电器关闭 diff --git a/task011/task004/Debug/Exe/task004..d51 b/task011/task004/Debug/Exe/task004..d51 new file mode 100644 index 0000000..613b021 Binary files /dev/null and b/task011/task004/Debug/Exe/task004..d51 differ diff --git a/task011/task004/Debug/Obj/code.r51 b/task011/task004/Debug/Obj/code.r51 new file mode 100644 index 0000000..5b239de Binary files /dev/null and b/task011/task004/Debug/Obj/code.r51 differ diff --git a/task011/task004/Debug/Obj/task004.pbd b/task011/task004/Debug/Obj/task004.pbd new file mode 100644 index 0000000..edde47a --- /dev/null +++ b/task011/task004/Debug/Obj/task004.pbd @@ -0,0 +1,3 @@ +This is an internal working file generated by the Source Browser. +10:07 50s +C:\Users\Suik\Desktop\task004\Debug\Obj\code.pbi diff --git a/task011/task004/settings/task004..dbgdt b/task011/task004/settings/task004..dbgdt new file mode 100644 index 0000000..e068f91 --- /dev/null +++ b/task011/task004/settings/task004..dbgdt @@ -0,0 +1,5 @@ + + + + + diff --git a/task011/task004/settings/task004.cspy.bat b/task011/task004/settings/task004.cspy.bat new file mode 100644 index 0000000..daf32e5 --- /dev/null +++ b/task011/task004/settings/task004.cspy.bat @@ -0,0 +1,15 @@ +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. +@REM +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM + + +"D:\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051proc.dll" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051sim.dll" %1 --plugin "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "banked" "--proc_nr_virtual_regs" "8" "--proc_pdata_bank_reg_addr" "0x93" "--proc_dptr_nr_of" "1" "--proc_codebank_reg" "0x9F" "--proc_codebank_start" "0x8000" "--proc_codebank_end" "0xFFFF" "--proc_codebank_mask" "0xFF" "--proc_data_model" "large" "-p" "D:\IAR Systems\Embedded Workbench 6.0\8051\config\devices\Texas Instruments\ioCC2530F256.ddf" "--proc_driver" "sim" + + diff --git a/task011/task004/settings/task004.dni b/task011/task004/settings/task004.dni new file mode 100644 index 0000000..18c958f --- /dev/null +++ b/task011/task004/settings/task004.dni @@ -0,0 +1,24 @@ +[InterruptLog] +LogEnabled=0 +SumEnabled=0 +GraphEnabled=0 +ShowTimeLog=1 +ShowTimeSum=1 +SumSortOrder=0 +[Breakpoints] +Count=0 +[Interrupts] +Enabled=1 +[MemoryMap] +Enabled=0 +Base=0 +UseAuto=0 +TypeViolation=1 +UnspecRange=1 +ActionState=1 +[Aliases] +Count=0 +SuppressDialog=0 +[TraceHelper] +Enabled=0 +ShowSource=1 diff --git a/task011/task004/settings/task004.wsdt b/task011/task004/settings/task004.wsdt new file mode 100644 index 0000000..11bf92a --- /dev/null +++ b/task011/task004/settings/task004.wsdt @@ -0,0 +1,66 @@ + + + + + + task004./Debug + + + + + + + + + 84272727 + + + + + + + 20139537293 + + + + + + + + TabID-15843-25665 + Workspace + Workspace + + + task004. + + + + 0 + + + TabID-2691-28777 + Build + Build + + + + + 0 + + + + + + TextEditor$WS_DIR$\source\code.c03016016000100000010000001 + + + + + + + iaridepm.enu1-2-2502158-2-2160155115942221429115942720000-2-21531382-2-213841551002899221429115942221429 + + + + diff --git a/task011/task004/source/code.c b/task011/task004/source/code.c new file mode 100644 index 0000000..901b439 --- /dev/null +++ b/task011/task004/source/code.c @@ -0,0 +1,91 @@ +#include + +#define LED1 P1_0 +#define LED2 P1_1 +#define SW1 P1_2 +#define LED3 P1_3 +#define LED4 P1_4 +#define JD1 P1_7 //¼̵çÆ÷1 +#define JD2 P2_0 //¼̵çÆ÷2 + +unsigned char key_down = 0; + +void initial_gpio(){ + + P1SEL &=~0X9F; + P1DIR |=0X9B; //P1_7 + P1DIR &=~0X04; + P1INP &=~0X04; + P2INP &=~0X40; + + P2SEL &=~0X01; //P2_0 + P2INP |=0X01; + + IEN2 |=0X10; //°´ťÖжÏ + P1IEN |=0X04; + PICTL |=0X02; + EA = 1; + + JD1 = 0; + JD2 = 0; + P1 &=~0x1F; +} + +void delay(int time){ + int i , j; + for(i = 0;i + + + 2 + 627649192 + + Debug + + $TOOLKIT_DIR$\inc\ioCC2530.h + $TOOLKIT_DIR$\config\devices\Texas Instruments\lnk51ew_CC2530F256_banked.xcl + $PROJ_DIR$\Debug\Obj\task004.pbd + $PROJ_DIR$\Debug\Obj\code.r51 + $TOOLKIT_DIR$\lib\clib\cl-pli-blxd-1e16x01.r51 + $PROJ_DIR$\Debug\Exe\task004.hex + $PROJ_DIR$\source\code.c + $PROJ_DIR$\Debug\Exe\task004..d51 + $PROJ_DIR$\Debug\Obj\code.pbi + + + [ROOT_NODE] + + + XLINK + 7 5 + + + + + $PROJ_DIR$\Debug\Obj\task004.pbd + + + BILINK + 8 + + + + + $PROJ_DIR$\source\code.c + + + ICC8051 + 3 + + + BICOMP + 8 + + + + + ICC8051 + 0 + + + BICOMP + 0 + + + + + $PROJ_DIR$\Debug\Exe\task004..d51 + + + XLINK + 5 + + + + + XLINK + 1 3 4 + + + + + + Release + + + [MULTI_TOOL] + XLINK + + + + + diff --git a/task011/task004/task004..ewd b/task011/task004/task004..ewd new file mode 100644 index 0000000..1b92d1e --- /dev/null +++ b/task011/task004/task004..ewd @@ -0,0 +1,1281 @@ + + + + 2 + + Debug + + 8051 + + 1 + + C-SPY + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _3RD_ID + 1 + + 0 + 1 + 1 + + + + + + + + CHIPCON_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + FS2_ID + 1 + + 0 + 1 + 1 + + + + + + + + + + + + + INFINEON_ID + 1 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + NS_ID + 1 + + 0 + 1 + 1 + + + + + + + ROM_ID + 1 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + AD2_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + CYGNAL_ID + 1 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + SIM_ID + 1 + + 2 + 1 + 1 + + + + + + + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + Release + + 8051 + + 0 + + C-SPY + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _3RD_ID + 1 + + 0 + 1 + 0 + + + + + + + + CHIPCON_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + FS2_ID + 1 + + 0 + 1 + 0 + + + + + + + + + + + + + INFINEON_ID + 1 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + NS_ID + 1 + + 0 + 1 + 0 + + + + + + + ROM_ID + 1 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + AD2_ID + 2 + + 6 + 1 + 0 + + + + + + + + + + + + + + CYGNAL_ID + 1 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + SIM_ID + 1 + + 2 + 1 + 0 + + + + + + + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + + + + diff --git a/task011/task004/task004..ewp b/task011/task004/task004..ewp new file mode 100644 index 0000000..251bd1e --- /dev/null +++ b/task011/task004/task004..ewp @@ -0,0 +1,2072 @@ + + + + 2 + + Debug + + 8051 + + 1 + + General + 1 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC8051 + 4 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A8051 + 2 + + 5 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + XLINK + 3 + + 17 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 1 + + 0 + 1 + 1 + + + + + + + + BILINK + 0 + + + + + Release + + 8051 + + 0 + + General + 1 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICC8051 + 4 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A8051 + 2 + + 5 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + XLINK + 3 + + 17 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XAR + 1 + + 0 + 1 + 0 + + + + + + + + BILINK + 0 + + + + + $PROJ_DIR$\source\code.c + + + + diff --git a/task011/task004/task004.eww b/task011/task004/task004.eww new file mode 100644 index 0000000..4f3667d --- /dev/null +++ b/task011/task004/task004.eww @@ -0,0 +1,10 @@ + + + + + $WS_DIR$\task004..ewp + + + + +