Log in

View Full Version : Issue using DATA statement with 16F1933 in PBP2.60



bcd
- 7th August 2010, 14:53
Hi All,

i have been using the 16F1933 with great success for a while now using PBP2.60 (unpatched), but today went to add the DATA command to load some values to eeprom and save space on doing a static LOOKUP and reduce memory usage.

When compiling I get the error :
Address Exceeds Maximum range for this processor

There is one entry for every byte I am trying to store. The chip has 256 byte of eeprom, but I am only trying to store data in the first 16 positions.


data $00,$3C,$78,$2C,$58,$20,$70,$FF,$00,$00,$00,$01,$0 2,$03,$03,$03


Could it be an issue with the P16F1933.BAS file? Looking insode it has

EEPROM $F000, $F0FF
But I wonder if it is causing an issue.

I can manually write the data to the eeprom in the PicKit2 software, but its a pain to do, and I sometimes forget to deselect the EEPROM write flag and loose all the data...

Anyone got any idea ?

Bill.

Acetronics2
- 8th August 2010, 10:17
Hi, BCD

Just tried a 16F1933 program ( ADCIN10_1934X.pbp from the Melabs Samples - modified for 16F1933 ), adding your DATA line ...

No problem, it compiles fine within MCS ide.

@ First, try to apply the patch ... as there were some little errors about the 16F enhanced series parameters ( shhhht !!! do not repeat it !!! ;) )

Hope you hadn't made too many mods to your libs ... ;)

Alain

bcd
- 8th August 2010, 12:53
Ha Alain,

Tried the 2.60a patch, but it made no difference.

Even a very simple program with the DATA statement shows the issue.

I wonder if its a MPASM thing ? What version are you running ? I have 5.34, but other than the EEPROM address thing it runs fine !

bill

Acetronics2
- 8th August 2010, 13:04
Ha Alain,

Tried the 2.60a patch, but it made no difference.

Even a very simple program with the DATA statement shows the issue.

I wonder if its a MPASM thing ? What version are you running ? I have 5.34, but other than the EEPROM address thing it runs fine !

bill

Hi, Bill

Here, I Have the latest 8.53 MPLAB release , I think MPASM is v 5.36 .
I try it into MPLAB ide, as it didn' produce any problem within MCS ...

read you soon ...
Alain

Acetronics2
- 8th August 2010, 13:16
Bad news for you ...



Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p16LF1933 "Datatest.bas"
Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPW.EXE" -ampasmwin -k# -p16LF1933 "Datatest.bas"
PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc.
All Rights Reserved.
Loaded C:\Program Files\Microchip\MPLAB IDE\Projets\Datatest.COF.
BUILD SUCCEEDED: Sun Aug 08 14:07:27 2010



so, I only can recommend some PBP re-installation, re-patching ... and MPLAB 8.53 Update ...

I attach my test-project

Alain

bcd
- 10th August 2010, 01:36
I did the upgrade to 2.60a and it made no difference.

What got it working was to upgrade MPASM to 5.36 through an update to MPLAB.
Looking through the release notes it mentions issues with memory assignments for the 16F1xxx series, although in typical Microchip fashion you need to read between the lines.

Thank you for your testing and pointing me in the right direction !

Bill.