Richard is asking about config settings where watchdog timer, crystal mode, write protect, etc are all set, and what you are doing there.
The program looks right to me tho I have not used it. Except the output doesn’t absolutely verify what was written, only what read back.
Code:
verifya var type ' byte or word
verifyb var type '
verified var bit '
EraseCode $1800 ' Whole Block of 4 Words $1800 to $1864?
EraseCode $1900
RadioID = RadioID + 1
RadioCH = RadioCH + 1
WriteCode $1803, RadioID ' Writes to 4th Word in Block
WriteCode $1903, RadioCH
ReadCode $1803, verifya ' Reads from 4th Word in Block
ReadCode $1903, verifyb
verify = 1
if verifya != RadioID then verified = 0
if verifyb != RadioCh then verified = 0
if verify = 1 then
hserout2["RadioID: ", dec RadioID, 13,10]
hserout2["RadioCH: ", dec RadioCH, 13,10]
else
hserout2[“It’s broken :(",13,10]
endif
Bookmarks