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

Something funky happening with Pickit2

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



Joined: 07 Apr 2008
Posts: 49

View user's profile Send private message

Something funky happening with Pickit2
PostPosted: Thu Oct 02, 2008 10:09 pm     Reply with quote

Sorry to be such a noob here but I'm still learning this stuff.

As I type this, my Sixca.com digital clock/temp project is running on the desk beside me.

I used CCS 4.069 to compile the .c code and the Pickit2 Programmer to write the .hex file to the 16F628A.

After a new compile with fiddling with the code, I erase and write an updated hex to the chip and again everything appears to write fine with Verify returning a successful comment.

Now the funky part, I can take the last chip I wrote to, read it and export the .hex file. Now when I take that exported .hex file and write it on to a test chip, everything appears to write fine with a Verify confirming.

Now inserting the chip into the project, the chip acts in the manner previous to the last update/write. its like the last write never happened.

Its not consistent, sometimes this happens, sometimes not.

I'm not casting doubt on the software, I not read anything here that indicates its a software issue.

The only thing I can think of is the method I'm using to write to the chip with. (Small breadboard with header pins for the PIckit2, jumper wires to the correct pins on the 628a)

Can someone comment on this and toss me a hint please.
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Thu Oct 02, 2008 11:29 pm     Reply with quote

Aurbo:

As you can imagine, this is a very 'vague' error. Rolling Eyes But there are a couple of things you can do to figure out what is causing the problem.
  1. verify that the checksum of the exported hex file and the original hex file are the same. You could follow this procedure to isolate where the problem is:
      -build hex, note checksum;
      -import into PICKit2 software, note checksum;
      -burn hex; read back code from chip, note checksum;
      -clear PICKit2 read buffer and read chip again, export hex;
      -clear PICKit2 buffer, import above hex, note checksum;
      -burn chip, clear buffer, read chip, note checksum;
    The trick is to verify the checksum at each stage.

  2. try out some different code and see if you get the same kind of error. Also try this experiment on some other chips.

  3. update the PICKit2 firmware and PC software to the latest from the Microchip site.

  4. check all connections and ensure that there are no shorts or disconnects.

Rohit
Aurbo



Joined: 07 Apr 2008
Posts: 49

View user's profile Send private message

PostPosted: Fri Oct 03, 2008 11:49 am     Reply with quote

Thanks for the tips Rohit,

I've upgraded my PicKit2 software and its hex file.

I always write down the checksum when I'm compiling and writng to the chip, just to make sure. I'll watch for it on exports too.

I've taken the chips in question, 5 of them, and erased and wrote a new blinky code to it to check. They all take the write and function correctly according to the new code.

What I do get occasionally is the code wont start on power up, leaving just a single segment lit up or just nothing at all. Checking the chip shows nothing wrong in read/verify.

What brought my attention to all this was the fiddling with the code was to get the colons to flash every second on Output_B4.

I can comment out every single instance of
Code:
Output_low(Colons); Output_high(Colons);
and replace it with a single _high or _low command, but it does not respond to it.

I'll fiddle a bit more and see if I can get it to respond correctly.

Cheers
Steve
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