Author Topic: Which programmer to buy to find nasty PIC16F877A bug  (Read 6377 times)

carterson2

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Which programmer to buy to find nasty PIC16F877A bug
« on: May 01, 2008, 06:52:17 AM »
Hi,

I buy PIC's from modtronix, so I use the bootloader, CCS compiler and lots of printf statements!

I attached an SD card to a SBC44B which works great 99.999% of the time.

I have spent over a year trying to find that .001% bug.

Q: Any suggestions on how to find it? What to buy and why?

thanks
jim
http://www.gpscruise.com




sk_uk

  • Hero Member
  • *****
  • Posts: 80
    • View Profile
    • http://www.skpang.co.uk
Re: Which programmer to buy to find nasty PIC16F877A bug
« Reply #1 on: May 02, 2008, 05:02:48 AM »
Can you give a detail description of the bug?

carterson2

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Which programmer to buy to find nasty PIC16F877A bug
« Reply #2 on: May 02, 2008, 07:12:24 AM »
Its a datalogger.

When you push a button, it writes the gps-location to the SD card at SD-block-location=counter,
then decrements counter and writes it always to block 1 on the SD card.

Sometimes it writes all zeroes instead of lat,lon.
Sometimes the counter decrements by more than one.

but this only happens every 1000 times.
I share RAM alot. Eg, I use unions to reuse RAM, so I figured that was suspect,
but not sure which emulator to buy to set-a-breakpoint on the event...

thanks for any help.
-jim

sk_uk

  • Hero Member
  • *****
  • Posts: 80
    • View Profile
    • http://www.skpang.co.uk
Re: Which programmer to buy to find nasty PIC16F877A bug
« Reply #3 on: May 02, 2008, 10:57:56 AM »
Have you got the source code we can have a look at?

carterson2

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Which programmer to buy to find nasty PIC16F877A bug
« Reply #4 on: May 02, 2008, 01:59:54 PM »
Probably not. At present, I protect the sourcecode. Its my only value added... I cant afford patents...

I have an opensource version, but it doesnt use the SD card, only EEPROM..

Anyway, do you have any suggestions on debuggers I might use??

epizido09

  • Guest
Which programmer to buy to find nasty PIC16F877A bug
« Reply #5 on: December 30, 2009, 07:01:33 AM »
when it comes to that extremely nice C compiler that does that "knocks hand-writtenoptimised assembly into a hat", can i ask ya what compiler it is???  thanks