Hi, I recently started using c18, and I have been writing some programs that compile fine, but I didn't have a programmer to test them at the time. My programmer (PicKit2) finally arrived today and when I programmed my 18f4320 and tested the ports with my digital oscilloscope, nothing was happening. I figured the best plan of action would be to just try and turn some ports on and make sure that everything was working fine.
#include <p18f4320.h>
#pragma config OSC = INTIO1
void main (void)
{
LATD = 0x00;
TRISD = 0x00;
LATDbits.LATD0 = 1;
while(1);
}
That is the code I am using to test the RD0 port on my microcontroller. If anyone can help me figure out why the output isn't turning on it would be greatly appreciated.