Hello all,
I've programmed in C18 before briefly using tutorials and managed to do some basics. However, I've now got an 18F13K22 and I've found I'm not even capable of getting it to do the basics. I'm using mplab IDE v8.60 and microchips c18 compiler. I've read through the compiler, pic and mplab manuals as well as going through the entire 18f13k22.h file to try and get an idea as to what is going on.
So far I have this:
Now I would assume that this, being such a basic and trivial task, would be simple enough to get first try. Alas, a whole day of reading, programming and stressing out has led me to believe that I'm missing some important details as there is zero output on either of those pins when it is hooked up. I can't find a document or source of info on this PIC that doesn't seem to either be missing out all the basics that I need or simply in another language.
Can anyone please shed some light on this issue?
I've programmed in C18 before briefly using tutorials and managed to do some basics. However, I've now got an 18F13K22 and I've found I'm not even capable of getting it to do the basics. I'm using mplab IDE v8.60 and microchips c18 compiler. I've read through the compiler, pic and mplab manuals as well as going through the entire 18f13k22.h file to try and get an idea as to what is going on.
So far I have this:
Rich (BB code):
#include <p18f13k22.h>
void main(){
TRISA = 0;
TRISB = 0;
while(1){
PORTBbits.RB7 = 1;
PORTAbits.RA0 = 1;
}
}
Can anyone please shed some light on this issue?