-
Copy of PIC chip fails... timing issue?
I'm trying to copy a PIC chip (a DIP8 12F510, not embedded in anything) and have read the source PIC with a Pickit3 and MPLAB. I've then written it to new PIC chips (SMD SOIC this time), and they verify perfectly against the source.
But when the copied PICs are put into circuit, they don't do what they're supposed to. They're supposed to wait for an input to become active, then wait a predetermined time using the internal oscillator as a reference, then put out a fixed bit pattern on an output. In circuit, at the time the PIC should be triggered, the processor doesn't seem to get any response from the PIC - gets an all 0s response.
MPLAB didn't force over-write the internal osc calibration value at 0x03FF, so that should be OK. I'm guessing the timing of this application must be fairly critical; there's evidence of some fine tuning of timing with lots of NOPs by the original author, who I've lost contact with now so I can't ask him.
Would there be any other reason why an otherwise good copy of a PIC wouldn't work in circuit for the desired application?
-
Could be something simple like configuration bits EG internal pullup on inputs not enabled or osc settings wrong.
Firstly, Is the SMD Chip the exact same chip. Check what comes after 12F510 in the PIC number.
Are you testing both with the same external components and not different boards ?
As one is SMD I suspect not and an external fault maybe the cause.
Just worked out what is going on. Code protection is set, but the first 96 bytes are readable even with code protection set (as per datasheet), which tricked me into thinking the entire chip was readable. I should have picked up on that, with a few jumps to subroutines that appeared to go beyond the end of the (readable) code. Now I have to work out a way to glitch my way into getting a full dump of the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks