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 37 matches
CCS Forum Index
Author Message
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Tue Mar 15, 2011 2:39 pm   Subject: rc hobby servo and button
http://pic-c.ccsinfo.com/forum/viewtopic.php?p=63318

i found a code around the same as mine.i tried it and the same thing happen.
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Tue Mar 15, 2011 2:18 pm   Subject: rc hobby servo and button
Why if I put a for(;;) or while(1) then the hobby servo will keep on rotating the 3 diff direction without stopping?

Is there any method to make it stop? And only move if I press a button?
Thank ...
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Sat Mar 05, 2011 9:07 pm   Subject: rc hobby servo and button
Thanx for the tip. I think my code is working now. Thanx.
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Sun Feb 27, 2011 9:27 am   Subject: rc hobby servo and button
thanx.
But to set the location of the servo I just need 1 pulse. Is that correct? Or do I need to constantly sending a pulse to the servo motor?

And from this http://www.servocity.com/html/how_do_ ...
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Sun Feb 27, 2011 3:50 am   Subject: rc hobby servo and button
#include <16F877A.h>
#use delay(clock=20000000)
#define XTAL_FREQ 20000000

#FUSES HS, NOWDT,NOPROTECT,NOLVP,NOWDT,PUT,NOBROWNOUT

#define C0 PIN_C0
#define C1 PIN_C1
#def ...
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Fri Feb 25, 2011 10:04 am   Subject: rc hobby servo and button
#include <16F877A.h>
#use delay(clock=20000000)
#define XTAL_FREQ 20000000


#FUSES HS, NOWDT,NOPROTECT,NOLVP,NOWDT,PUT,NOBROWNOUT

#define C0 PIN_C0
#define C1 PIN_C1
#d ...
  Topic: rc hobby servo and button
wind88

Replies: 11
Views: 11217

PostForum: General CCS C Discussion   Posted: Thu Feb 24, 2011 11:00 am   Subject: rc hobby servo and button
This is a code using button to control the direction of the hobby servo motor. But the code can't be compiled. Is there anything that I did wrong with the code? Thanx a lot Smile

#include <16F877A. ...
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Sat Jan 15, 2011 3:19 am   Subject: PIC16f877A and timer0
#include <16F877A.h>
#device adc=10
#use delay(clock=20000000)
#define XTAL_FREQ 200000000

#include <flex_lcd.c>

#FUSES HS, NOWDT,NOPROTECT,NOLVP,NOWDT,PUT,BROWNOUT
#inclu ...
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 10:49 pm   Subject: PIC16f877A and timer0
thank you Ttelmah

#include <16F877A.h>
#device adc=10
#use delay(clock=20000000)
#define XTAL_FREQ 200000000
#include <flex_lcd.c>

#FUSES HS, NOWDT,NOPROTECT,NOLVP ...
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 2:28 pm   Subject: PIC16f877A and timer0
#include <16F877A.h>
#device adc=10
#use delay(clock=5000000)
#define XTAL_FREQ 200000000
#include <flex_lcd.c>

#FUSES HS, NOWDT,NOPROTECT,NOLVP,NOWDT,PUT,NOBROWNOUT ...
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 7:21 am   Subject: PIC16f877A and timer0
Sorry about that, I miss the part.
Thanx a lot Ttelmah Smile
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Fri Jan 14, 2011 5:07 am   Subject: PIC16f877A and timer0
#include <16F877A.h>
#device adc=10
#use delay(clock=1000000)
#define XTAL_FREQ 40000000


#FUSES XT, NOWDT,NOPROTECT,NOLVP,NOWDT,PUT,NOBROWNOUT

#define MAX_VALUE 200
#define CCW ...
  Topic: Timer clock
wind88

Replies: 4
Views: 5124

PostForum: General CCS C Discussion   Posted: Thu Jan 13, 2011 2:24 pm   Subject: Timer clock
Period = (256 - TMR0)*(4/fosc)*(Prescaler)
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Thu Jan 13, 2011 9:39 am   Subject: PIC16f877A and timer0
#include <16F877A.h>
#device adc=10
#use delay(clock=20000000)
#define XTAL_FREQ 200000000
#include <flex_lcd.c>

#include <stdlib.h>
#FUSES XT, NOWDT,NOPROTEC ...
  Topic: PIC16f877A and timer0
wind88

Replies: 46
Views: 43162

PostForum: General CCS C Discussion   Posted: Thu Jan 13, 2011 9:37 am   Subject: PIC16f877A and timer0
It is a normal servo that can turn from -90 to +90 degree and can even stop at 0 degree (I test it with the test code for servo).

The position sensor is from ldr and it have a potentiometer inside ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group