pic_data_hef

Reading/writing of PIC's data in High Endurance Flash (HEF)

Author Rob Jansen, Copyright © 2020..2020, all rights reserved.
Adapted-by
Compiler 2.5r4

Description

Read from or write to HEF/data a byte, word or double word.
Available procedures:
  * data_hef_read(,)
  * data_hef_write(,)
  * data_hef_read_word(,)
  * data_hef_write_word(,)
  * data_hef_read_dword(,)
  * data_hef_write_dword(,)
Available functions:
  *   = data_hef()
  *   = data_hef_word()
  *  = data_hef_dword()
In all cases  must be in the range of the High Endurance Flash
Examples of use:
  * Read a byte of HEF at offset 7 into x:
        var byte x
        data_hef_read(7, x)
  * Read a word from HEF at offset 4 into y:
        var word y
        y = data_hef_word(4)
  * Write a byte to HEF at offset 18:
        data_hef_write(18, 0b1111_0000)


Sources

AN1673. Using the PIC16F1XXX High-Endurance Flash (HEF) Block.


Notes

* You must always define the HEF offset address (start address of the HEF)
  by definining a connstant called HEF_ADDRESS_OFFSET with the correct value.
  See the datasheet of the PICs for more information. 
* Write-protect bits in configuration memory may prohibit writing.
* Writing to locations outside the available memory range may have
  unexpected effects!


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Private

Functions

Private

API details

Global variables/contants

Procedures

Private

Functions

Private

Related samples

Here are the list of samples which use this library:

16f145516f1455_data_hef.jal
16f150316f1503_data_hef.jal
16f150716f1507_data_hef.jal
16f150816f1508_data_hef.jal
16f176516f1765_data_hef.jal