26121042112
?????????????????????????????? ?????????????????????
Agenda |
?????????????????? portB =%00001111 ????????????????????? ???????????????????? ????????? portB ????????????????????????????????????????????????????
?? ?? ??B?? ????????????????????? Port ?????????????????????????????
?? ?? %?? ???????????????????????????????????????????????
?? ??00001111 ???????????????????????????????????????????????????????????????????? Port ???????????????????????
???????????????????? ?? ?? If [????????????????????????] then [???????????????????????????????????????????????????????????????????????????????????????????????????]
????????????
program
------------------------------------------
Main:
?? ?? ??if portc.0 = 0 then goto Step1
?? ?? ??if portc.1 = 1 then goto Step2
goto main
Step1:??
?? ?? portb=$0F?? ?? :?? ?? ??pause 500
?? ?? portb=$F0?? ?? :?? ?? ??pause 500
goto Step1
??
Step2:??
?? ?? portb=$55?? ?? :?? ?? ??pause 500
?? ?? portb=$AA?? ?? :?? ?? ??pause 500
goto Step1
??END
?? ????
??????????????????????????????? ???????????????????????????????????????????????? 0 - 9 ???????????? Common K ??????????????????
??
?????????????????????????????????????????????????????????????????????????????????????????????? 8 ?????????
?????????????????? High?? ??????????????? Logic?? ???????????????????????????????????? ??????????????? Logic ???????????? 1 ( 5V )
?????????????????? Low?? ??????????????? Logic?? ???????????????????????????????????? ??????????????? Logic ???????????? 0 ( 0V )
??