Hey, fairly new to pic programming. I'm using a Pic16f88, MPLAB and the Hi-Tech C compiler. I need to set pins RA1 as input and RA4 as output.
I've tried a few different syntax;
TRISAbits.TRISA1=1;
TRISAbits.TRISA4=0;
TRISA=%00000010;
TRISA=%00000000;
Neither of these two compile correctly. The only way I can get the program to compile is by stating;
Any help is appreciated, thanks.
I've tried a few different syntax;
TRISAbits.TRISA1=1;
TRISAbits.TRISA4=0;
TRISA=%00000010;
TRISA=%00000000;
Neither of these two compile correctly. The only way I can get the program to compile is by stating;
However I have my doubts about the above and feel I am missing something fundamental.#include <htc.h>
#include <pic.h>
void main()
{
TRISA1=1; //Set RA1 as input
TRISA4=0; //Set RA4 as output
Any help is appreciated, thanks.