Orders #630900
Hi guys i recently bought pic p40 Dev. Board . Although it is simple board when I try to program it with a simple led program I get following .(I am using icd3 c18 library and pic18f4520 or pic18f452)
Target Detected
CAUTION: Check that the device selected in MPLAB IDE (pic18f4520)
is the same one that is physically attached to the debug
tool. Selecting a 5V device when a 3.3V device is connected
can result in damage to the device when the debugger checks
the device ID.
Yes or No
If you chose yes
Program completed
Reading competed
Verify completed
but the leds does not lighting.
This is my program the datasheet of the dev board is the attached file .
Please help I am desperate.
Hi guys i recently bought pic p40 Dev. Board . Although it is simple board when I try to program it with a simple led program I get following .(I am using icd3 c18 library and pic18f4520 or pic18f452)
Target Detected
CAUTION: Check that the device selected in MPLAB IDE (pic18f4520)
is the same one that is physically attached to the debug
tool. Selecting a 5V device when a 3.3V device is connected
can result in damage to the device when the debugger checks
the device ID.
Yes or No
If you chose yes
Program completed
Reading competed
Verify completed
but the leds does not lighting.
This is my program the datasheet of the dev board is the attached file .
Code:
#include<p18f4520.h>
#pragma config XINST = OFF
#pragma config LVP=OFF
#pragma config OSC=HS
#pragma config WDT=OFF// Use internal Oscillator, Watchdog off, LVP off
#pragma config MCLRE = ON // Extended instruction set on
void delay (void)
{
int i;
for (i = 0; i < 10000; i++)
;
}
void main (void)
{
/* Make all bits on the Port B (LEDs) output bits.
* If bit is cleared, then the bit is an output bit.
*/
TRISD = 0;
while (1)
{
/* Reset the LEDs */
PORTD = 0;
/* Delay so human eye can see change */
delay ();
/* Light the LEDs */
PORTD= 0x5A;
/* Delay so human eye can see change */
delay ();
}
}