PDA

View Full Version : Writing User ID



Del Tapparo
- 4th December 2007, 01:31
How do I write to the User ID memory locations (2000h-2003h) on a PIC 12F683? Poke, PokeCode, Write, and WriteCode don't seem to be the answer. Do I need to insert assembly code in the PBP code?

nomad
- 4th December 2007, 01:55
it's a special register, I access it through my programmer.

mister_e
- 4th December 2007, 03:47
place those line at the end of your code


asm
errorlevel -220
org 0x2000
dw 0,1,2,3

endasm

you should have
ID0 = 00
ID1 = 01
ID2 = 02
ID3 = 03

Probably there's a much more elegant way to do it... seems to work here

mister_e
- 4th December 2007, 04:20
deuhhh, yes there's an easier way.... Always nice to read MPASM PDF


@ __IDLOCS 0x1234


Neat, easy, and it works!

EDIT:But seems the previous allow much possibility...you could set 1A, 1B, 1C, 1D.. not with the second.. or i overlooked something... as usual ;)

Darrel Taylor
- 4th December 2007, 04:28
And for the crowd that doesn't use MPASM ...
A shrinking crowd, but still a crowd.

This is from PM.TXT
8.2. ID

ID Expr
ID String
ID CHECKSUM

Each PICmicro MCU has a 16-bit (12-bit core) or 28-bit (14-bit core) ID.
This value can be set in one of three methods. A numeric expression or
string constant can be used for either core type. For 12-bit cores only,
the reserved word CHECKSUM may be used. This forces some PICmicro MCU
programmers to compute the checksum of the PICmicro MCU code space.

Edit: Put an @ and a space in front of it