Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You do need decently stable clocks for 232 and friends. Anything clocked by an RC oscillator is probably going to cause some sadness eventually.

I2C is terrible in so many ways. (Don't send it off-board. Just don't. Ever. Trust me on this one. I don't care what you read about the bus capacitance spec, do. not. do. this.) Sending out a clock on a 400pF on-card bus isn't too bad, but when you have a kilometer-long cable... yeah, we'd rather not send a clock down that, thank you. Hence the use of self-clocked or pray-we-have-similar-clock-frequencies protocols.

3.3V or 5V devices aren't RS-232 and people need to be careful about that. They're just UARTs with regular old logic levels. RS-232 or 422 or 485 are Serious Business levels to go out and do battle with the mean Real World and the only place they should ever land is at a dedicated transceiver. Full stop.



Are you saying beware of i2c on a kilometer long cable?! Why would anyone even think that would be feasible?


No, I'm saying you can't send I2C one meter off-board. Even six inches in anything but a gentle EMC environment can be severe trouble without careful design. And yet I've seen people try to run it ~180cm next to horrifying noise sources. Surprise, surprise, that doesn't work out very well.

The root of the problem is that I2C has serious EMC immunity issues. It's well known and appreciated that its drive is weak and open-drain. The bus buffers and especially differential drivers can and do help there. (And will get you past a meter.) What's less well recognized is that a single glitch pulse on SCK knocks all the internal state machines out of whack and requires a bus reset to fix them. Hope you're doing that when your bus is idle or when you're getting anomalies! Most people don't. The Nexus 4 phones sure didn't; this is why their light sensors went dead or crazy or both after a while of uptime.

All of that gets easier to handle if there's a nice, big, low-impedance ground plane nearby, which is why you don't see so much trouble when it stays on the PCB.


https://www.nxp.com/docs/en/data-sheet/P82B96.pdf lists 250m as an option for whatever you'd want to do with that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: