PDA

View Full Version : Symbol not previously defined (EEPROM_START) - PIC16F15325



MichelJasmin
- 29th December 2017, 20:01
Hello group,

I'm trying a new PIC (PIC16F15325) and I can't define anything on the on-chip EEPROM:



'----[ Color Tables ]-------------------------


GOTO OverColorTables


BaseColorsTable data $FF, $00, $00, $B9, $46, $00 ; Red, Orange
data $7F, $7F, $00, $00, $FF, $00 ; Yellow, Green
data $00, $8C, $73, $00, $00, $FF ; Cyan, Blue
data $4B, $00, $B4, $B4, $00, $4B ; Pink, Violet
data $FF, $FF, $FF ; White


OverColorTables:


The READ command doesn't generate any error/warning.

Self-programming is also supported by the chip :



13.1.1.2 Self-programming
The program memory cell and control logic will support
write and row erase operations across the entire VDD
range. Bulk Erase is not available when selfprogramming.


so I've tried READCODE but I get "bad expression" compile error.

I'm using PBP3.1 Gold + latest version of MPASM.

Any hint anyone? Should I post this to the ME Labs Forums too?

HenrikOlsson
- 29th December 2017, 20:31
I'm trying a new PIC (PIC16F15325) and I can't define anything on the on-chip EEPROM:
And how much on-chip EEPROM does the datasheet says that the 16F15325 has?

/Henrik.

MichelJasmin
- 29th December 2017, 20:44
And how much on-chip EEPROM does the datasheet says that the 16F15325 has?

/Henrik.

Storage Area Flash: 224 bytes.

The ASM look like this:



; EEPROM data.
ORG EEPROM_START

_BaseColorsTable EQU $
; C:\USERS\MICHEL\ONEDRIVE\SOURCES\MICROCODESTUDIO\H ARDDRIVESPIN\HARDDRIVESPIN.PBP 00117 BaseColorsTable data $FF, $00, $00, $B9, $46, $00 ; Red, Orange
DE 0FFh
DE 000h
DE 000h
DE 0B9h
DE 046h
DE 000h




The error is in RED.

EDIT: Just find out the PIC16F15325.PBPINC file doesn't have an EEPROM address in the "Target Device setup" section. The one for PIC16F690 contains:



EEPROM $2100, $21FF


Investigating...

pedja089
- 29th December 2017, 22:30
SAF is not EEPROM...

HenrikOlsson
- 30th December 2017, 08:25
MichelJasmin,
You seem to be missing the point.... DATA, READ, WRITE are commands used to access on chip EEPROM.
You can't use DATA, READ, WRITE on the 16F15325 because it does not have any on chip EEPROM hence the "missing" EEPROM_START symbol/label.

Yes, the 16F15325 has a section of FLASH (not EEPROM) that can be used LIKE the on chip EEPROM on the devices that have it but, again, DATA, READ, WRITE is not compatible with that.

/Henrik.

richard
- 30th December 2017, 09:38
http://support.melabs.com/forum/picbasic-pro-compiler-3-0-and-later/asm-assembly-language-in-picbasic-pro/6753-accessing-hef
the idea in this thread could be adapted to saf , a quick scan of the data sheet indicates the process to be very similar.
I don't have pbp3.1 or any of those chips to experiment with.

[i'm holding off on pbp3.1 until it works in mplabx properly , if ever]

mpgmike
- 30th December 2017, 19:36
[i'm holding off on pbp3.1 until it works in mplabx properly , if ever]

I was playing with MPLAB 8.90 and MPLAB X trying to figure out how to make them work. It seems like PBP would require it's own .lkr Linker files and a PBP version of a .c Header file to define commands. PBP works with MicroCode Studio, which is an IDE. I suppose the question is; is the issue on Microchip's end or MELabs' end? I believe MPLABX v3.60 still acknowledged PBP, but V4.0 does not.

MichelJasmin
- 2nd January 2018, 05:17
Thank you Richard, Henrik & pedja089, I was not aware about the difference between SAF and EEPROM. Will try to adapt the code from the thread mentioned (http://www.picbasic.co.uk/forum/showthread.php?t=23792&p=142610#post142610) by Richard.

Happy New Year & projects!