Author |
Message |
Topic: My math operators, are not working as i want |
Chaud
Replies: 6
Views: 7654
|
Forum: General CCS C Discussion Posted: Tue Mar 06, 2012 1:59 pm Subject: My math operators, are not working as i want |
Ok i get it, thanks for you help |
Topic: My math operators, are not working as i want |
Chaud
Replies: 6
Views: 7654
|
Forum: General CCS C Discussion Posted: Tue Mar 06, 2012 1:27 pm Subject: My math operators, are not working as i want |
if i change "conta" to float, it works curt2go
Isnt it supossed to work with double too? |
Topic: My math operators, are not working as i want |
Chaud
Replies: 6
Views: 7654
|
Forum: General CCS C Discussion Posted: Tue Mar 06, 2012 1:07 pm Subject: My math operators, are not working as i want |
Double conta = 100 * 0.0512;
printf("%ld \r\n",conta);
Result expected = 5.12
Result i get = 9089 |
Topic: Strange errors after re-installing CCS c compiler |
Chaud
Replies: 2
Views: 5636
|
Forum: General CCS C Discussion Posted: Wed Feb 22, 2012 8:54 am Subject: Strange errors after re-installing CCS c compiler |
Hello, I had to format my laptop, and after installing CCS c compiler, I'm having compile errors that I don't have before format.
For example here:
int32 readGyro(){
int32 gyro; ... |
Topic: Gyro XV 3500CB angular rate sensor , i really need some help |
Chaud
Replies: 20
Views: 35040
|
Forum: General CCS C Discussion Posted: Wed Feb 22, 2012 7:05 am Subject: Hi rubenskc |
Sure, so first of all you need to create i2c:
#use i2c(master,sda= PIN_B0,scl=PIN_B1)
so for I2C i use this method:
int32 readGyro(){
int32 gyro;
int valu ... |
Topic: Stepper motor speed control, need help |
Chaud
Replies: 9
Views: 10720
|
Forum: General CCS C Discussion Posted: Thu Feb 16, 2012 5:43 pm Subject: Re: Code |
Hi Chaud,
Thanks for your response. It's not simply that I'm unwilling to provide code.
This is my style:-
You ask a question.
I have several choices including:-
(1) Give a complete ans ... |
Topic: Stepper motor speed control, need help |
Chaud
Replies: 9
Views: 10720
|
Forum: General CCS C Discussion Posted: Thu Feb 16, 2012 12:36 pm Subject: Stepper motor speed control, need help |
How about this one (thoroughly untested):int1 doMotor = 1; //do straight away
int8 motorSector = 0; //do 1st sector
int8 motorSpeed = 25;
int8 count = 0;
#int_RTCC
void RTCC_isr(void)
... |
Topic: Stepper motor speed control, need help |
Chaud
Replies: 9
Views: 10720
|
Forum: General CCS C Discussion Posted: Tue Feb 14, 2012 7:29 pm Subject: Stepper motor speed control, need help |
Thanks for replies guys, they were very useful for me. Tomorrow I will try to change delay_us() for interrupts. I have already a interrupt:
#int_RTCC
void RTCC_isr(void){
count++; ... |
Topic: Stepper motor speed control, need help |
Chaud
Replies: 9
Views: 10720
|
Forum: General CCS C Discussion Posted: Tue Feb 14, 2012 12:35 pm Subject: Stepper motor speed control, need help |
Hello, I need to control the speed on a stepper motor. I use this method:
void speed(int32 x){
output_low(PIN_B4);
output_high(PIN_B2);
output_high(PI ... |
Topic: How we get a 16-bit output from I2C? |
Chaud
Replies: 6
Views: 11794
|
Forum: General CCS C Discussion Posted: Sun Feb 05, 2012 2:50 pm Subject: How we get a 16-bit output from I2C? |
Hello PCM Programmer, I agree with you, sorry I'm a very distracted guy, and I completely forget the "0b" , and the problem was that .. sorry my bad, thanks for help friend.
temtronic tha ... |
Topic: How we get a 16-bit output from I2C? |
Chaud
Replies: 6
Views: 11794
|
Forum: General CCS C Discussion Posted: Fri Feb 03, 2012 10:16 am Subject: How we get a 16-bit output from I2C? |
I think I didn't get what you really mean :P There must be someone who needed to get more than 1 byte via I2C. I'm pretty sure that value 2 is incorrect, I just followed the Arduino code. I need to kn ... |
Topic: RS232 , PIC18F2550 don't working |
Chaud
Replies: 22
Views: 28496
|
Forum: General CCS C Discussion Posted: Thu Feb 02, 2012 7:19 pm Subject: RS232 , PIC18F2550 don't working |
Thanks dude, I wanted some explanation like this |
Topic: How we get a 16-bit output from I2C? |
Chaud
Replies: 6
Views: 11794
|
Forum: General CCS C Discussion Posted: Thu Feb 02, 2012 5:45 pm Subject: How we get a 16-bit output from I2C? |
One guy with same gyro did this:
int Get_Gyro_Data()
{
int data;
Wire.beginTransmission(Gyro_address);
Wire.send(Register);
Wire.endTransmission();
Wire.r ... |
Topic: How we get a 16-bit output from I2C? |
Chaud
Replies: 6
Views: 11794
|
Forum: General CCS C Discussion Posted: Thu Feb 02, 2012 5:38 pm Subject: How we get a 16-bit output from I2C? |
Hello, i need to get a 16-bit output from my gyroscope(XV 3500CB),and i cannot get a value between 0 - 65535 as i want (16 bit), i am doing this:
i2c_start(); ->i2c initiate
i2c_write( ... |
Topic: RS232 , PIC18F2550 don't working |
Chaud
Replies: 22
Views: 28496
|
Forum: General CCS C Discussion Posted: Thu Feb 02, 2012 3:48 pm Subject: RS232 , PIC18F2550 don't working |
I used same fuses on 2550 and its working, thanks for all help, you guys are great |
|