Problem Faced in 8 Channel Servo Controller (SC08A)

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

Problem Faced in 8 Channel Servo Controller (SC08A)

Postby momokui » Fri Nov 23, 2012 2:40 pm

From the servo controller, I have connected a USB to UART to my laptop. My aim is to construct a C program to send the data from my laptop to the controller to turn the motor. The motor I'm using is servo motor. However, the sample code 'SK40C_16F877A_SC08A.c' provided, the servo controller is connecting to another microcontroller, but in my case, I connect it directly to my laptop.

As I know, SC08A send a command with 4 bytes of data. (1st byte=mode and servo motor channel, 2nd and 3rd byte=servo position, 4th byte=speed of motor). How am I going to send the 4 bytes of data? In other words, how am I activate the USB to UART to pass the data to the controller?

Appreciate much for the help.
Thank you.
momokui
Freshie
 
Posts: 7
Joined: Fri Nov 23, 2012 2:29 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby gadgetng » Fri Nov 23, 2012 3:42 pm

You didn't tell us what software you used in your computer.
i used SC08A before but with the microcontroller. Isn't there is a VB GUI given by Cytron? Why don't you just use VB ?
gadgetng
Discoverer
 
Posts: 97
Joined: Tue Jul 24, 2012 11:20 am

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby momokui » Fri Nov 23, 2012 5:02 pm

Ya, Cytron is providing the GUI software. However, I'm using Code block to execute my codes, so it must be written in C language instead off VB.
momokui
Freshie
 
Posts: 7
Joined: Fri Nov 23, 2012 2:29 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby gadgetng » Fri Nov 23, 2012 5:28 pm

code block? gain my knowledge again ;)
sorry can't help you much.. never use code block before. :oops:
Anyway, i believe that serial port programming is what you are looking for. Like VB, you need to know how to open, read/write and close the comport.
gadgetng
Discoverer
 
Posts: 97
Joined: Tue Jul 24, 2012 11:20 am

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby momokui » Fri Nov 23, 2012 5:56 pm

It's ok, thanks for the advice. Till now, I'm able to open the COM port, just that I do not know how to read and write the data using USB to UART.
momokui
Freshie
 
Posts: 7
Joined: Fri Nov 23, 2012 2:29 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby robosang » Fri Nov 23, 2012 7:58 pm

never heard code block before too, but agreed with gadgetng.....COM port is very common in programing, take sometime to go through some sample code.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby zhenning » Fri Nov 23, 2012 11:17 pm

momokui WROTE:Ya, Cytron is providing the GUI software. However, I'm using Code block to execute my codes, so it must be written in C language instead off VB.


Hmmm...seems to me code block is just another ide just like eclipse. The serial programming greatly depends on whether you are using win or linux os. :)

Take a look at this: www.robbayer.com/files/serial-win.pdf and http://www.lafn.org/~dave/linux/Serial- ... OWTO-B.txt
zhenning
Enthusiast
 
Posts: 351
Joined: Thu Dec 30, 2010 12:32 am

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby momokui » Sat Nov 24, 2012 4:22 pm

Thanks zhenming..
momokui
Freshie
 
Posts: 7
Joined: Fri Nov 23, 2012 2:29 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby momokui » Sun Nov 25, 2012 11:39 pm

I was trying to sending data from my laptop to the controller via USB to UART. In my case, the Tx pin is lighted on, I guess it indicates the data is being sent. My question is, how does the servo controller notify the user that the data is being received?

Thank you.
momokui
Freshie
 
Posts: 7
Joined: Fri Nov 23, 2012 2:29 pm

Re: Problem Faced in 8 Channel Servo Controller (SC08A)

Postby gadgetng » Mon Nov 26, 2012 2:00 pm

momokui WROTE:I was trying to sending data from my laptop to the controller via USB to UART. In my case, the Tx pin is lighted on, I guess it indicates the data is being sent. My question is, how does the servo controller notify the user that the data is being received?

Thank you.


The UM didn't mention?
gadgetng
Discoverer
 
Posts: 97
Joined: Tue Jul 24, 2012 11:20 am

Next

Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 3 guests

cron