I've been trying to execute the simplest code possible to check that my C code is working:
#include <p18f4220.h>
void main(void)
{
TRISB=0x00;
PORTB=0xf0;
}
This sets half of the pins on PORTB high right? MPLAB compiles it fine, but for some reason the chip just retains zero volts over all pins. The only configuration bit I changed was the Watchdog Timer, which I turned off. Am I missing something else?
#include <p18f4220.h>
void main(void)
{
TRISB=0x00;
PORTB=0xf0;
}
This sets half of the pins on PORTB high right? MPLAB compiles it fine, but for some reason the chip just retains zero volts over all pins. The only configuration bit I changed was the Watchdog Timer, which I turned off. Am I missing something else?