If I have correctly understand, the maximum length from the capacitance point of view is around 8 meters, but what shall be the maximum distance for the single ended TTL?
Leo
If I have correctly understand, the maximum length from the capacitance point of view is around 8 meters, but what shall be the maximum distance for the single ended TTL?
Leo
Leo
I don't think there's any good single answer to that... it's dependent on so many different things it's hard to make a general statement.
Personally, I start getting nervous as soon as a signal leaves a board!
SDA and SCL are not good combination in one pair. Because of cross talk.
Much better is to combine GND and SDA on ona pair, GND and SCL on second pair. But capacitance play big roll. Probably CLK must be driven, not with pull up. SDA should have strong pull up.
But do not connect multiple GND on both sides, as that will create long loop antenna, probably...
I thing, but maybe i'm wrong, best chanse to get it to work is:
1. Pair GND and signal on 2 pairs for SDA and SCL, connect that ground only on output port of module.
2. Use third pair for power
3. Ground unused pair master, as GND for signals.
Generally not good idea to run TTL signals out of boards.
If you design master and slave's why not to go with RS485, half duplex or duplex?
me tooPersonally, I start getting nervous as soon as a signal leaves a board!
spi can get that sort of distance but you need a cs signal for each slave
I wonder if you used a pair of those 3v-5v level shifters back to back if they could act like a repeater ?
could be a cheap solution
wireless may be an option
rfm69 modules and the like can get 300k bps over that range and a master slave setup is no too difficult
It will work fine - as long as the PICs are the only I2C devices on the bus. The I2C specification was written to deal with low-power devices that have no more than 2 mA drive. As a result, all the pull ups (in parallel) could be no smaller than 2.5K. Since a PIC pin will sink more than 20mA, you can use much smaller pull ups. If there are only two PICs on the bus, I regularly use a 1K pull up at each end, with 10 ohms in series (one at each end) to reduce ringing. Since your CAT-5 will be twisted pairs, use one wire of each pair as GND (and the other as SDA or SCL). You should have no trouble at distance of at least 50'. But if you do get errors, you can slow the I2C bus down to lower data rates.
Be aware, however that any other non-PIC devices on the bus will probably not be able to drive such small pullups properly.
Charles Linquist
Your tips are pushing me towards the RS485.
The only trouble and not've never used before.
I am somewhat concerned about the protocol to use.
You have to give me a hint where to look to select the protocol that I could use?
Leo
Leo
If you have used serial RS232, then the RS485 is just the same. Only drivers (chips) are different. And the signal is TTL level from your controller to the RS485 driver.
The RS485 is not a protocol, rather a low level electric specs of the medium. It does not care about how the data will be sent.
So you really have not many concerns on this. Almost Plug and play.
Ioannis
In reality the RS232 is designed to connect generally ONLY two devices toghether.
The RS485 have the capability to manage multiple slave and one master.
In my project I have one master and I connect the USART to the RS485 chip and then in daisy chain all the other RS485 chip to the USART's slave. But that means every slave have his proper address, manage receiving, CRC chek etc etc and to do in the best way is needed a protocol.
Googling I have found the SNAP protocol ( http://www.hth.com/snap/ ) that shall be good to be implemented in my solution and have the source code in PBP (old version).
If I do not found a protocol more simple than SNAP, I will study and implement it.
Leo
Leo
I need Working I2C Slave code for PIC16LF1513 in C program with some instructions.
Bookmarks