ovaj kod:
Code: Select all
;*****Set up the Constants****
STATUS equ 03h ;Address of the STATUS register
TRISA equ 85h ;Address of the tristate register for port A
PORTA equ 05h ;Address of Port A
COUNT1 equ 08h ;First counter for our delay loops
COUNT2 equ 09h ;Second counter for our delay loops
;****Set up the port****
bsf STATUS,5 ;Switch to Bank 1
movlw 00h ;Set the Port A pins
movwf TRISA ;to output.
bcf STATUS,5 ;Switch back to Bank 0
;****Turn the LED on****
Start movlw 02h ;Turn the LED on by first putting
movwf PORTA ;it into the w register and then
;on the port
;****End of the program****
end ;Needed by some compilers,
;and also just in case we miss
;the goto instruction.
shema je ovdje, samo sto sam ja umjesto r i c, spojio kristal na 15 i 16 nozicu.
Program je kompajliran sa mplab-om i namjestio sam za koji uredjaj zelim. Ispravno programiran.
Ako netko moze pomoci, bio bih mu zahvalan. hvala.