Log in

View Full Version : PICkit2 Starter pack demo



grahamr
- 18th October 2011, 22:35
Hello,

I've just bought a PICkit2 Starter pack and am struggling to even get the demo to run on Windows 7. Driving me mad.

I follow the instructions and it won't compile. I try the advice below, update MicroCodeStudio, tell to use MPASM as the assembler but still it doesn't compile.

http://www.picbasic.co.uk/forum/showthread.php?t=14701

I know nothing, this was my first step to learning about PICs and I'm stuck at it seemingly due to Windows versions. Can anyone help!

Yours desperately,

Graham

HenrikOlsson
- 19th October 2011, 06:08
Hi,
Which example/demo are you talking about?
If it are the ones included with the PICKIt2 Starter pack I'm pretty sure they are not written in PBP and can therefor not be compiled with PBP. If it indeed is PBP code you're trying to compile please post the code and the error message(s) you get when compiling.

What version of PBP do you have?

Please give us some more details and I'm sure we can figure out what's going on.

grahamr
- 19th October 2011, 19:09
Hi, thanks for the reply,

I'm trying to run the quick start steps under the link on the PICkit 2 CD "Click here for Quick Start in BASIC with the PICBASIC PRO Demo Compiler"


I was following these instructions:

"PICBASIC PRO Quick Start
PICkit™ 2 Starter Kit

Get started programming in BASIC with a demonstration version of the
microEngineering Labs, Inc. PICBASIC PRO Compiler for Microchip PIC® MCUs.
This demo version supports a limited number of instructions on a limited set of
devices, including the Starter Kit’s PIC16F690.


Install MPLAB® IDE using the included installation disc.
(Use the default install options. Skip if already installed)
Install the PICBASIC PRO Compiler Demo
Install PICkit™ 2 Lessons for the Low Pin Count Demo Board
Included with the Lessons is a BASIC project used in the Getting Started Guide.
See the Getting Started with PICBASIC PRO guide to complete PICBASIC PRO
setup with the MPLAB IDE, create a BASIC language project in MPLAB,
compile demonstration code, and program it using the Low Pin Count
Demo Board."
I get to the part where I compile the file "pk2_tutorial.bas" and I get the error:

"Executing: "C:\PBPDEMO\PBPWDEMO.EXE" -ampasmwin -oq -z -p16F690 "pk2_tutorial.bas"
PICBASIC PRO(TM) Compiler Demo, (c) 1998, 2007 microEngineering Labs, Inc.
All Rights Reserved.
For more information, including purchase info, for this product,
visit melabs.com or call microEngineering Labs, Inc. at 719-520-5323.

ERROR: Unable to execute mpasmwin.Halting build on first failure as requested.
BUILD FAILED: Wed Oct 19 19:03:37 2011
"

Does this help?

Alternatively, I have just found the "SK Getting Started in MPLAB" pdf, and the associated MPLAB lessons, so I might be able to proceed with this instead.

Thanks again,

Graham

HenrikOlsson
- 20th October 2011, 07:13
Hi Graham,
Well, it helps in the way that I now know that a PBP example IS included in the PK2 LPC-board example files. I managed to find the Eample files/Starter kit lessons (http://ww1.microchip.com/downloads/en/DeviceDoc/Pk2-Starter%20Kit%20Lessons%20(b).zip) including the PBP source file you mention but the Quick Start step you mention.

I don't have a PK2, I don't have a LPC-board and I don't use MPLAB so there are probably people more capable of helping you get this sorted than me.

From the error message it looks to me that the compiler (PBP) runs and compiles the code without error but for some reason the assembler MPASM doesn't. I've tried to compile and assemble the pk2_tutorial.bas file here (with MPASM from MPBLAB 8.56) and it works fine but I'm using MicroCodeStudio as my IDE and not MPLAB.

There's a note in the source file about replacing the 16F690.INC file, forgetting that should NOT prevent it from compile/assemble but it will likely prevent it from working once you get past the current problem.

I'm sorry I can't give you a definitive solution to your problem, I hope someone more used to MPLAB will step in and give you a nudge in the right direction.

/Henrik.

aajgss
- 20th October 2011, 10:49
Graham,

I had the same problem and found the solution on this forum. Unfortunately I cant remember what the resolution was. I think it was something to do with the Path of some files and some of the switches. I searched for half and hour with no luck, but its here somewhere.

Best of luck

aajgss

mackrackit
- 20th October 2011, 11:06
http://www.picbasic.co.uk/forum/content.php?r=383-Beginner-Tutorial-How-to-get-started-with-PICBASIC-PRO-Demo-MPLAB-PICKIT-2

grahamr
- 21st October 2011, 08:22
Brilliant, thanks. I'll try that later.

Graham