Last active
December 22, 2015 15:47
-
-
Save ivanpepelko/d5c6a7375214a0e2e90e to your computer and use it in GitHub Desktop.
22-12-2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; =============================================== | |
; Postavljnje MCU i kofiguracijska rijec | |
; =============================================== | |
PROCESSOR 16F84A | |
#include "p16f84a.inc" ; ova datoteka sadrzi sva imena registara specijalnih namjena i njihove adrese od PIC16F84A mikrokontrolera | |
ERRORLEVEL -224 | |
__CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON & _WDT_OFF ; procesorske direktive | |
org 0x0 ; pocetna adresa od koje mikrokontroler krece nakon dovodenja napajanja | |
SETC macro | |
movlw b'11000110' | |
movwf PORTB | |
endm | |
bsf STATUS, RP0 | |
clrf TRISB ^ 0x80 | |
bcf STATUS, RP0 | |
SETC | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; =============================================== | |
; Postavljnje MCU i kofiguracijska rijec | |
; =============================================== | |
PROCESSOR 16F84A | |
#include "p16f84a.inc" ; ova datoteka sadrzi sva imena registara specijalnih namjena i njihove adrese od PIC16F84A mikrokontrolera | |
ERRORLEVEL -224 | |
__CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON & _WDT_OFF ; procesorske direktive | |
org 0x0 ; pocetna adresa od koje mikrokontroler krece nakon dovodenja napajanja | |
; 1GFEDCBA | |
ROLL macro | |
movlw b'10001000' ;A (1GFE1CBA) | |
movwf PORTB | |
movlw b'10000000' ;B (1GFEDCBA) | |
movwf PORTB | |
movlw b'11000110' ;C (11FED11A) | |
movwf PORTB | |
movlw b'11000000' ;D (11FEDCBA) | |
movwf PORTB | |
movlw b'10100100' ;Z (1G1ED1BA) | |
endm | |
bsf STATUS, RP0 | |
clrf TRISB ^ 0x80 | |
bcf STATUS, RP0 | |
ROLL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment