[sdiy] PIC 16F1788 CPU bug
Tom Wiltshire
tom at electricdruid.net
Fri Nov 29 16:30:33 CET 2013
Hi All,
I realise this isn't a PIC list, but I know that several of you use these uPs, so I'll be brief.
I've just spent two days debugging a bit of code, only to finally discover that the bug is the silicon:
http://ww1.microchip.com/downloads/en/DeviceDoc/80000575B.pdf
I'd asked for samples of the new 16F1788 chip, and they sent me the first "2040" revision which includes a fault with the BRA/BRW instructions. If you're using interrupts as well, it doesn't jump to where you think it should. It doesn't seem to miss by much (it never crashed the chip) but it throws all kinds of weird effects, and it made me think that my branching variables weren't the values I thought they were.
Moral of the story - check for Errata sooner rather than later, or spend hours hunting fruitlessly for a bug which isn't your fault.
Hope this helps spare someone else the agony!
T.
More information about the Synth-diy
mailing list