yes indeed that was simple to read the PIC ID using one part of the Darrel's code and a 18F4680
Code:
' READING pic18f4680 DEVICE ID
'
DEFINE OSC 20
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
ID1 var byte
ID2 var byte
GOTO START
@ #include "RTconfig.inc"
START:
@ ReadConfig?CB _DEVID1, _ID1
@ ReadConfig?CB _DEVID2, _ID2
HSEROUT ["DEVID1=",HEX ID1," DEVID2=",HEX ID2]
STOP
Serial communicator show...
Code:
DEVID1=82 DEVID2=0E
Using a my programmer to read the device, i have...
Code:
L0100: >> 24.02.2007, 13:10:13
L0101: Reading device: Microchip PIC18F4680.
L0102: Device insertion test ...
L0103: Checking device ID ...
L0104: Device ID: DEVID2=0Eh DEVID1=82h
L0105: Reading device ...
L0106: Verifying device at VCCmax. ...
L0107: Verifying device at VCCmin. ...
L0108: Reading device - done.
L0109: Elapsed time: 0:00:30.6
L0110: Buffer checksum in range of device [0h..7FFFh]: 00FD3D23h
Somehow interesting. i bet you will be able to change and create your own device ID in the ID locations at run time as well. Nice place to save the software version...
Bookmarks