Controlling the PSC with a PIC?
almasri
Posts: 2
Hi,
·i want to control 12 servo motors using a PIC16F877A, the only servo card i found and i bought was the (parallax servo controller), i have connected the servo controller to the PIC board using an RS232 cable, now i have to send signals to the Servo board to get the motors starting:
according to their manual
Each position command is comprised
of a header, three parameters: C, R, and PW, and a command terminator.
The Header: “!SC” is the header. The header signifies to all devices on the same wire that this is a command for a Servo Controller.
if i want to pass it to the PIC i have to USe PUTC() is that correct..??
and how can i pass a command which is readable by the servo controller such as the !SC...???
did anybody ever came across this controller and is it possible to provide me with a simple example, i am using a software that came with the PIC called PCW C compiler
you can tell i m a beginner
thank you very MUCH
Post Edited By Moderator (Jon Williams (Parallax)) : 11/7/2005 9:46:51 PM GMT
·i want to control 12 servo motors using a PIC16F877A, the only servo card i found and i bought was the (parallax servo controller), i have connected the servo controller to the PIC board using an RS232 cable, now i have to send signals to the Servo board to get the motors starting:
according to their manual
Each position command is comprised
of a header, three parameters: C, R, and PW, and a command terminator.
The Header: “!SC” is the header. The header signifies to all devices on the same wire that this is a command for a Servo Controller.
if i want to pass it to the PIC i have to USe PUTC() is that correct..??
and how can i pass a command which is readable by the servo controller such as the !SC...???
did anybody ever came across this controller and is it possible to provide me with a simple example, i am using a software that came with the PIC called PCW C compiler
you can tell i m a beginner
thank you very MUCH
Post Edited By Moderator (Jon Williams (Parallax)) : 11/7/2005 9:46:51 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
When you get to the PUTC(), you should be asking someone that programs in C.
Parrallax Products are supported by PBASIC, SX/B Basic, and SX-Key Assembler. Sorry, no C at this time.
The Servoboard is really an ASCII code string that controls it. So mixing products should easily work.
If you really want to simply test the board, you probably can connect your Servo Board to your personal computer via the RS-232 and use hyper-terminal to send the commands and observe the motion.
At least you can make sure you have the board functioning properly. Then, you can move on the PIC world.
Above all Parallax is happy to make sure you got a functioning product and your moneys worth, but they cannot be all things to all customers.
Regarding programing a PIC in C compiler, I personally have no idea of what is required. I do know that the you have a UART on that PIC. You have to properly intialize it and write some code to output. If you want to have sensors create the output, you need to do more programing. Seems like you are in need of a good book. Try www.nutsvolts.com for books on the PIC. There is a Mike P.... that has written a lot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Myke Predko is the name you're referring to and he is, indeed, one of the most prolific writers on the PIC that I have seen.
Almasri,
It sounds like you don't really have a grasp of programming in C. I would recommend getting a handle on that first. If you have the hardware required to program the PIC, working with the PSC should not be a problem once you grasp the basics of C. Even without a hardware UART, most C compilers implement a software UART via library.
Good Luck!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
If you want to write Assembler to the PIC, it is nearly the same as the SX-Ubicom and it might be easier to learn first via the SX-Ubicom as there are not the diverse inventory of hardware. Nearly everything is done in software instead. Parallax has always provided more support on the education side.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan