No. Surely I didn't mean that. You can't do the programming with those lines commented out. What I mean is somewhere 10+ lines after the label 'Main'. If I remember correctly, I saw in earlier version source it's not commented out. Best regards, WH Tan -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Chen Xiao Fan Sent: 14 July 2005 17:22 To: 'Microcontroller discussion list - Public.' Subject: RE: [PIC] PICKIT 2 (was PICKit1 & PIC18F2550) I am using version 2.02 firmware for the PICkit 1 but I do not see that VppON and VppOff being commented out. Attached is the firmware source code that I have. Regards, Xiaofan Version 2.02 download from Microchip: ;*************************************************************************** *** ; EnterProgramMode ; Issues Enter Program Mode command to PIC12F629/675. Clears ProgramCntr. ; Inputs: none ; Outputs: none ;*************************************************************************** *** EnterProgramMode call VppInit ; Initiate Vpp PWM call VppOff ; Turn Vpp off call VppHigh ; Set Vpp to 13v (when it's turned on) bcf PORTC,ICSPDATA ; make both clock and data outputs bcf PORTC,ICSPCLOCK bsf STATUS,RP0 bcf TRISC,ICSPDATA ; make both clock and data outputs bcf TRISC,ICSPCLOCK bcf STATUS,RP0 movlw 0x3F ; force clock and data pin low andwf PORTC,f call Delay2_5ms ; delay call Delay2_5ms clrf ProgramCntr clrf ProgramCntr+1 decfsz ProgramCntr,f ; wait 65536x3 instructions (~160ms) goto $-1 decfsz ProgramCntr+1,f goto $-3 call VppOn ; Turn Vpp on decfsz ProgramCntr,f ; wait 256x3 instructions (~128us) goto $-1 ; ProgramCntr is clear upon leaving function call VddOn ; turn on Vdd decfsz ProgramCntr,f ; wait 65536x3 instructions (~160ms) goto $-1 decfsz ProgramCntr+1,f goto $-3 return Version 1.0 from Microchip: ;*************************************************************************** *** ; EnterProgramMode ; Issues Enter Program Mode command to PIC12F629/675. Clears ProgramCntr. ; Inputs: none ; Outputs: none ;*************************************************************************** *** EnterProgramMode bsf STATUS,RP0 movlw 0x02 movwf TRISC ; RC1 is input; RC0,RC2-RC7 are outputs bcf STATUS,RP0 movlw .85 ; Clear ProgramCntr (see later in function) movwf ProgramCntr clrf ProgramCntr+1 movlw 0x3F ; force clock and data pin low andwf PORTC,f call Delay ; 4 ms delay call Delay call VppOn ; turn on Vpp decfsz ProgramCntr ; wait 85x3 instructions (~40us) goto $-1 ; ProgramCntr is clear upon leaving function call VddOn ; turn on Vdd return -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist