are there any compilers that you can download and use for PIC16F84A.
it is one of my subjects at uni and i needed a hand with it.
when stetting up the ports, if we want porta set up as inputs and port b as upper 4 bits as inputs and lower 4 bits as outputs.........
why is it set up in the following manner?
f equ 1
w equ 0
porta equ 5
trisa equ 85
porta equ 6
trisa equ 86
are there any compilers that you can download and use for PIC16F84A.
it is one of my subjects at uni and i needed a hand with it.
when stetting up the ports, if we want porta set up as inputs and port b as upper 4 bits as inputs and lower 4 bits as outputs.........
why is it set up in the following manner?
f equ 1
w equ 0
porta equ 5
trisa equ 85
porta equ 6
trisa equ 86
This is just header part of the program, it just says Asebler where (in memory) to look for eg. porta...
The program should look like this:
Code:
org 0x0005
INIT CLRF PORTA
CLRF PORTB
BSF STATUS,RP0
MOVLW b'00001111' ;direction Port A
MOVWF TRISA
MOVLW b'00000000' ;direction Port B
MOVWF TRISB
BCF STATUS,RP0
MOVLW b'01010000'
MOVWF PORTA
are there any compilers that you can download and use for PIC16F84A.
it is one of my subjects at uni and i needed a hand with it.
when stetting up the ports, if we want porta set up as inputs and port b as upper 4 bits as inputs and lower 4 bits as outputs.........
why is it set up in the following manner?
f equ 1
w equ 0
porta equ 5
trisa equ 85
porta equ 6
trisa equ 86
These are the standard MicroChip equates, you don't need to input them - simply 'include' the file that MicroChip supply as part of the assembler, that way you are guaranteed to get the correct ones.