|
Posted by Dale T Stewart on February 16, 2006, 1:14 am
Hi
I don't use BASIC, but there is an online forum for PIC BASIC, just go to
mElabs' website and look for a link. There should be heaps of code
available- do a Google search.
Also, as far as I know there are some commands that are common or at least
similar between PBP and PBASIC used to program the BASIC Stamp. You will
find more PBASIC code around than you can poke a stick at: www.parallax.com,
and the Internet.
Download the free PDF tutorials from the link, there is one on robotics,
which should help Read the documentation that comes with PBP, in the section
that deals with common commands between PBP and PBASIC.
Cheers
|-]
Dale
> I'm a PIC newcomer, and having succeeded in getting that LED flashing,
> I've moved on to a servo. I'm having a little trouble with that - it
> seems I can only make the servo move toward one of its extremes, and
> not back the other way.
> I'm using the 16f690 PIC, which is what comes with Microchip's PICKit
> 2, and programming in PicBasic Pro. I'm guessing that my troubles have
> something to do with the special features of this chip, like the
> internal oscillator. I've been hunting for some example code for this
> chip to learn from, but 90% of what's out there is for the 16f84.
> The code below is what I've been using. I would really appreciate
> having any glaring errors pointed out to me.
> position var byte
> position = 150
> TRISC=0
> PORTC=0
> sweep:
> pulsout PORTC.5,position
> position = position + 1
> pause 18
> if position > 110 then sweepback
> goto sweep
> sweepback:
> pulsout PORTC.5,position
> position = position - 1
> pause 18
> if position < 190 then sweep
> goto sweepback
> I've also tried adjusting the pulses to see if I can get a different
> movement, but I get the same result every time.
>
|