MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  1


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00001 
                      00002         list      p=17c42             ; list directive to define processor
                      00003         #include <p17c42.inc>         ; processor specific variable definitions
                      00001         LIST
                      00002 ; P17C42.INC  Standard Header File, Version 1.03    Microchip Technology, Inc.
                      00264         LIST
                      00004         #include "pm_defs.inc"
  0000                00001         extern  temp;
  0000                00002         extern  temp1;
                      00003         
  0000                00004         extern  cmmd;
                      00005 
  0000                00006         extern  Addr;
  0000                00007         extern  upr_Addr;
  0000                00008         extern  count;
  0000                00009         extern  MI_Data;
                      00010 
  0000                00011         extern  Dev_type;
  0000                00012         extern  sock_val;
                      00013 
  0000                00014         extern  Vdd_Nom;
  0000                00015         extern  Vdd_Min;
  0000                00016         extern  Vdd_Max;
  0000                00017         extern  Voltage;
  0000                00018         extern  Vpp;
                      00019 
  0000                00020         extern  Fuse_Val;
  0000                00021         extern  Blank_Val;
  0000                00022         extern  vfy_addr;
  0000                00023         extern  vfy_good;
  0000                00024         extern  vfy_val;
  0000                00025         extern  pgm_data;
  0000                00026         extern  read_data;
  0000                00027         extern  csum;
                      00028 ;       extern  cp_val;
  0000                00029         extern  Error_Code;
                      00030 
  0000                00031         extern  try_cnt;
  0000                00032         extern  max_cnt;
  0000                00033         extern  Over_Pgm;
                      00034 
  0000                00035         extern  Xtra_Pulses;
                      00036 
  0000                00037         extern  Mem_Size;
                      00038 
  0000                00039         extern  Fuse_Addr;
  0000                00040         extern  Fuse_Mask;
  0000                00041         extern  CP_Mask;
                      00042 
  0000                00043         extern  ID_Addr;
  0000                00044         extern  ID_Size;
  0000                00045         extern  ID_Mask;
                      00046 
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  2


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

  0000                00047         extern  Data_Addr;
  0000                00048         extern  Data_Size;
                      00049 
  0000                00050         extern  Test_Mem_Addr;
  0000                00051         extern  Test_Mem_Size;
                      00052 
  0000                00053         extern  Range_Addr;
  0000                00054         extern  Range_Size;
                      00055 
  0000                00056         extern  Start;
  0000                00057         extern  count;
                      00058 
  0000                00059         extern  Cal_Addr;
  0000                00060         extern  Cal_Size;
  0000                00061         extern  Cal_op;
                      00062 
  0000                00063         extern Fuse_pgm;
                      00064 
  0000                00065         extern Dstatus;
                      00066 
                      00067 
                      00068 #define Yes_blank       Dstatus,0
                      00069 #define Yes_Cal         Dstatus,7
                      00070 
                      00071 #define IO              PORTB,0
                      00072 
                      00073 #define carry   ALUSTA,C
                      00074 #define zero    ALUSTA,Z
                      00075 
                      00076 #define dat_clk_6x_hi_hi        0x44;
                      00077 #define dat_clk_6x_hi_lo        0x04;
                      00078 #define dat_clk_6x_lo_hi        0x40;
                      00079 #define dat_clk_6x_lo_lo        0x00;
                      00080 
  0000                00081         extern  gp_status;
                      00082 #define is_ICSP gp_status,0
                      00083 
  0000                00084         extern  Dident;
                      00085 #define Has_IDs         Dident,0                ; Indicates current device has ID locations
                      00086 #define Has_Data        Dident,1                ; Indicates current device has Data locations
                      00087 #define Has_Fuses       Dident,2                ; Indicates currrent device has Fuse locations
                      00088 #define yes_ee          Dident,3                ; Indicates current devices is EE type
                      00089 #define yes_datamem     Dident,4                ; Indicates current action is on data memory
                      00090 #define yes_SumID       Dident,5
                      00091 #define yes_ROM         Dident,6
                      00092 #define yes_clr_mem     Dident,7
                      00093 
  0000                00094         extern  Special_action;
                      00095 #define Yes_Send_Count          Special_action,0
                      00096 #define Yes_see_type            Special_action,1
                      00097 #define Yes_Smart_Serial        Special_action,2
                      00098 #define IsSerial12Bit           Special_action,3
                      00099 #define IsHCS36x                Special_action,4
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  3


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00100 #define yes_parity              Special_action,5
                      00101 #define Parity_boo_boo          Special_action,6
                      00102 #define Is_Fast_one             Special_action,7
                      00103 
                      00104 #define Is_mid_range    Special_action,4
                      00105 #define Vpp_is_first    Special_action,2
                      00106 
                      00107 #define Needs_Cal       Special_action,5
                      00108 
  0000                00109         extern  New_Action;
                      00110 
                      00111 #define yes_is_17c75x   New_Action,2
                      00112 #define yes_flash       New_Action,3
                      00113 #define yes_pgm_range   New_Action,4
                      00114 #define ok_2_incr       New_Action,5
                      00115 
                      00116 #define is_promate      New_Action,7
                      00117 
                      00118 
  0000                00119         extern  More_Status;
                      00120 #define Has_Cal         More_Status,0
                      00121 #define Yes_Cal_sums    More_Status,1
                      00122 
                      00123 #define Is93SEE         More_Status,3
                      00124 
                      00125 #define is_150k_2byte_pgm       More_Status,6
                      00126 #define Low_Voltage_pgm         More_Status,7
                      00127 
                      00128 
  0000                00129         extern Even_More_Status;
                      00130 #define use_hi_byte Even_More_Status,1
                      00131 
                      00132 
                      00133 ;These commands are output at 0x9000 data is at 0x8000 for 5x
                      00134 #define pgm_5x_pulse    0x00
                      00135 #define pgm_5x_read     0x00
                      00136 #define pgm_5x_spd_vfy  0x03
                      00137 #define pgm_5x_idle     0x01
                      00138 
                      00139 ; pulse pins and signal levels for 17x family
                      00140 #define pgm_17x_pgm             0x25
                      00141 #define pgm_17x_pgm_noinc       0x27
                      00142 #define pgm_17x_test            0x00
                      00143 #define pgm_17x_vfy             0x23
                      00144 #define pgm_17x_idle            0x21
                      00145 #define pgm_17x_pgm_addr        0x23
                      00146 
  0000                00147         extern Clk_Dat_00
  0000                00148         extern Clk_Dat_01
  0000                00149         extern Clk_Dat_10
  0000                00150         extern Clk_Dat_11
                      00151 
                      00152 #define old_clk_low     Clk_Dat_00
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  4


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00153 #define old_clk_hi      Clk_Dat_01
                      00154 #define old_dat_low     Clk_Dat_10
                      00155 #define old_dat_hi      Clk_Dat_11
                      00156 
                      00157 #define data_6x_high    0x04
                      00158 #define data_6x_low     0x00
                      00159 
  0000                00160         extern  pin_dat_low
                      00161 
                      00162         
  0000                00163         extern  panel_num
  0000                00005         global blank_14x_routine
  0000                00006         extern read_it_6x
                      00007         code
