Author |
Message |
Topic: interrupts time doubt |
jaimechacoff
Replies: 2
Views: 4298
|
Forum: General CCS C Discussion Posted: Mon Mar 01, 2010 12:29 pm Subject: interrupts time doubt |
Thanks PCM, you were right in all your points.
I could not find again the post by Ttelmah, but this is his routine:
void myint(void) {
new=input_b();
value=new^old;
... |
Topic: interrupts time doubt |
jaimechacoff
Replies: 2
Views: 4298
|
Forum: General CCS C Discussion Posted: Sun Feb 28, 2010 3:29 pm Subject: interrupts time doubt |
Hi, I have a doubt about the interrupts.
My question is:
I have a done a program that reads an encoder by the portbB, actually, I changed the program that Ttelmah left, then I put a timer and I ... |
Topic: dc motor routine |
jaimechacoff
Replies: 3
Views: 3964
|
Forum: General CCS C Discussion Posted: Fri Feb 26, 2010 4:40 pm Subject: dc motor routine |
i am right now doing something with a position feedback but its not working elegant. : ((( |
Topic: Signed int and if statement (basic problem) |
jaimechacoff
Replies: 6
Views: 4908
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2010 1:30 pm Subject: Signed int and if statement (basic problem) |
this has worked for me:
#include <18F4550.h>
#use delay (clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#define red PIN_B5
#define green PIN_A5
signed int16 value = -2;
s ... |
Topic: KTY84 thermometer |
jaimechacoff
Replies: 15
Views: 21532
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2010 1:17 pm Subject: KTY84 thermometer |
upload a TXT file or an Excel file with all the data you want to fit and i will do it for you.
but, I can't have it for today ... I am also in troubles with some software hahahaha : ) |
Topic: Signed int and if statement (basic problem) |
jaimechacoff
Replies: 6
Views: 4908
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2010 1:13 pm Subject: Signed int and if statement (basic problem) |
what is it value?, what are you trying to do? |
Topic: ultra low speed PWM motor control |
jaimechacoff
Replies: 6
Views: 13262
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2010 12:17 pm Subject: ultra low speed PWM motor control |
#hazardmike,
I could move the motor with a duty cycle of 5.25%, its the slowest i can get ...
how is your work? |
Topic: KTY84 thermometer |
jaimechacoff
Replies: 15
Views: 21532
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2010 9:24 am Subject: KTY84 thermometer |
and did you try to use a LM35 temperature sensor?, or Is not enough for your project?
http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS005516.PDF
its linear.
by the way, with ... |
Topic: get_float_usb problem |
jaimechacoff
Replies: 1
Views: 3230
|
Forum: General CCS C Discussion Posted: Wed Feb 24, 2010 3:04 pm Subject: SOLVED!!! |
I solved.
the problem is that first i have to include stdlib.h instead of usb_cdc:
#include <stdlib.h>
#include ".\include\usb_cdc.h"
I didnt know that, I am new in CCS, ... |
Topic: get_float_usb problem |
jaimechacoff
Replies: 1
Views: 3230
|
Forum: General CCS C Discussion Posted: Wed Feb 24, 2010 3:01 pm Subject: get_float_usb problem |
Hi,
I have this little program to test how to write strings using USB, I used to use a similar one in RS232, but now, i am trying to change everything for USB.
Ok, my problem is when I compile ... |
Topic: table results |
jaimechacoff
Replies: 12
Views: 11814
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2010 4:17 pm Subject: table results |
first that all, you should do a kind of simulation, Excel can help you a lot.
Make a graph of the equation, test if all your point are in the curve, or at least close (your know which is your bette ... |
Topic: table results |
jaimechacoff
Replies: 12
Views: 11814
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2010 4:02 pm Subject: table results |
I got this equation:
Return = 0.0008value**2 - 0.1224value - 42.736
Its not actually correct but fits the point you gave us in the original post, now its up to you do it better ; ) |
Topic: table results |
jaimechacoff
Replies: 12
Views: 11814
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2010 3:57 pm Subject: table results |
PCM already did your work ; )))
but really, try fitting a equation, even you can do it with excel : ) |
Topic: table results |
jaimechacoff
Replies: 12
Views: 11814
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2010 3:52 pm Subject: table results |
ok, I did it very faster and i believe is an exponential function, of course, with the Spline you will find a polynomial, and insted of all those "else if" you put the function : ))))))))))) |
Topic: table results |
jaimechacoff
Replies: 12
Views: 11814
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2010 3:48 pm Subject: table results |
you can convert all those points in a polynomial function.
I use to use Cubic Spline, that means that you will find a function and it will cross each one of the point of your table, and of course, ... |
|