1) This device doesn't have on board EEPROM. Instead it's using a specific section of "program memory" for the same purpose. I don't think I've played around with that feature but my guess would be to use WRITECODE/READCODE/ERASECODE. Since this type of memory is erased in blocks you can't overwrite a single a byte, instead you need to read out the block, erase the block, then write it back again with the single (or more obviously) values changed.
Code:
' #### These Error if uncommented:
' FVRCON = $0 ' Disabled.
' FVRCON = $11000101 ' Enabled, Vref 1.024V, DAC1out1 (RA0).
' DAC1CON0 = $10101000 ' Vref from FVR.
' DAC1CON1 = $10000000 ' Set initial output value to 50% of Vref.
2) When writing numbers in binary you need to put a %-sign in front of it - not a $-sign which is used for hexadecimal. FVRCON = $0 would work though, are you saying it won't compile with that either?
Bookmarks