T
treez
Guest
Hello,
Do you know why my Pickit2 will not program the PIC12F675 that I have in-circuit? I get the following error message from MPLAB X....
The Pickit2 application tells me that "Pickit2 found and connected"
Also, when I run the program, it doesn't work, even though the pickit2 application tells me "programming successful"
I am using MPLAB X IDE V2.10 and the pickit2 software is v2.55.02
By the way, here is the MPASM code....it simply flashes a led on and off until a pushbutton switch is pressed....if the switch is pressed again it goes back to flashing the led, etc etc...
Do you know why my Pickit2 will not program the PIC12F675 that I have in-circuit? I get the following error message from MPLAB X....
BUILD SUCCESSFUL (total time: 344ms)
Loading code from C:/MPASM/LED Flasher.X/dist/default/production/LED_Flasher.X.production.hex...
Loading completed
Connecting to programmer...
The programmer could not be started: Could not connect to tool hardware: PICkit2PlatformTool, com.microchip.mplab.mdbcore.pickit2.PICkit2DbgToolManager
The Pickit2 application tells me that "Pickit2 found and connected"
Also, when I run the program, it doesn't work, even though the pickit2 application tells me "programming successful"
I am using MPLAB X IDE V2.10 and the pickit2 software is v2.55.02
By the way, here is the MPASM code....it simply flashes a led on and off until a pushbutton switch is pressed....if the switch is pressed again it goes back to flashing the led, etc etc...
list p=12f675 ;list directive to define processor
#include <p12f675.inc> ;processor specific definitions
__config (_INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _BODEN_OFF & _CPD_OFF)
; define variables (general memory starts at 0x20)
count equ 20h ; number of millisecond delays
count1 equ 21h ; number of NOP delays
press equ 22h ;Holds flag telling whether or not pressed
; *** DECLARE MACRO'S ***
BANK0 macro
bcf STATUS,RP0
endm
BANK1 macro
bsf STATUS,RP0
endm
;************************
org 0
goto Start
Start:
BANK1
CLRF ANSEL ;Digital I/O
movlw 28h ;GP5=switch;GP4=LED
movwf TRISIO
bcf VRCON,VREN ;disable comparator ref
BANK0
;Disable interrupts as i don't want to use them
bcf INTCON,GIE
bcf PIR1,ADIF
CLRF GPIO ;Init GPIO
MOVLW 07h ;Set GP<2:0> to
MOVWF CMCON ;digital IO
clrf count
clrf count1
clrf press
;**************************
led_off:
call delay
call delay
bcf GPIO,GP4
led_off_1:
btfss GPIO,GP5
goto flash
goto led_off_1
;**************************
;**************************
flash:
call delay
call delay
call delay
flash_1:
;Flash the LED ON and OFF
bsf GPIO, GP4
call delay_flash
bcf GPIO, GP4
call delay_flash
goto flash_1
;**************************
;*****************************
delay_flash:
movlw 0xFF
movwf count
here:
movlw 0xFF
movwf count1
here1:
btfss GPIO,GP5
goto led_off
decfsz count1,1
goto here1
decfsz count,1
goto here
retlw 0x00
;******************************
;******************************
delay:
movlw 0xFF
movwf count
there:
movlw 0xFF
movwf count1
there1:
decfsz count1,1
goto here1
decfsz count,1
goto here
retlw 0x00
;******************************
end;