0000                  00008 blank_14x_routine:
                      00009 
0000                  00010 start
0000   B800           00011         movlb   0
0001   8012           00012         bsf     IO
0002   B090           00013         movlw   0x90
0003   010E           00014         movwf   TBLPTRH                 ; point to the pin location
0004   290D           00015         clrf    TBLPTRL,1
0005   29??           00016         clrf    Addr,1                  ; start at zero
0006   29??           00017         clrf    Addr+1,1
                      00018 
0007                  00019 blank_it:
0007   E???           00020         call    read_it_6x
0008   8700           00021         bsf     Yes_Cal
                      00022 
0009   9800           00023     btfsc   Has_Cal
000A   C???           00024     goto    check_cal_val
                      00025 
000B                  00026 not_cal:
000B   6A??           00027         movfp   Blank_Val,WREG
000C   31??           00028         cpfseq  MI_Data
000D   8800           00029         bcf     Yes_blank
000E   6A??           00030         movfp   Blank_Val+1,WREG
000F   31??           00031         cpfseq  MI_Data+1
0010   8800           00032         bcf     Yes_blank
                      00033 
0011   9D00           00034     btfsc   ok_2_incr
0012   C???           00035     goto    now_incr            ; we must check every location if the device has cal memory
                      00036 
0013   9000           00037         btfss   Yes_blank
0014   0002           00038         return
                      00039 
