Logo Search packages:      
Sourcecode: odyssey version File versions

void Pic18Device::program_wait ( void   )  [protected, virtual]

Does a custom NOP/program wait. This will output COMMAND_CORE_INSTRUCTION, hold clk high for the programming time, and then finish up by clocking out a nop instruction (16 0's).

Definition at line 485 of file Pic18Device.cxx.

References Device::io, PicDevice::program_time, IO::set_clk(), IO::set_data(), IO::shift_bits_out(), and IO::usleep().

Referenced by write_config_memory(), write_id_memory(), and write_program_memory().

                                   {
      this->io->shift_bits_out(0x00, 3);
      this->io->set_data(false);
      this->io->set_clk(true);      /* Hold clk high */

      this->io->usleep(program_time);

      this->io->set_clk(false);
      this->io->usleep(5);    /* High-voltage discharge time */
      this->io->shift_bits_out(0x0000, 16);/* 16-bit payload (NOP) */
}


Generated by  Doxygen 1.6.0   Back to index