CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC16F628A with PICDemo 2 Plus Board

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








PIC16F628A with PICDemo 2 Plus Board
PostPosted: Tue Aug 23, 2005 12:32 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2005 1:02 pm     Reply with quote

I don't get that error with MPLAB vs. 7.20. Are you using an old version
of MPLAB ? See this thread from the Microchip forum, especially Olin's
post. If you're using an earlier version, then upgrade to the latest vs.
http://forum.microchip.com/tm.asp?m=30036&mpage=1&key=16f628a&anchor#30036
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 23, 2005 2:01 pm     Reply with quote

Also, did you select the right part in MPLAB?
Guest








PostPosted: Tue Aug 23, 2005 2:19 pm     Reply with quote

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








PostPosted: Tue Aug 23, 2005 2:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2005 2:40 pm     Reply with quote

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








PostPosted: Tue Aug 23, 2005 2:56 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2005 3:15 pm     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Aug 23, 2005 4:04 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group