0015                  00040 now_incr:
                      00041 
0015   25??           00042         infsnz  Addr,1
0016   15??           00043         incf    Addr+1,1
                      00044 
0017   6A??           00045         movfp   Mem_Size,WREG
0018   31??           00046         cpfseq  Addr
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  5


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

0019   C???           00047         goto    next_addr
001A   6A??           00048         movfp   Mem_Size+1,WREG
001B   31??           00049         cpfseq  Addr+1
001C   C???           00050         goto    next_addr
                      00051 
001D   9F00           00052         btfsc   Yes_Cal
001E   0002           00053         return
                      00054 
001F   33??           00055         tstfsz  csum
0020   8800           00056         bcf     Yes_blank
0021   33??           00057         tstfsz  csum+1
0022   8800           00058         bcf     Yes_blank
                      00059 
0023   0002           00060         return
                      00061 
0024                  00062 check_cal_val:
0024   6A??           00063         movfp   Cal_Addr+1,WREG
0025   30??           00064         cpfslt  Addr+1
0026   C???           00065     goto    chk_cal_lo
0027   C???           00066     goto    not_cal
                      00067 
0028                  00068 chk_cal_lo:
0028   6A??           00069         movfp   Cal_Addr,WREG
0029   30??           00070         cpfslt  Addr
002A   C???           00071     goto    chk_cal
002B   C???           00072     goto    not_cal
                      00073 
002C                  00074 chk_cal:
002C   6A??           00075         movfp   Blank_Val,WREG
002D   31??           00076         cpfseq  MI_Data
002E   8F00           00077         bcf     Yes_Cal             ;Since the opcode is the cal_op then don't program the cal value.
002F   6A??           00078         movfp   Blank_Val+1,WREG
0030   31??           00079         cpfseq  MI_Data+1
0031   8F00           00080         bcf     Yes_Cal             ;Since the opcode is the cal_op then don't program the cal value.
                      00081 
0032   6A??           00082         movfp   MI_Data,WREG
0033   0F??           00083         addwf   csum,1
0034   6A??           00084         movfp   MI_Data+1,WREG
0035   11??           00085         addwfc  csum+1,1
                      00086 
0036   C???           00087         goto    now_incr
                      00088 
                      00089 
0037                  00090 next_addr:
                      00091 
0037   8012           00092         bsf     IO
                      00093 
0038   9F00           00094         btfsc   is_promate
0039   C???           00095         goto    old_next_addr
                      00096 
                      00097                                 ; Send incr Addr command 000110 LSB first
                      00098 
003A   AC??           00099         tablwt  0,0,Clk_Dat_10  ;clock a 0
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  6


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

003B   AC??           00100         tablwt  0,0,Clk_Dat_00
                      00101 
003C   AC??           00102         tablwt  0,0,Clk_Dat_11  ;clock a 1
003D   AC??           00103         tablwt  0,0,Clk_Dat_01
                      00104 
003E   AC??           00105         tablwt  0,0,Clk_Dat_11  ;clock a 1
003F   AC??           00106         tablwt  0,0,Clk_Dat_01
                      00107 
                      00108 
0040   AC??           00109         tablwt  0,0,Clk_Dat_10  ;clock a 0
0041   AC??           00110         tablwt  0,0,Clk_Dat_00
                      00111 
