'Detecting which device is in a programmer.'
I've been looking at the code used by a couple of programmers to detect
the type of PIC that is in the programmer (or on the end of an ICSP
The general technique seems to be
1) Assume its a 14 bit core and try to read the ID word.
2) If ID word is valid return identified type
3) Assume its a 16 bit core and try to read the ID word.
4) If ID word is valid return identified type
5) return error.
I'm wondering what happens when there is a 16 bit core device in the
programmer, and the programmer tries to talk to it as if it was a 14 bit
core device ?
As far as I can see the risk of an unintentional "table write"
instruction being executed is very low as the 4 bit commands (18F) for
these are "11XX" and none of the 6 bit commands (16F) have the first two
bits as "1" as long as you send "0"s for all "don't care" bits.
Have I missed anything ?
More... (looser matching)
- Last day of these posts
- In 2005
, 2006 only
- New search...