Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Razor Concepts on August 26, 2008, 11:37:42 AM
-
(http://i37.tinypic.com/21j0eop.jpg)
Hi, last year during my freshman year of school we assembled these simple boards to program robots with two servo motors. I want to use it again, but these boards didnt really come with a manual or anything, it was designed in hopes of being added to and modified. It has two servo outputs, 8 outputs, 5 inputs, and uses a PIC16F88 microcontroller. I noticed that the signal wire of the servo output connects directly to the microcontroller. Does this mean I can use the other 8 outputs (also directly connected to the microcontroller) to drive more servos? Thanks ;D
-
Does this mean I can use the other 8 outputs (also directly connected to the microcontroller) to drive more servos? Thanks ;D
Yes it does.
Pins on a microcontroller are I/O pins, which means they can be configured to be Inputs or outputs. So the 5 inputs can also be used to drive servo's.
So you can drive 15 servo's separatly.
-
What would be the code to drive servos using the inputs and outputs? For the two servo outputs already on the board, all that was needed was Servo6 75 or Servo7 225 , etc. If I choose other numbered outputs (Servo5, Servo4) will those automatically work with the output and input pins? Thanks!
-
I dont know what program language you are using but I am guessing its PICBASIC
You need to define which hardware is connected where , the microcontroller doesn't just magically know where things are connected. It might already have been defined in the code.
Btw , freshman year of college or high school?
-
RTDDS
haha
read the damn data sheet of the pic
:P
it will tell you how to switch pins from input mode to output mode
-
google is amazing! ;D
http://www.google.com/search?q=PIC16F88+servo+code
-
Just an update - I finally got an RS232 cable (amazing how I didnt have one...), and started to program this thing again ;D Too bad my Axon is coming in on wednesday and will probably cast a big shadow over this Kilroy board ;D
This year I'm a sophomore at TJHSST high school.
I haven't tried adjusting the outputs for servos yet, will update again when I need help. Thanks!
-
I finally got around to soldering more connections. The existing servo outputs used outputs number 7 and 6 on the PIC. The command to move the servos were something like this:
servo 7, 225
pause 1000
servo 6, 75
pause 1000
I plugged a servo into output 5, and found that using the code "servo 5, 225" actually worked! Looks like I wont be needing any extra code for more servos.