Go Down

Topic: Master Slave Project (Read 4 times) previous topic - next topic

liudr

Hey welcome back! PM received. The phi-menu has been rewritten and expanded to the phi_prompt :) Please find the most recent phi_prompt library here:

http://code.google.com/p/phi-prompt-user-interface-library/

Get the 1.0 pre-release and the doc of the previous edition. I am still working on the new doc. The library comes with plenty of sample codes to get you started.

Only concern about your plan I have is that if you use i2c master slave, then the slave end can't read its RTC since the RTC is on i2c and a slave can read at will. Have you thought about that or do you only need RTC on master, which is fine?

For hardware, take a look here:
http://liudr.wordpress.com/shields/phi-2-shield/

RTC, and 16*2 or 20*4 display. The RJ45 Porto should take care of connecting things up at long distance.

0

Quote
. The phi-menu has been rewritten and expanded to the phi_prompt smiley Please find the most recent phi_prompt library here:

http://code.google.com/p/phi-prompt-user-interface-library/

Get the 1.0 pre-release and the doc of the previous edition. I am still working on the new doc. The library comes with plenty of sample codes to get you started.

I will try this out soon...  :D

Quote
Only concern about your plan I have is that if you use i2c master slave, then the slave end can't read its RTC since the RTC is on i2c and a slave can read at will. Have you thought about that or do you only need RTC on master, which is fine?


Oh dear! Thanx for the heads up. I really hadnt thought of this problem.  :smiley-eek-blue: Oh this does put me in a pickle. I wanted slaves also to have an RTC.  :( Now gotta think about how to go about it.  :(  any suggestions?? One idea that comes to mind is make master only as RTC and send time to slaves over i2c?

@liudr U think I should stick on with i2c. Still distance is problem right??  :(

Quote
The RJ45 Porto should take care of connecting things up at long distance.

I didnt quite get this.  :|


liudr

Hey,

I am pretty sure that with proper cabling I2C can easily go up to maybe order of 10 feet or 4 meters. All PC monitor cables with extension cables are examples of such arrangement. An I2C EEPROM on the monitor gets powered by the PC video card so the video card knows what display modes are available. I don't remember whether the cables are shielded or not though. What I meant my phi-2 shield has 2 RJ45 positions to integrate these connectors and you can use the much more reliable ethernet cords as your I2c bus, compared with loose wires. Just use a twisted pair for SCL/GND and another pair for SDA/GND and use the other pairs all for GND if the slave has its own power. I suggest you use a stronger pullup on the bus, say 2K ohm. Then Use ethernet of various lengths to test out the reliability of your direct connect without an I2C extender. Otherwise, how about using software serial over the ethernet cord? You can always reduce baud rate if you have too much noise.



The above picture has my phi-2 shield with 20x4 display and one ethernet (RJ45 socket) on the bottom right. It's much more reliable with loose wires. The LCD pictured is running a menu with phi_prompt library BTW.

0

No...  :( I need more than 4m. So  length is still a problem.. My question is has anyone reliably tested those i2c bus extenders and does it really work?? Is there any good tutorial for that? If thats not the case Is there any other form of communication I might use with enough Background literature support?

robtillaart

switch to rs485 for distance (at the price of speed)

- http://www.lammertbies.nl/comm/info/RS-485.html -

have a look at the table in the middle (be aware that this will depend on your cabling..)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up