Author |
Message |
Topic: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
jemmyduc
Replies: 4
Views: 7070
|
Forum: General CCS C Discussion Posted: Mon Dec 30, 2013 10:21 pm Subject: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
Thank you again. |
Topic: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
jemmyduc
Replies: 4
Views: 7070
|
Forum: General CCS C Discussion Posted: Sun Dec 29, 2013 9:17 pm Subject: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
I had a good I2C performance. Thank for your help. |
Topic: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
jemmyduc
Replies: 4
Views: 7070
|
Forum: General CCS C Discussion Posted: Sun Dec 29, 2013 12:28 pm Subject: using pin RD2 and RD3 I2C of 18F4431 in slave mode |
I use the SDA and SCL pins of the SSP module of PIC18F4431 multiplexed with the RD2 and RD3 pins to use it for I2C bus. But the i2c could not work.
I find in the forum and so show that it is the bug ... |
Topic: I2C in 18F4431 |
jemmyduc
Replies: 8
Views: 13776
|
Forum: General CCS C Discussion Posted: Sun Dec 29, 2013 7:01 am Subject: I2C in 18F4431 |
I use 20MHz crystal and 4.114 CCS compiler.
Thank your attention. |
Topic: I2C in 18F4431 |
jemmyduc
Replies: 8
Views: 13776
|
Forum: General CCS C Discussion Posted: Sat Dec 28, 2013 10:36 pm Subject: I2C in 18F4431 |
I have a question. Can you answer me?
I use 18F4431, and i set up my I2C is that
#use i2c(master, sda=PIN_C4, scl=PIN_C5)
If i don't use FAST or SLOW control word, what is the speed of I2C? ... |
Topic: I2C in 18F4431 |
jemmyduc
Replies: 8
Views: 13776
|
Forum: General CCS C Discussion Posted: Sat Dec 28, 2013 10:19 pm Subject: I2C in 18F4431 |
Thank your helping. I got it.
Thank you so much. |
Topic: I2C in 18F4431 |
jemmyduc
Replies: 8
Views: 13776
|
Forum: General CCS C Discussion Posted: Fri Dec 27, 2013 8:34 pm Subject: I2C in 18F4431 |
I fixed follow your guide, but it didn't work. I think my pull up resister is wrong. I used 2.7k resister.
I know that value of pull up resister relative to speed of I2C transmission. If i use 20MHz ... |
Topic: I2C in 18F4431 |
jemmyduc
Replies: 8
Views: 13776
|
Forum: General CCS C Discussion Posted: Fri Dec 27, 2013 11:15 am Subject: I2C in 18F4431 |
This is an interrupt I2C function in slave
#INT_SSP //gui 1 byte
void i2c_isr()
{
int8 state;
state = i2c_isr_state();
if(state>=0x80)
i2c_write(8 ... |
Topic: Control RC servo with ccp |
jemmyduc
Replies: 7
Views: 16424
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 6:50 pm Subject: Control RC servo with ccp |
I use analog RC servo, MG996, it seem like all RC servo analog in control.
I have right PID for 3 DC motor, it so great.
Thank for your help and attention. |
Topic: Control RC servo with ccp |
jemmyduc
Replies: 7
Views: 16424
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 8:33 am Subject: Control RC servo with ccp |
I'm using PIC 18F4431, crystal 20MHz, DC motor 5KHz, ADC 10 bits. And I use 2 LM298 Drivers to control 3 DC motor with same kind.
You can guide me to reach a PID controller. |
Topic: Control RC servo with ccp |
jemmyduc
Replies: 7
Views: 16424
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 7:26 am Subject: Control RC servo with ccp |
I try to read ADC in main fucntion . And RC servo have right control. Thank you so much.
So now, i try to contol PID 3 DC motor with 3 ADC feedback.
You can give me some advice with PID controller. |
Topic: Control RC servo with ccp |
jemmyduc
Replies: 7
Views: 16424
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 7:16 am Subject: Control RC servo with ccp |
How i can set priority for each interrupt? because i use timer to set time read ADC to control position of 3 DC motor.
You can guide me some priority such as how perform it?Do i notice some rule to ... |
Topic: Control RC servo with ccp |
jemmyduc
Replies: 7
Views: 16424
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 5:48 am Subject: Control RC servo with ccp |
I have keyboard to control RC servo and 3 normal DC motor.
I use output copare of ccp1 to control RC servo 1ms-2ms folowing code in forum. I use power pwm to control 3 DC motor.
When press keyboard ... |
Topic: interrupt timer0 and timer1 in 18F4431 |
jemmyduc
Replies: 8
Views: 15358
|
Forum: General CCS C Discussion Posted: Fri Nov 22, 2013 9:01 pm Subject: interrupt timer0 and timer1 in 18F4431 |
I got it and i make a correct control.
Thank you again. |
Topic: interrupt timer0 and timer1 in 18F4431 |
jemmyduc
Replies: 8
Views: 15358
|
Forum: General CCS C Discussion Posted: Fri Nov 22, 2013 7:35 pm Subject: interrupt timer0 and timer1 in 18F4431 |
Because i want to have a controlling range from 100 to 200 with period is 20000.
Thank for your reply. i trying to do follow the link you give me |
|