A const
-qualified object cannot be made larger than the
available device memory size, but there can be other restrictions as to how large each
object can be.
For Baseline PIC devices, the maximum size of a single
const
object is 255 bytes. However, you can define as many
const
objects as required provided the total size does not exceed the
available program memory size of the device.
For all other 8-bit devices, the maximum size of a
const
-qualified object is limited mainly by the available program memory,
however for PIC18 devices, program memory from address 0 up to an address equal to the
highest data memory address is typically not used to hold this data.
Note that in addition to the data itself, there is also a small amount of
code required to access data in program memory. This additional code is included only once,
regardless of the amount or number of const
-qualified objects.