News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Read getting errors with new version of compiler

Started by swsalun, Jun 16, 2023, 01:58 AM

Previous topic - Next topic

swsalun

Hello,
I need help to find what is going and error.
Tried to compiled with latest compiler and getting an error
With older compiler this working fine,
Dim MyName As Byte ' Storage Data
Read MyName
Error message : Read command is not recomended for use and will be removed from later compiler version.

Then I change
Dim MyName As Byte ' Storage Data
Dim Kall As Byte   'Try Call
 Kall = LRead Bit8_Val MyName
Bit8_Val: Ldata 123

With these change compiler no more errors, and test to real hardware it doesn't working.

Please help what is changes for Read Commands Function, I look at Proton Compiler Manual in page 393 of 547, sub Flash Memory and Eeprom Commands.

Thanks,
S

 

RGV250

Hello,
Is it an error or a warning, it looks more like a warning so will compile but is letting you know thet it will not in later versions of the compiler.

Bob

charliecoutas

Hi

Exactly which page of the manual (I am presuming the Positron 8 bit manual) do you find the Read command?
I can't see it.

Regards
Charlie

John Lawton

READ and DATA are legacy commands (still in PicBasicPro (PBP3.1). They haven't been a part of Proton/Positron for a long time. You might try CREAD and CDATA instead.

tumbleweed

QuoteYou might try CREAD and CDATA instead

Using CREAD/CDATA or LREAD/LDATA it looks like the compiler is inserting a bank instruction, which will screw up the data.

compiler v4.0.3.4, 18F26K22
Device = 18F26K22
Declare Xtal = 8

Dim bVar As Byte
bVar = CRead Label
Stop
Label: CData "123"

results in:
Label
    movlb 0x00         <<<<<<<<<<<
    db 49,50,51