Interfacing PIC to BSII
Archiver
Posts: 46,084
Honestly I'm a total newbie, but I do know this much:
First of all, the most popular PIC seems to be the PIC16c/f84
As far as I know, you need a PIC programming board, as well as a
PICBaisc compiler. In total these two items cost about $150. I
thought maybe you could just buy another Basic Stamp and have one
send commands to the other. If you got a BS2E or BS2SX (I have the
SX model, nice and fast!) you could have the e/sx as the main
processor, and the regular BS2 as the "slave processor" for doing
input/output information. I plan to eventually do something similar
to this when I can afford to, although I don't have an excess of
commands.
--- In basicstamps@y..., jamesfit@p... wrote:
> Hi all,
>
> I am in the process of trying to fit encoders to my robot. It is
currently
> controlled by a Basic Stamp II processor. I was intending to do all
> processing with the BSII, but on thinking about software for the new
> encoders I have struck a few problems.
>
> I realized that after sending an update signal to the servos every
20ms,
> and
> sampling the encoders for both servos, I was going to have
practically no
> time left to do anything else. I now think I have come up with a
better
> design.
>
> I am going to use a PIC (or some other processor) to both drive the
servos
> and also sample the encoders. I hope to even implement some PID
control in
> there. The question I have is how do I interface the PIC and Stamp?
If I
> have a function in my PIC
> drive_forward( ) how do I call this from my Stamp? I am planning to
use C
> to
> program the PIC.
>
> I am also totally new to PIC's and so have no idea what sort of PIC
I
> need.
> I assume I need a PIC with at least 2 PWM channels built in to
control my
> two motors... is this correct?
>
> Thanks so much for any help you can provide,
> best regards,
> James Fitzsimons
First of all, the most popular PIC seems to be the PIC16c/f84
As far as I know, you need a PIC programming board, as well as a
PICBaisc compiler. In total these two items cost about $150. I
thought maybe you could just buy another Basic Stamp and have one
send commands to the other. If you got a BS2E or BS2SX (I have the
SX model, nice and fast!) you could have the e/sx as the main
processor, and the regular BS2 as the "slave processor" for doing
input/output information. I plan to eventually do something similar
to this when I can afford to, although I don't have an excess of
commands.
--- In basicstamps@y..., jamesfit@p... wrote:
> Hi all,
>
> I am in the process of trying to fit encoders to my robot. It is
currently
> controlled by a Basic Stamp II processor. I was intending to do all
> processing with the BSII, but on thinking about software for the new
> encoders I have struck a few problems.
>
> I realized that after sending an update signal to the servos every
20ms,
> and
> sampling the encoders for both servos, I was going to have
practically no
> time left to do anything else. I now think I have come up with a
better
> design.
>
> I am going to use a PIC (or some other processor) to both drive the
servos
> and also sample the encoders. I hope to even implement some PID
control in
> there. The question I have is how do I interface the PIC and Stamp?
If I
> have a function in my PIC
> drive_forward( ) how do I call this from my Stamp? I am planning to
use C
> to
> program the PIC.
>
> I am also totally new to PIC's and so have no idea what sort of PIC
I
> need.
> I assume I need a PIC with at least 2 PWM channels built in to
control my
> two motors... is this correct?
>
> Thanks so much for any help you can provide,
> best regards,
> James Fitzsimons
Comments
I am in the process of trying to fit encoders to my robot. It is currently
controlled by a Basic Stamp II processor. I was intending to do all
processing with the BSII, but on thinking about software for the new
encoders I have struck a few problems.
I realized that after sending an update signal to the servos every 20ms,
and
sampling the encoders for both servos, I was going to have practically no
time left to do anything else. I now think I have come up with a better
design.
I am going to use a PIC (or some other processor) to both drive the servos
and also sample the encoders. I hope to even implement some PID control in
there. The question I have is how do I interface the PIC and Stamp? If I
have a function in my PIC
drive_forward( ) how do I call this from my Stamp? I am planning to use C
to
program the PIC.
I am also totally new to PIC's and so have no idea what sort of PIC I
need.
I assume I need a PIC with at least 2 PWM channels built in to control my
two motors... is this correct?
Thanks so much for any help you can provide,
best regards,
James Fitzsimons
>
This has changed the PIC16F876 and the new PIC16F628 give you more for
your money and they can be programed with simpler programers or by
getting chips programmed with a boot loader you just need a serial
cable. If what you are building is a one off then a stamp is the
cheaper and simpler route but if you need 10 then the cost of a Basic
compiler and programmer is easily justified. Basic Micro has a very good
line of products for Pic Micros their web page is at
http://www.basicmicro.com/
Craig
If you could use steppers instead of servos, they are less software
intensive. I first used a BS-I interfaced to two ULN2003A drivers to drive
two steppers simultaneously. When I needed more functional control, I
swapped the BS-I for a 16C622 PIC, programmed with the CCS C compiler.
Dennis
Original Message
From: jamesfit@p... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=UW7vSK8Fvgxt8xwLlXc3FUQ0MAwZdRkVqvvaoaimCPiYWKELo-csIYcNF7w3y5AGMvJ-cUoQVpKQfVReETu16Q]jamesfit@p...[/url
Sent: Wednesday, July 18, 2001 4:34 PM
To: SeattleRobotics@yahoogroups.com; basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Interfacing PIC to BSII
Hi all,
I am in the process of trying to fit encoders to my robot. It is currently
controlled by a Basic Stamp II processor. I was intending to do all
processing with the BSII, but on thinking about software for the new
encoders I have struck a few problems.
I realized that after sending an update signal to the servos every 20ms,
and
sampling the encoders for both servos, I was going to have practically no
time left to do anything else. I now think I have come up with a better
design.
I am going to use a PIC (or some other processor) to both drive the servos
and also sample the encoders. I hope to even implement some PID control in
there. The question I have is how do I interface the PIC and Stamp? If I
have a function in my PIC
drive_forward( ) how do I call this from my Stamp? I am planning to use C
to
program the PIC.
I am also totally new to PIC's and so have no idea what sort of PIC I
need.
I assume I need a PIC with at least 2 PWM channels built in to control my
two motors... is this correct?
Thanks so much for any help you can provide,
best regards,
James Fitzsimons
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/