Perform a single program cycle for program memory. The following steps are performed:
- The data is written to the PIC with write_prog_data().
- The BEGIN_PROG command is sent.
- A delay of program_time is initiated.
- If the PIC requires it, the END_PROG command is sent.
- A readback is performed and is compared with the original data.
|data ||The data word to program into program memory at the PIC's program counter. |
|mask ||A mask which is used when verifying the data. The read back data and the data parameter are both masked with this mask before being compared. This is required for properly verifying the configuration word. |
- A boolean value indicating if the data read back matches the data parameter.
Definition at line 131 of file PicDevice.cxx.
References COMMAND_BEGIN_PROG, COMMAND_END_PROG, flags, Device::io, PIC_REQUIRE_EPROG, program_time, read_prog_data(), IO::usleep(), write_command(), and write_prog_data().
Referenced by Pic16Device::program_one_location(), and Pic16Device::write_config_word().