PIC8λ???????????д????
PIC??е??????????????PIC???????????д?????(??????????)????????PIC???????????????????????????д???????????
????????PIC???????????????????????????д??????????????????????д???????д??????????Щ?淶????????PIC16F84о????????????????????????????????????????д?????(???)?????????????ο???
??????嵥
1??File TURNON.ASM
2??Assembly code for PIC16F84 microcontroller
3??Turns on an LED connected to B0
4??Uses RC oscillator,about 100kHz
5??CPU configuration
6??(it??s a 16F84,RC oscillator??
7??watchdog timer off??power-up timer on)
8??processor 16F84
9??include
10??_config_RC_OSC&_WDT_OFF&_PWRTE_ON
11??Program
12??org 0;start at address 0
13??At startup??all ports are inputs??
14??Set Port B to all outputs
15??movlw B??00000000??;w=binary 00000000
16??tris Portb???????? ;copy w to port B control reg
17??Put a 1 in the lowest bit of port B??
18??movlw B??00000001??;w=binary 00000001
19??movwf portb????????;copy w to port B itself
20??Stop by going into an endless loop
21??fin??goto fin
22??end ;program ends here
?????????嵥???м????????
??1??????(File)???????????TURNON??ASM??TURNON?????????(?????LED)????ASM???????????????
??2???????????????PIC16F84??????????????д???????
??3????????????????PIC16F84 PORTB??B0λLED??
??4???????RC?????????????????100kHz??
??5??6??7???????16F84 CPU???????(??RC??????????????????watchdog timer??????power-up?????????????16F84???????????潫???)??
??8??9??10???α??䶮??????????????????й??????????????????????????????????????????????????????䶮??????8??9??10?л???????????????????????16F84????RC???????????????????????????綨????????á?????5??6?У???????????????????????????????????????????????α??????PC????????????????????
??11????????????????????????????
??12?????????????????0?????16F84??????е??????????У???????α??䶮
??13??14????????????????????????(????)?????????????????????ж????????漴??B???趨?????(????λ??????)??
??15???????????д??????????????????(B)????00000000?????????????W??
??16?н?W???????????(??00000000)?????B????????????B??????????15??16?о???????????????17????????????????????????B??????λ?1??
??18?е????????????00000001???????????W????19???????W???????????????B?????B??????λB0????????????λ?????????????B0λ??LED????
??20??????????????????????B0λ???????????????
??21?е??????????????????B1???????????
??22????α???END????????????????
???嵥???г?????PC????????????MPASM???????????л???????????????????????HEX?????????????????????????????????????????????PIC16F84??????????洢??????????????о???????????·???У?????????????????16F84 B0λ??LED??

????admin ?????????2018-05-28