0042   AC??           00112         tablwt  0,0,Clk_Dat_10  ;clock a 0
0043   AC??           00113         tablwt  0,0,Clk_Dat_00
                      00114 
0044   AC??           00115         tablwt  0,0,Clk_Dat_10  ;clock a 0
0045   AC??           00116         tablwt  0,0,Clk_Dat_00
                      00117 
0046   C???           00118         goto    blank_it
                      00119 
                      00120 
0047                  00121 old_next_addr:
                      00122 
0047   B090           00123         movlw   0x90
0048   010E           00124         movwf   TBLPTRH
0049   AC??           00125         tablwt  0,0,old_dat_low ;clock a 0
                      00126 
004A   B0A0           00127         movlw   0xA0
004B   010E           00128         movwf   TBLPTRH
004C   AE??           00129         tablwt  1,0,old_clk_hi  ;clock it
004D   AE??           00130         tablwt  1,0,old_clk_low
                      00131 
004E   B090           00132         movlw   0x90
004F   010E           00133         movwf   TBLPTRH
0050   AC??           00134         tablwt  0,0,old_dat_hi  ;clock a 1
                      00135 
0051   B0A0           00136         movlw   0xA0
0052   010E           00137         movwf   TBLPTRH
0053   AE??           00138         tablwt  1,0,old_clk_hi  ;clock it
0054   AE??           00139         tablwt  1,0,old_clk_low
                      00140 
0055   AE??           00141         tablwt  1,0,old_clk_hi  ;clock it
0056   AE??           00142         tablwt  1,0,old_clk_low
                      00143 
0057   B090           00144         movlw   0x90
0058   010E           00145         movwf   TBLPTRH
0059   AC??           00146         tablwt  0,0,old_dat_low ;clock a 0
                      00147 
005A   B0A0           00148         movlw   0xA0
005B   010E           00149         movwf   TBLPTRH
005C   AE??           00150         tablwt  1,0,old_clk_hi  ;clock it
005D   AE??           00151         tablwt  1,0,old_clk_low
                      00152 
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  7


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

005E   AE??           00153         tablwt  1,0,old_clk_hi  ;clock it
005F   AE??           00154         tablwt  1,0,old_clk_low
                      00155 
0060   AE??           00156         tablwt  1,0,old_clk_hi  ;clock it
0061   AE??           00157         tablwt  1,0,old_clk_low
                      00158 
0062   C???           00159         goto    blank_it
                      00160 
                      00161         end
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  8


SYMBOL TABLE
  LABEL                             VALUE 

ALUSTA                            00000004
Addr                              00000000
BANK0                             00000000
BANK1                             00000001
BANK2                             00000002
BANK3                             00000003
BSR                               0000000F
Blank_Val                         00000000
C                                 00000000
CA1                               00000003
CA1ED0                            00000004
CA1ED1                            00000005
CA1H                              00000217
CA1IE                             00000002
CA1IF                             00000002
CA1L                              00000216
CA1OVF                            00000006
CA1_PR3                           00000003
CA2ED0                            00000006
CA2ED1                            00000007
CA2H                              00000315
CA2IE                             00000003
CA2IF                             00000003
CA2L                              00000314
CA2OVF                            00000007
CPUSTA                            00000006
CP_Mask                           00000000
CREN                              00000004
CSRC                              00000007
Cal_Addr                          00000000
Cal_Size                          00000000
Cal_op                            00000000
Clk_Dat_00                        00000000
Clk_Dat_01                        00000000
Clk_Dat_10                        00000000
Clk_Dat_11                        00000000
DC                                00000001
DDRB                              00000011
DDRC                              00000110
DDRD                              00000112
DDRE                              00000114
Data_Addr                         00000000
Data_Size                         00000000
Dev_type                          00000000
Dident                            00000000
Dstatus                           00000000
Error_Code                        00000000
Even_More_Status                  00000000
F                                 00000001
FERR                              00000002
FS0                               00000004
FS1                               00000005
FS2                               00000006
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE  9


