PDA

View Full Version : getting started



cunninghamjohn
- 13th November 2008, 22:39
I need some help getting started with picbasic pro, my copy arrived in the post today. I open microcode studio, and the example blink.bas. When I try to compile it I get a long list of errors. How do I get started? Im using MPASM v5.01 and the velleman k8048.

mackrackit
- 13th November 2008, 22:49
Welcome to the forum.

If you could post some of the errors it would help us figure it out.

But to start with make sure you are using MPASM.
Goto editor options in MCS and make sure MPASM is checked.

cunninghamjohn
- 14th November 2008, 08:52
Thanks for the quick reply Dave. The first error is 'cannot open file (include file P16f84.inc not found)
The rest of the errors are 'symbol not previously defined........'
Am I correct in thinking that the include file is an assembly language header for the 16f84? I have found this by manually searching.
I have 'use mpasm' checked under compile and program options.
Regards, John

mackrackit
- 14th November 2008, 09:03
Where the "use MPASM" check box is at , did you click find automatically and did it find MPASM the same place you found the inc?

And yeas about the *.inc. There is a set of them in the PBP directory and another in the MPASM directory. The ones starting with a "P" are from MPASM.


What OS are you using?

cunninghamjohn
- 15th November 2008, 18:32
Thanks for your help so far dave, I have sorted the problem out now. I have 2 hard drives installed on my computer, and ended up with the mecanique folder on D: and mpasm on C: or something, so I think the program was looking in the wrong place for the INC files. I now have a set of flashing LEDs in front of me, so im off to a good start and very pleased.

Thanks very much Dave
BR John

mackrackit
- 15th November 2008, 18:42
COOL!
More fun with BLINKY :)
Play with this a little. Change the PORT setting to match you PIC


X VAR BYTE

Y VAR BYTE

X = 1



RAMPUP:

FOR Y = 0 TO 10

HIGH PORTB.2

LOW PORTB.3

PAUSE X

LOW PORTB.2

HIGH PORTB.3

PAUSE X

NEXT Y

X = X + 10

IF X => 100 THEN RAMPDOWN

GOTO RAMPUP



RAMPDOWN:

FOR Y = 0 TO 10

HIGH PORTB.2

LOW PORTB.3

PAUSE X

LOW PORTB.2

HIGH PORTB.3

PAUSE X

NEXT Y

X = X - 10

IF X =< 25 THEN RAMPUP

GOTO RAMPDOWN