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 19 matches
CCS Forum Index
Author Message
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Mon Apr 26, 2004 3:50 am   Subject: Why does this happen??
Is an int signed then unless you specify unsigned int or int8? This could be a problem, i'll change this on monday and check the result.


Haven't had chance to try this bit yet, but here is the c ...
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 3:45 pm   Subject: Why does this happen??
Sorry, left work at Lunch time.

As for the LST code from 0045, i won't be able to get that until monday, so i will post it then. (sorry didn't notice it jumped back up to 0045!)

Is an int signed ...
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 4:39 am   Subject: Why does this happen??
I appreciate all the help you guys are giving.
Ttelmah, thanks for your suggestions. I will look at using a timer i think.

Here is the full list of the code, it pretty simple really..

// SEOS H ...
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 3:29 am   Subject: Why does this happen??
Yeah, that does account for some of the extra delay, but not all of it.

I suppose i will just have to say it is one of those things, but i hate to do that. It would be better to know.
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 2:56 am   Subject: Why does this happen??
Yes certain of X=5 because if i have a value in PosServo0 then it moves the servo by the calculated amount. If X=0 then this would not happen, it would just generate a HUGE pulse.


Puzzling..!
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 2:40 am   Subject: Why does this happen??
Hmmm,

I don't think so.. This delay is triggered by an interrupt every 16.5mS so each time this delay is triggered the ISR has just started and this delay is over well before the next ISR 16.5mS la ...
  Topic: Why does this happen??
johnh

Replies: 16
Views: 31492

PostForum: General CCS C Discussion   Posted: Fri Apr 23, 2004 2:20 am   Subject: Why does this happen??
Hello,

Here is a snippet of code that generates a pulse of a varying size dependant on the value of PosServo0.

I need a minimum pulse of around 900uS to drive a servo but i get some very strange ...
  Topic: Basics of A/D
johnh

Replies: 1
Views: 8122

PostForum: General CCS C Discussion   Posted: Wed Apr 07, 2004 2:26 am   Subject: Basics of A/D
Hi Guys,

Now these questions may sound daft, but i must start somewhere!!

OK

No. 1 With a 5v internal reference on a 16F873 (10bit) will the result of a READ_ADC automatically be within the r ...
  Topic: It's a simple problem......
johnh

Replies: 9
Views: 22586

PostForum: General CCS C Discussion   Posted: Thu Jan 29, 2004 11:31 am   Subject: It's a simple problem......
for completeness - this is my actual code inside the isr


#int_TIMER0
TIMER0_isr(){

output_high(PinServo0);

delay_ms(1); // the minimum on time for servo
...
  Topic: It's a simple problem......
johnh

Replies: 9
Views: 22586

PostForum: General CCS C Discussion   Posted: Thu Jan 29, 2004 11:07 am   Subject: It's a simple problem......
next problem...... Very Happy

i want the RTCC to interrupt every ~17ms

at the moment the setup of the timer0 is

setup_timer_0(RTCC_INTERNAL | RTCC_DIV_256);


in the device file it sa ...
  Topic: It's a simple problem......
johnh

Replies: 9
Views: 22586

PostForum: General CCS C Discussion   Posted: Thu Jan 29, 2004 9:53 am   Subject: It's a simple problem......
Excellent, thanks people..

Suspect my project will kick out a few more problems yet!!

Be back soon...

John
  Topic: It's a simple problem......
johnh

Replies: 9
Views: 22586

PostForum: General CCS C Discussion   Posted: Thu Jan 29, 2004 9:21 am   Subject: It's a simple problem......
For those who know what they're doing....unlike me!


Hello people,

If i compile this simple bit of code



//SerialServo.c
//----------------
#include <SerialServo.h>

#define ...
  Topic: Servo controller
johnh

Replies: 4
Views: 14507

PostForum: General CCS C Discussion   Posted: Tue Jan 06, 2004 10:41 am   Subject: Ahh!
Just figured it out! It is 0x4F times 12 gives 960. So the value in data_byte multiplied by 12 gives the on time for the servo (plus the 1ms delay)

Ta..
  Topic: Servo controller
johnh

Replies: 4
Views: 14507

PostForum: General CCS C Discussion   Posted: Tue Jan 06, 2004 10:36 am   Subject: Servo controller
Cheers Doug,

I will have a look at that... Seems easy when someone explains how to do it. I wouldn't have known where to start!!

One question. Where does the value 12 in the last bit of code com ...
  Topic: Servo controller
johnh

Replies: 4
Views: 14507

PostForum: General CCS C Discussion   Posted: Sun Jan 04, 2004 6:12 pm   Subject: Servo controller
Hello all,

I want to control 3 groups of servo motors, essentially i can just assume as far as the PIC is concerned it is just 3 servo motors..

I am completely new to this and two days ago i did ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group