View previous topic :: View next topic |
Author |
Message |
Guest
|
PIC16F628A with PICDemo 2 Plus Board |
Posted: Tue Aug 23, 2005 12:32 pm |
|
|
Anybody have problem connecting PIC16F628A to PICDemo 2 Plus board?
I have no luck, here is the error.
Any jumper or mod required? I though that it came in with a 18-pin socket, then it should support it.
Any suggestion will be appreciate....
Quote: | Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x89, read=0x83)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
|
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Aug 23, 2005 2:01 pm |
|
|
Also, did you select the right part in MPLAB? |
|
|
Guest
|
|
Posted: Tue Aug 23, 2005 2:19 pm |
|
|
I use the MPLAB 7.20
I try to re-download MPLAB and install again. It does the same thing, no luck.
Answer to Mark:
Yes, I select the right device from the Config drop down list.
Finally, I disable the debugger feature, just use the ICD2 as programmer,
I have no error, but after programmed the part, it does not work at all.
It seem program fine. |
|
|
Guest
|
|
Posted: Tue Aug 23, 2005 2:21 pm |
|
|
Here is the code:
Code: | #include <16F628A.h>
#fuses XT,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)
void main()
{
while(1)
{
output_b(0xff);
delay_ms(250);
output_b(0x00);
delay_ms(250);
}
}
|
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 23, 2005 2:40 pm |
|
|
The following program will blink the LED labeled "RB0" on the PicDem2-
Plus board. Make sure jumper J6 is installed (it's next to the LEDs).
Also note that since the PicDem2-Plus board has an oscillator and
not a crystal, you need to use the EC_IO fuse instead of XT.
Also, in MPLAB vs. 7.20, after you program the PIC, you can release
the board from reset by clicking the button on the MPLAB menu bar
that has an upwards transition symbol on it. Then the LED will start
blinking. Or, you could just unplug the ICD2 cable from the board.
Code: | #include <16F628A.H>
#fuses EC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
//========================
void main()
{
while(1)
{
output_high(PIN_B0);
delay_ms(500);
output_low(PIN_B0);
delay_ms(500);
}
} |
|
|
|
Guest
|
|
Posted: Tue Aug 23, 2005 2:56 pm |
|
|
Thanks..
I got it now, even those the config drop down list state that 16f628a
upport debug, but it is not true. It only support as a programmer when use the ICD2.
On demo 2 plus board, have to use the fuse EC.
Thanks again.... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 23, 2005 3:15 pm |
|
|
If you want debugging capability, go to the 16F88. It's the same package
size, but it can be debugged with ICD2. I tested it just now with the
PicDem2-Plus board and it works with ICD2 in debug mode and in
programmer mode. Here is the test program:
Code: | #include <16F88.h>
#fuses EC_IO,NOWDT,NOPROTECT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)
void main()
{
while(1)
{
output_high(PIN_B0);
delay_ms(500);
output_low(PIN_B0);
delay_ms(500);
}
} |
|
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Tue Aug 23, 2005 4:04 pm |
|
|
Looks like the question has been solved.
I also had the same problem with the PIC16LF627. Debugging gave an invalid device error, but setting up the icd-2 as a programmer gave no problems.
-Mike |
|
|
|