document updated 22 years ago, on Mar 23, 2004
Looking for a way to network multiple PICs together, with a single PIC getting its data eventually to Parallel/Serial/USB so the laptop can use it.
- hunt and peck
- semi-speced-out buses
- Van Ooijen's WBus
- Peter Jakab's pbus (includes packet definition)
- Basic Stamps contain some intercommunication?
- The SimmStick uses I2C on its standard connector
- It looks like just about any of I2C/RS232/RS485 have to have an application-specific design of things like packetization, acknowledgements, checksums, collision-avoidance, etc.
- I2C
- I2C faq lists various things about bus length (3-4 meters at highest speeds) and things to do to extend/stabilize the bus
- master-slave with only master initiating is much easier
- I2C library for collision detection, acknowledgement, etc...
- Various datasheets for I2C chips that include descriptions of their I2C protocols: AT24C32,
DAC8571
- random:
one,
two,
- RS-485
- RS485 is multi-drop with differential signalling. Since the PIC doesn't support either of these with its bare hardware, a common hack is to hack together multi-drop without the differential signalling because that requires few external components. (like this)
- Although real 4-wire RS485 drivers are only 68 cents for each node, and probably take up less space than a discrete-component non-differential solution (and are hella-good for a noisy car environment, see these appnotes)
- brief description of how to do hacked multidrop
- advantages:
- 16F628's can do it in hardware (they can't do I2C in hardware)
- because it's multi-drop very similar to RS232, attaching a PC to the bus is potentially trivial, possibly no different than attaching another PIC (though timing issues and master/slave issues get much more complicated if there's not a PIC mediator (though some special dual-master protocol could conceivably be worked out... it'd still not be P2P though))
Other details...
- The 16F877 supports simultaneously talking I2C and RS232 (eg. USART and MSSP modules are on separate pins... TX/RX and SCL/SDA). This setup would also allow in-circuit reflashing with no extra hardware.
- 16F628s (and anything similar) don't include I2C, even in slave mode only
Is this really needed? Connections I'd like to eventually make...
- USB/PIC power control
- spedo (~100hz) + tach (~100hz)
- fuel injector pulse-width (4 * RPM) (damn, looks like this guy has it completely covered)
- neutral position switch + clutch-depressed sensor
- OBDII diagnostics port
- one or two LCD displays
- potentially lots of other things