PDA

View Full Version : PicKit1



MattK
- 2nd March 2007, 21:28
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

mister_e
- 2nd March 2007, 23:30
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


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

MattK
- 3rd March 2007, 08:10
Thank you, that does it!

MattK
- 3rd March 2007, 08:17
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

malc-c
- 3rd March 2007, 09:26
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.