; Headerfile for the progger project ; ------------------------------------------------------ ; Revision history: ; ------------------------------------------------------ ; $Log: progger.h,v $ ; Revision 1.4 2002/02/25 12:07:49 hollevo ; Adapted code to new PCB ; ; Revision 1.3 2002/01/10 13:48:03 hollevo ; Added recv_ptr ; ; Revision 1.2 2002/01/02 13:12:53 hollevo ; Changed serDelay, added extra flag bit ; ; Revision 1.1.1.1 2001/11/29 15:36:28 hollevo ; Initial import ; ; ------------------------------------------------------ ; -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ; definitions ; -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ; *** PINS *** #DEFINE RxD 0x00 ; serial input on serPort #DEFINE TxD 0x01 ; serial output on serPort #DEFINE MCLR 0x00 ; MCLR on picport #DEFINE PGM 0x01 ; PGM on picport #DEFINE DTA 0x03 ; P_DTA on picport #DEFINE CLK 0x02 ; P_CLK on picport ; *** MACROS *** #DEFINE bank0 bcf STATUS, RP0 #DEFINE bank1 bsf STATUS, RP0 ; *** CONSTANTS *** #DEFINE serDelay d'31' #DEFINE serHalfDelay serDelay/2 #DEFINE recv_ptr 0x30 ; pointer to memory where serial receive will store data ; *** REGISTERS *** ; used by loads of routines flags EQU 0x0F ; flags, 0 == 1 -> error in received byte from serial port ; flags, 1 == 1 -> prog_device, PM ; flags, 2 == 1 -> there's plenty more where that came from (read_hex) ; used by serial routines Locatie EQU 0x10 LoopCount EQU 0x11 TmrVal EQU 0x12 TxChar EQU 0x13 RxChar EQU 0x14 sDelayReg EQU 0x15 rDelayReg EQU 0x16 sCounter EQU 0x17 rCounter EQU 0x18 ; used by the isr W_Temp EQU 0x19 Status_Temp EQU 0x1A ; used by the progger pCounter EQU 0x1B lDreg EQU 0x1C hDreg EQU 0x1D lCreg EQU 0x1E dly10cntr EQU 0x1F iCounter EQU 0x20 ; used by the HEX conv routine htemp EQU 0x21 htemp2 EQU 0x22 ; used by the receive data routine size EQU 0x23 ; FIXED LOCATION! pointer value used in code ptr EQU 0x24 dsize EQU 0x25 dptr EQU 0x26 ; Used by the read routine haddr EQU 0x27 ; FIXED laddr EQU 0x28 ; FIXED haddrc EQU 0x29 laddrc EQU 0x2A pCRC EQU 0x2B pSize EQU 0x2C ; Number of bytes to be programmed pHpc EQU 0x2D ; high byte of DUP program counter pLpc EQU 0x2E ; low byte of DUP program counter ; *** COMMANDS *** ld_cfg EQU 0x00 ; Load configuration ld_pm EQU 0x02 ; Load data for program memory rd_pm EQU 0x04 ; Read data from program memory inc_addr EQU 0x06 ; Increment address counter e_pgm EQU 0x08 pgm EQU 0x18 ld_dm EQU 0x03 rd_dm EQU 0x05 erase_pm EQU 0x09 erase_dm EQU 0x0B