-
PicKit1
Hi, I seriously need some help, I have given up trying to learn assembler and now trying picbasic but...
I have a PICkit1 flash starter kit, and am using PBP. All I am trying to do is flash any of the eight LED's on. I have copied a program from the manual and tried to adapt it but it just isn't working. I have ran the sample program to test the chip, so I know it is not broken.
DEVICE = 12F675
XTAL = 4
TRISa = %11001111
loop: High porta.4
low porta.5
Pause 500
Low porta.4
high porta.5
Pause 500
Goto loop
I am obviously lame at this but if anyone can get me started I would be really appreciative.
Matt
-
- and nope you're not using PBP, it's PDS proton
- this device have no PORTa
This device have some multiplexed stuff on almost all pin which have to be disabled first (ADCs and analog comparator)
- you have to set the configuration fuses somewhere in your code. if my memory serves me well, PicKit 1 don't allow to change them on the fly.
now try
Code:
Device = 12F675
' Device programming mode and hardware definition
' ===============================================
' Using Internal Clock, no clock out
' Disable Watch dog timer
' Disable MCLR pin
' Enable Power-up timer
' Enable Brown-out detect
'
Config INTRC_OSC_NOCLKOUT,_
WDT_OFF,_
MCLRE_OFF,_
PWRTE_ON,_
BODEN_ON
'
'
TRISIO = 0
CMCON=7 ' Disable analog comparator
ANSEL=0 ' Disable analog converter
Start:
High GPIO.5
High GPIO.4
DelayMS 500
Low GPIO.4
Low GPIO.5
DelayMS 500
GoTo Start
The right forum for you will be
www.picbasic.org/forum
-
Thats it!
-
at last
Thanks for your time, it has taken so long to even get a blinking LED to flash.
I will try the other forum. At least I can use this as a template to experiment with now.
Regards
MattK
-
The other thing to watch with the PicKIT1 is the way the 8 LEDs are wired to the evaluation socket, so sometimes you expect just one LED to light and you find two light.