CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 14 matches
CCS Forum Index
Author Message
  Topic: problem with digital servo motors
gregoryg

Replies: 9
Views: 12337

PostForum: General CCS C Discussion   Posted: Mon Jun 15, 2009 6:39 am   Subject: using microswitch
Hello again,
I didn't want to open a new topic for another problem so I will post it here.
I am done writing my code for a sun tracking robot. It has 3 motors for moving and 2 motors for the solar ...
  Topic: unsigned int
gregoryg

Replies: 9
Views: 16067

PostForum: General CCS C Discussion   Posted: Tue Jun 09, 2009 9:14 am   Subject: unsigned int
So if it doesnt matter to me if the values are equal or the delta is <205
it will look like this?

int16 value1,value2,width;

width=30;

if (value1>value2) {
if ( ...
  Topic: unsigned int
gregoryg

Replies: 9
Views: 16067

PostForum: General CCS C Discussion   Posted: Tue Jun 09, 2009 8:45 am   Subject: unsigned int
Hello,
My code contains this lines :


int16 value1,valu2,width;
if ((value1-value2 )>205)
width=20;
//----------------------------
if((value2-value1)>205&# ...
  Topic: problem with digital servo motors
gregoryg

Replies: 9
Views: 12337

PostForum: General CCS C Discussion   Posted: Tue Jun 02, 2009 4:39 am   Subject: problem with digital servo motors
Thank you all for the help.
There was a problem with the servos, I took another threesome and they work just fine.
Ttelmah, does my LOOPCNT=60 will do the job or do I need to make another calculat ...
  Topic: problem with digital servo motors
gregoryg

Replies: 9
Views: 12337

PostForum: General CCS C Discussion   Posted: Tue Jun 02, 2009 1:34 am   Subject: problem with digital servo motors
I am using development board olimex PIC-P40-USB
http://www.olimex.com/dev/index.html

I couldnt find the motor datasheet but its HX12K Hextronik
  Topic: problem with digital servo motors
gregoryg

Replies: 9
Views: 12337

PostForum: General CCS C Discussion   Posted: Mon Jun 01, 2009 2:32 pm   Subject: problem with digital servo motors
With the old code the digital servos didn't move a bit.
After I changed the LOOPCNT to 300Hz they started working, not as I intended but still..I also changed the duty cycle values because I saw it ...
  Topic: problem with digital servo motors
gregoryg

Replies: 9
Views: 12337

PostForum: General CCS C Discussion   Posted: Mon Jun 01, 2009 12:23 pm   Subject: problem with digital servo motors
Hello,
I am trying to create 3 pwm outputs with pic 16f877A, compiler CCS 4.057
At start I worked with 3 regular servo motors which need 50 Hz PWM. I worked with this code and it worked perfectly.
...
  Topic: Sun tracking robot
gregoryg

Replies: 1
Views: 2378

PostForum: General CCS C Discussion   Posted: Mon May 25, 2009 6:32 pm   Subject: Sun tracking robot
Hello, I am working on a sun tracking robot. It moves on a certain path with 3 servo motors and at the same time 2 other servo motors adjust the solar panel in 2-D according to the data from 2 pairs ...
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Mon May 25, 2009 3:00 am   Subject: help with servo motor
Thats the general idea.I want it to stop and start again with another duty cycle.
Thank you very much for the help.
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Sun May 24, 2009 1:38 pm   Subject: help with servo motor
I made some thinking.
Would replacing the "while(1)" with "delay_ms " will do the job?
void main()
{
width = 40; // 10% duty cycle

setup_counters(RTCC_I ...
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Sun May 24, 2009 9:30 am   Subject: help with servo motor
ok, but how can I make it work for a period of time ? Looks like the usual counter doesn't work here.

Thank you.
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Sun May 24, 2009 5:24 am   Subject: help with servo motor
I solved the problem with the servo. I have another question.
How can I change the code so the motor will work only for a period of time and not infinite?
I tried to replace while(1) with for (i ...
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Thu May 21, 2009 3:19 pm   Subject: help with servo motor
Thank you for the comments.
I will change the integers, but what do you mean by "not specifying fast_io"? I am new to programming so I will appreciate if you can explain it.
I am working ...
  Topic: help with servo motor
gregoryg

Replies: 8
Views: 5976

PostForum: General CCS C Discussion   Posted: Thu May 21, 2009 3:59 am   Subject: help with servo motor
Hello,
I am working with small servo motor Futaba s3004 , 16F877 pic and Olimex pic-p40-usb development board.

This is the code that I am using:
#include <16F877A.H>

#fuses HS, NOLV ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group