Author |
Message |
Topic: usb to rs485 full duplex communication |
emaxxenon
Replies: 32
Views: 64966
|
Forum: General CCS C Discussion Posted: Fri Mar 20, 2020 4:05 am Subject: usb to rs485 full duplex communication |
https://i.ibb.co/0qPDdp0/1.png
I saw such a scheme.
A --> 1K --> +
B --> 1K --> GND |
Topic: usb to rs485 full duplex communication |
emaxxenon
Replies: 32
Views: 64966
|
Forum: General CCS C Discussion Posted: Fri Mar 20, 2020 3:03 am Subject: usb to rs485 full duplex communication |
edit:
ok sorry i got it wrong |
Topic: usb to rs485 full duplex communication |
emaxxenon
Replies: 32
Views: 64966
|
Forum: General CCS C Discussion Posted: Fri Mar 20, 2020 2:37 am Subject: usb to rs485 full duplex communication |
I had the same problem before. I couldn't see what happened at the address you gave.
My problem was the integrated one I used. Cannot select RX-TX. There are cards that do this job automatically. T ... |
Topic: usb to rs485 full duplex communication |
emaxxenon
Replies: 32
Views: 64966
|
Forum: General CCS C Discussion Posted: Fri Mar 20, 2020 12:22 am Subject: usb to rs485 full duplex communication |
I cannot access the link.
Can you renew? |
Topic: i2C Communication Control |
emaxxenon
Replies: 2
Views: 10080
|
Forum: General CCS C Discussion Posted: Mon Mar 16, 2020 1:50 am Subject: i2C Communication Control |
Hello, thanks for answer.
I checked I2C debug.
If the address is incorrect, NAK = 1 appears. If true, 0 appears.
Is there a way to read this lice?
If the address is wrong, I want to turn on the ... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 8:59 am Subject: i2C 2 Slave and IR Led Problem |
Here you define various slave addresses in the Master code:
#define R_SLAVE1_W 0x10
#define R_SLAVE1_R 0x11
#define T_SLAVE1_W 0x20
#define T_SLAVE1_R 0x21
But in your slave code, you don ... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 7:08 am Subject: i2C 2 Slave and IR Led Problem |
What resistors are you using on the LED's?.
Because you use 'input_state', if the LED pin does not go high enough top be
seen as a '1' the code will return the wrong value. So if the pins are
'ov ... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 6:47 am Subject: i2C 2 Slave and IR Led Problem |
You need to get rid of all your SSP ISR code in the master.
Ensure INT_SSP is disabled.
Then where you have:
data = i2c_read(0);
Use the value read here to control the LED's.
Then wherev ... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 4:14 am Subject: i2C 2 Slave and IR Led Problem |
You do not use I2C_ISR_STATE in a master.
The whole point is in a master _you_ initiate all transfers. There is no
interrupt use for something happening on the bus because things only
happen whe ... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 3:24 am Subject: i2C 2 Slave and IR Led Problem |
You need to get rid of the ISR code in the master.
I2C_ISR_STATE, is for a _slave_. The '0' condition that starts it, is an
address match (so the slave address being received). Similarly the 0x80
... |
Topic: i2C 2 Slave and IR Led Problem |
emaxxenon
Replies: 10
Views: 21771
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 2:59 am Subject: i2C 2 Slave and IR Led Problem |
Hello,
I have 1 master and 2 slave cards.
I use pic18f25k22 on all cards.
There are 16 ir leds in slave cards.
Master sends information to slave cards to turn these leds on one by one.
It reads ... |
Topic: i2C Communication Control |
emaxxenon
Replies: 2
Views: 10080
|
Forum: General CCS C Discussion Posted: Mon Mar 09, 2020 3:12 am Subject: i2C Communication Control |
Hi,
I am communicating with i2C. (pic: 18F25K22)
I have 10 slave cards (5 receiver - 5 transmitter).
The master card sends commands for them to operate ir leds.
But I want to see if the i2C commun ... |
Topic: Timer 2 on PIC16F15325 |
emaxxenon
Replies: 9
Views: 18866
|
Forum: General CCS C Discussion Posted: Fri Feb 28, 2020 5:47 am Subject: Timer 2 on PIC16F15325 |
Where did you make your oscillator settings? |
Topic: i2c Speed Setting |
emaxxenon
Replies: 22
Views: 41195
|
Forum: General CCS C Discussion Posted: Thu Feb 27, 2020 11:45 pm Subject: i2c Speed Setting |
'speed', bus speed is always defined or controlled by the 'master'. However one needs to know the slave capabilities for 'speed'. Obviously you cannot set the bus speed higher than the furtherest, slo ... |
Topic: i2c Speed Setting |
emaxxenon
Replies: 22
Views: 41195
|
Forum: General CCS C Discussion Posted: Thu Feb 27, 2020 6:55 am Subject: i2c Speed Setting |
Thanks for the answers.
I will try to work at low speeds.
Would the resistance values be appropriate as in the diagram I sent?
https://i.hizliresim.com/8XErNV.png
The length of the cable fro ... |
|