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

PICDEM or ICD2 or MCU hardware problem ??

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







PICDEM or ICD2 or MCU hardware problem ??
PostPosted: Tue Apr 25, 2006 6:24 am     Reply with quote

Quote:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC16F917 found, revision = Rev 0x1
...Reading ICD Product ID
Running ICD Self Test
...Passed
...Download Operating System Succeeded
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x4B3)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
25-Apr-2006, 14:17:36

MPLAB ICD 2 Ready


//-------------------------------------
Quote:

Erasing Target Device...
...Erase Succeeded
MPLAB ICD 2 Ready
Reading...
...EEPROM
...Read Succeeded
MPLAB ICD 2 Ready
Verifying...
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x3000, Val Read = 0x3FFF)
MPLAB ICD 2 Ready


//----------------------------------------
This are common outputs for all tested MCU's.
I have tested with 18, 28 and 40 pin MCU, i didnt get any error from ICD or from MCU but i can not run the program.

Program is compiler and writen to MCU but if i want to e.g. light the LED nothing happens. I use this demo board for some time now ( cca over 1 j.)
and i didnt have any problems till before few days.

I try to set jumper J6 and then you get some result but totaly wrong one.
E.g.
output_high(pin_b3) he lights B1 and B2.
THERE IS NO BAD Connections or missing ones!

Where to look ?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 25, 2006 11:15 am     Reply with quote

1. Are you using the PicDem board, or PicDem2-Plus ?

2. Post the LED blinking program that you are using.

3. Post your compiler version.
Guest








PostPosted: Tue Apr 25, 2006 12:27 pm     Reply with quote

1. Are you using the PicDem board, or PicDem2-Plus ?
PLUS

2. Post the LED blinking program that you are using.
Non of the previus programs are working. LED was just a test..
I have used this demo board for over a jear with different programs.

#include <16F913.h>
#fuses XT,NOWDT
#use delay(clock=4000000)
#include "PICDEM_LCD.C"

void main ()
{
//lcd_init();
//printf(lcd_putc,"Test");
//delay_ms(2000);

while(true)
{
output_high(PIN_B1);
output_high(PIN_B0);
}

In this case i get B0 and B1 ( i have restarted the ICD few times ) but there is also B3 light switched ON. In second case i can get any display on LCD.

3. Post your compiler version.
3.224
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 25, 2006 1:04 pm     Reply with quote

Try the following test program. It should blink the LED on Pin B0.
I didn't test this in hardware because I don't have a 16F913, but I
believe it should work.

The PicDem2-Plus has an external 4 MHz oscillator (not a crysta),
so that's why I'm using the EC_IO fuse. Also, the LCD module must
be disabled to use Port B for digital i/o. Part of the LCD module
is disabled upon power-up, but not all of it. That's why I put in the
statement to disable it, below:
Code:

#include <16F913.H>
#fuses EC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT
#use delay(clock=4000000)

void main()
{
setup_lcd(LCD_DISABLED);

while(1)
  {
   output_high(PIN_B0); // Blink the LED on pin B0
   delay_ms(500);
   output_low(PIN_B0);
   delay_ms(500);
  }

}
Guest








PostPosted: Wed Apr 26, 2006 2:27 am     Reply with quote

I restarted whole thing ( ICD, picdem, mplab, new operating system ) one more time and now its much better like before and this is the case:


On 16f913
After compiling your test program B0 is blinking but the B3 is still ON.

On 16F877
After compiling just B0 is on, so this part ist ok.

//-----------------------------------------------------------
OK. So now i know its 16F913 program "error". But i dont get it why, becuse before cca 6 months i have tested this program without error ( with correct display).

void main (void)
{
lcd_init();
printf(lcd_putc,"PICDEM Test");
delay_ms(2000);
}

and now this is not working ?
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