Logo Search packages:      
Sourcecode: odyssey version File versions

Pic18Device Class Reference

#include <PicDevice.h>

Inheritance diagram for Pic18Device:

PicDevice Device

List of all members.


Detailed Description

A class which implements the programming algorithm PIC18* devices. The PIC18* devices are different in many ways: * Programming/reading is done in bytes. * Much larger internal address space * Programming is accomplished by executing single instructions on the PIC core. * Programming can be done 32 bytes at a time. * Data EEPROM, configuration words, and ID locations are at different addresses than the PIC16* devices. * There are multiple configuration words. This class will provide a base class for devices of this type.

Definition at line 454 of file PicDevice.h.


Public Types

enum  pic_memtype_t { MEMTYPE_EPROM = 0, MEMTYPE_FLASH }

Public Member Functions

virtual void erase (void)
IntPairVectorget_mmap (void)
string get_name (void)
int get_wordsize (void)
 Pic18Device (char *name)
virtual void program (DataBuffer &buf)
virtual void read (DataBuffer &buf, bool verify=false)
void set_iodevice (IO *iodev)
void set_progress_cb (bool(*cb)(void *data, long addr, int percent), void *data=NULL)
virtual ~Pic18Device ()

Static Public Member Functions

static vector< string > * list (void)
static void list (vector< string > *v)
static Deviceload (char *name)

Static Public Attributes

static const int COMMAND_BEGIN_PROG = 0x08
static const int COMMAND_CORE_INSTRUCTION = 0x00
static const int COMMAND_END_PROG = 0x0e
static const int COMMAND_ERASE_DATA_MEM = 0x0b
static const int COMMAND_ERASE_PROG_MEM = 0x09
static const int COMMAND_INC_ADDRESS = 0x06
static const int COMMAND_LOAD_CONFIG = 0x00
static const int COMMAND_LOAD_DATA_DATA = 0x03
static const int COMMAND_LOAD_PROG_DATA = 0x02
static const int COMMAND_READ_DATA_DATA = 0x05
static const int COMMAND_READ_PROG_DATA = 0x04
static const int COMMAND_SHIFT_OUT_TABLAT = 0x02
static const int COMMAND_TABLE_READ = 0x08
static const int COMMAND_TABLE_READ_POSTDEC = 0x0a
static const int COMMAND_TABLE_READ_POSTINC = 0x09
static const int COMMAND_TABLE_READ_PREINC = 0x0b
static const int COMMAND_TABLE_WRITE = 0x0c
static const int COMMAND_TABLE_WRITE_POSTDEC = 0x0e
static const int COMMAND_TABLE_WRITE_POSTINC = 0x0d
static const int COMMAND_TABLE_WRITE_START = 0x0f

Protected Member Functions

virtual void load_write_buffer (DataBuffer &buf, unsigned int panel, unsigned int offset, bool last)
virtual void pic_off (void)
virtual bool program_cycle (uint32_t data, uint32_t mask=0xffffffff)
virtual void program_wait (void)
bool progress (unsigned long addr)
virtual void read_config_memory (DataBuffer &buf, unsigned long addr, unsigned long len, bool verify)
virtual void read_data_memory (DataBuffer &buf, unsigned long addr, bool verify)
virtual void read_memory (DataBuffer &buf, unsigned long addr, unsigned long len, bool verify)
virtual uint32_t read_prog_data (void)
virtual void set_program_mode (void)
virtual void set_tblptr (unsigned long addr)
virtual void write_command (uint32_t command)
virtual void write_command (unsigned int command, unsigned int data)
virtual void write_command (unsigned int command)
virtual unsigned int write_command_read_data (unsigned int command)
virtual void write_config_memory (DataBuffer &buf, unsigned long addr, bool verify)
virtual void write_data_memory (DataBuffer &buf, unsigned long addr, bool verify)
virtual void write_id_memory (DataBuffer &buf, unsigned long addr, bool verify)
virtual void write_prog_data (uint32_t data)
virtual void write_program_memory (DataBuffer &buf, bool verify)

Protected Attributes

unsigned int codesize
unsigned int config_masks [7]
unsigned int eesize
unsigned int erase_time
uint32_t flags
IOio
IntPairVector memmap
pic_memtype_t memtype
string name
unsigned int program_count
unsigned int program_multiplier
unsigned int program_time
bool(* progress_cb )(void *data, long addr, int percent)
void * progress_cb_data
unsigned long progress_count
unsigned long progress_total
uint32_t wordmask
int wordsize

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index