SYMBOL TABLE
  LABEL                             VALUE 

FS3                               00000007
FSR0                              00000001
FSR1                              00000009
Fuse_Addr                         00000000
Fuse_Mask                         00000000
Fuse_Val                          00000000
Fuse_pgm                          00000000
GLINTD                            00000004
Has_Cal                           More_Status,0
Has_Data                          Dident,1
Has_Fuses                         Dident,2
Has_IDs                           Dident,0
ID_Addr                           00000000
ID_Mask                           00000000
ID_Size                           00000000
INDF0                             00000000
INDF1                             00000008
INT                               00000000
INTE                              00000000
INTEDG                            00000007
INTF                              00000004
INTSTA                            00000007
IO                                PORTB,0
Is93SEE                           More_Status,3
IsHCS36x                          Special_action,4
IsSerial12Bit                     Special_action,3
Is_Fast_one                       Special_action,7
Is_mid_range                      Special_action,4
Low_Voltage_pgm                   More_Status,7
MI_Data                           00000000
Mem_Size                          00000000
More_Status                       00000000
NOT_PD                            00000002
NOT_PR3                           00000003
NOT_RBPU                          00000007
NOT_RC8                           00000006
NOT_TO                            00000003
NOT_TX8                           00000006
Needs_Cal                         Special_action,5
New_Action                        00000000
OERR                              00000001
OV                                00000003
Over_Pgm                          00000000
PCL                               00000002
PCLATH                            00000003
PEIE                              00000003
PEIF                              00000007
PIE                               00000117
PIR                               00000116
PORTA                             00000010
PORTB                             00000012
PORTC                             00000111
PORTD                             00000113
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE 10


SYMBOL TABLE
  LABEL                             VALUE 

PORTE                             00000115
PR1                               00000214
PR2                               00000215
PR3H                              00000217
PR3L                              00000216
PRODH                             00000019
PRODL                             00000018
PS0                               00000001
PS1                               00000002
PS2                               00000003
PS3                               00000004
PW1DCH                            00000312
PW1DCL                            00000310
PW2DCH                            00000313
PW2DCL                            00000311
PWM1ON                            00000004
PWM2ON                            00000005
Parity_boo_boo                    Special_action,6
RBIE                              00000007
RBIF                              00000007
RC8_9                             00000006
RC9                               00000006
RCD8                              00000000
RCIE                              00000000
RCIF                              00000000
RCREG                             00000014
RCSTA                             00000013
RX9                               00000006
RX9D                              00000000
Range_Addr                        00000000
Range_Size                        00000000
SPBRG                             00000017
SPEN                              00000007
SREN                              00000005
STKAV                             00000005
SYNC                              00000004
Special_action                    00000000
Start                             00000000
T0CKI                             00000001
T0CKIE                            00000002
T0CKIF                            00000006
T0CS                              00000005
T0IE                              00000001
T0IF                              00000005
T0PS0                             00000001
T0PS1                             00000002
T0PS2                             00000003
T0PS3                             00000004
T0SE                              00000006
T0STA                             00000005
T16                               00000003
TBLPTRH                           0000000E
TBLPTRL                           0000000D
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE 11


SYMBOL TABLE
  LABEL                             VALUE 

