News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Cdata or Ldata

Started by See_Mos, May 08, 2021, 03:12 PM

Previous topic - Next topic

See_Mos

which is best?

I need to read four blocks of about 100 items, all 8 bit.

I read the manual but cannot see a difference between the two commands.

top204

#1
They are both the same.

Originally, the LData directive was for standard 14-bit core devices, and the CData directive was for 18F devices, but I merged them many years ago, and I am going to remove LData from the manuals.

I kept the name in place so there was backward compatability with older programs.

I now recommended to use the Dim As Code (Also named Dim As Flash) because the compiler has control of where the data is stored in Flash memory for more efficiency.

See_Mos

Thanks Les. I'll need to read up on the Dim As Code method.