PDA

View Full Version : PBC 2.6 PIC12F683 EEPROM WRITE, programmin fuses???



rdheiliger
- 16th May 2010, 18:46
Just upgraded to Windows 7 64 bit and PBP 2.6. In Windows 7 I have to use the MPASM assembler since the PM is 16 bit, I am using MPLAB v8.5. I get an assembler error that says the eeprom WRITE command is not previously defined. Removing my WRITE 0,OnDiff code line allows the program to assemble without error. But of course I need to write to the eeprom.

I uninstalled PBP 2.6 and MPLAB v8.5 and reinstalled PBP 2.5 and MPLAB v8.1 and the program compiles without error. This indicates there is a problem with the WRITE command in PBP 2.6, relating to the PIC12F683.

On another topic,
The @ DEVICE format for setting fuses does not work with MPASM.
The @ __config directive is flagged as an error by MPASM.
Is there now no way to set fuses in code?????
What a pain!

RD

Darrel Taylor
- 16th May 2010, 19:32
I get an assembler error that says the eeprom WRITE command is not previously defined.
Your OnDiff variable is probably a WORD, and it's probably the only variable you are using with the WRITE command.

There is an issue with PBP 2.60 when using ONLY WORD variables.
See the last issue on this page (Command affected: WRITE)
http://melabs.com/support/pbpissues.htm


On another topic,
The @ DEVICE format for setting fuses does not work with MPASM.
Correct, DEVICE is only for the default PM.exe assembler.

The @ __config directive is flagged as an error by MPASM.
There must be a syntax error in your statement.
What error does it report?
Usually the error tells you where the problem is. (but not always)

rdheiliger
- 16th May 2010, 23:21
Yup the OnDiff var is a word.

The problem with __config not working was that you need to comment out the config statement in the .INC file for that chip.

like this.

NOLIST
ifdef PM_USED
LIST
include 'M12F683.INC' ; PM header
device pic12F683, intrc_osc_noclkout, wdt_on, mclr_on, protect_off
XALL
NOLIST
else
LIST
LIST p = 12F683, r = dec, w = -302
INCLUDE "P12F683.INC" ; MPASM Header
;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
NOLIST
endif
LIST

thanks
RD