Hello
I am brand new to PICS and am trying to program a 16F84A
I have a HEX file provided by the supplier of my programmer, I have successfully programmed this into my PIC and it works fine (flashes LED) so I know that my PIC, programmer and test board are all OK.
I have been trying to write and compile my own simple program (in C), but could not get it to work so I went to the simplest program I could think of as follows:
#include <htc.h>
#include <pic.h>
void main()
{
TRISA=0 ;
TRISB=0;
while(1)
{
PORTA=255;
PORTB=255;
}
}
Theoretically this should set all outputs to High, thus lighting the LED, no matter which pin it is connected to.
It compiles and programs fine, but nothing happens, when the test board is turned on.
I am using the Hi-Tec Pic compiler (it is set to the correct processor), I suspect I am doing something wrong with the compiling stage, as the program is so simple, but cannot see anything wrong.
Please can someone help solve my issue?
I am brand new to PICS and am trying to program a 16F84A
I have a HEX file provided by the supplier of my programmer, I have successfully programmed this into my PIC and it works fine (flashes LED) so I know that my PIC, programmer and test board are all OK.
I have been trying to write and compile my own simple program (in C), but could not get it to work so I went to the simplest program I could think of as follows:
#include <htc.h>
#include <pic.h>
void main()
{
TRISA=0 ;
TRISB=0;
while(1)
{
PORTA=255;
PORTB=255;
}
}
Theoretically this should set all outputs to High, thus lighting the LED, no matter which pin it is connected to.
It compiles and programs fine, but nothing happens, when the test board is turned on.
I am using the Hi-Tec Pic compiler (it is set to the correct processor), I suspect I am doing something wrong with the compiling stage, as the program is so simple, but cannot see anything wrong.
Please can someone help solve my issue?