TCON1                             00000316
TCON2                             00000317
TMR0H                             0000000C
TMR0L                             0000000B
TMR1                              00000210
TMR1CS                            00000000
TMR1IE                            00000004
TMR1IF                            00000004
TMR1ON                            00000000
TMR2                              00000211
TMR2CS                            00000001
TMR2IE                            00000005
TMR2IF                            00000005
TMR2ON                            00000001
TMR3CS                            00000002
TMR3H                             00000213
TMR3IE                            00000006
TMR3IF                            00000006
TMR3L                             00000212
TMR3ON                            00000002
TRMT                              00000001
TX8_9                             00000006
TX9                               00000006
TX9D                              00000000
TXD8                              00000000
TXEN                              00000005
TXIE                              00000001
TXIF                              00000001
TXREG                             00000016
TXSTA                             00000015
Test_Mem_Addr                     00000000
Test_Mem_Size                     00000000
Vdd_Max                           00000000
Vdd_Min                           00000000
Vdd_Nom                           00000000
Voltage                           00000000
Vpp                               00000000
Vpp_is_first                      Special_action,2
W                                 00000000
WREG                              0000000A
Xtra_Pulses                       00000000
Yes_Cal                           Dstatus,7
Yes_Cal_sums                      More_Status,1
Yes_Send_Count                    Special_action,0
Yes_Smart_Serial                  Special_action,2
Yes_blank                         Dstatus,0
Yes_see_type                      Special_action,1
Z                                 00000002
_EC_OSC                           0000FFFF
_LF_OSC                           0000FFFC
_MC_MODE                          0000FFEF
_MP_MODE                          0000FFFF
_PMC_MODE                         0000FFAF
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE 12


SYMBOL TABLE
  LABEL                             VALUE 

_RC_OSC                           0000FFFD
_WDT_1                            0000FFFF
_WDT_256                          0000FFFB
_WDT_64                           0000FFF7
_WDT_NORM                         0000FFF3
_WDT_OFF                          0000FFF3
_XMC_MODE                         0000FFBF
_XT_OSC                           0000FFFE
__17C42                           00000001
blank_14x_routine                 00000000
blank_it                          00000007
carry                             ALUSTA,C
check_cal_val                     00000024
chk_cal                           0000002C
chk_cal_lo                        00000028
cmmd                              00000000
count                             00000000
csum                              00000000
dat_clk_6x_hi_hi                  0x44
dat_clk_6x_hi_lo                  0x04
dat_clk_6x_lo_hi                  0x40
dat_clk_6x_lo_lo                  0x00
data_6x_high                      0x04
data_6x_low                       0x00
gp_status                         00000000
is_150k_2byte_pgm                 More_Status,6
is_ICSP                           gp_status,0
is_promate                        New_Action,7
max_cnt                           00000000
next_addr                         00000037
not_cal                           0000000B
now_incr                          00000015
ok_2_incr                         New_Action,5
old_clk_hi                        Clk_Dat_01
old_clk_low                       Clk_Dat_00
old_dat_hi                        Clk_Dat_11
old_dat_low                       Clk_Dat_10
old_next_addr                     00000047
panel_num                         00000000
pgm_17x_idle                      0x21
pgm_17x_pgm                       0x25
pgm_17x_pgm_addr                  0x23
pgm_17x_pgm_noinc                 0x27
pgm_17x_test                      0x00
pgm_17x_vfy                       0x23
pgm_5x_idle                       0x01
pgm_5x_pulse                      0x00
pgm_5x_read                       0x00
pgm_5x_spd_vfy                    0x03
pgm_data                          00000000
pin_dat_low                       00000000
read_data                         00000000
read_it_6x                        00000000
MPASM 02.80.08 Intermediate  14X_BLNK.ASM   10-26-2001  14:35:45         PAGE 13


SYMBOL TABLE
  LABEL                             VALUE 

sock_val                          00000000
start                             00000000
temp                              00000000
temp1                             00000000
try_cnt                           00000000
upr_Addr                          00000000
use_hi_byte                       Even_More_Status,1
vfy_addr                          00000000
vfy_good                          00000000
vfy_val                           00000000
yes_ROM                           Dident,6
yes_SumID                         Dident,5
yes_clr_mem                       Dident,7
yes_datamem                       Dident,4
yes_ee                            Dident,3
yes_flash                         New_Action,3
yes_is_17c75x                     New_Action,2
yes_parity                        Special_action,5
yes_pgm_range                     New_Action,4
zero                              ALUSTA,Z

Errors   :     0
Warnings :     0 reported,     0 suppressed
Messages :     0 reported,     0 suppressed

