To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 1863
1862  |  1864
Subject: 
Re: Mini SSC - Scott Edwards
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Fri, 4 Apr 1997 18:59:44 GMT
Original-From: 
Chuck McManis <cmcmanis@^AvoidSpam^freegate.net>
Reply-To: 
cmcmanis@freegate[stopspam].net
Viewed: 
1457 times
  
Benjamin C. Lee wrote:
We can get the Handy Board to directly control the servo but not with
the SSC.

Stop the presses! You should have gotten documentation with the SSC
but since you are apparently missing it (and its small anyway) the
relevant information is that the Mini-SSC uses a serial interface
to control its servos. You must send down serial data, either through
the Handyboard's serial port, or by writing your own 'bit-banging'
serial routine.

To write a software UART you will need to write some assembly code
which goes something like (mnemonics from memory so they are probably
inaccurate, use the pink book as always)

LDAA (character) ; get a character into A
LDAB #9 ; 8 bits (8 data, one stop)
BCLR <ioport>,#$yy ; Clear the output bit (start bit)
LOOP: PSHB ; Save B on the stack
LDAB $#Constant ; Load a delay constant
LOOP2: DECB ; Count down by 1
BNE LOOP2 ; Until zero
PULB ; Get B back off the stack
BTST A,#$80 ; is bit seven set?
BNE SETIT ; Yes then set the bit
BCLR <ioport>,#$YY ; else clear it
BRA DONE
SETIT BSET <ioport>,#$YY ; Bit setting
SLAA ; Rotate character left
ORAA #1 ; Turn on the LSB (used later)
DONE DECB ; Count down the number of bits
BNE ; Do it again if not done.
BSET <ioport>,#&YY ; Set the stop bit high
RTS

Pick the constant for a 9600 baud which means a time delay of
1/9600 seconds or 104.16 uS

Then send out 255, <servo number>, <position> (three 8 bit bytes)
to the board.

--
cmcmanis@netcom.com              http://www.professionals.com/~cmcmanis
All opinions in the non-included text above are the sole opinions of
the author.



Message is in Reply To:
  Mini SSC - Scott Edwards
 
Hi, I am working in a group to make a six legged robot. We are using the Mini SSC from Scott Edwards to control the servo motors. We've connected the digital output #9 from the Handy Board to the S(in)#2 pin of the SSC. We also connected the signal (...) (27 years ago, 4-Apr-97, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR