Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Custom MCU -MCU comms

Status
Not open for further replies.

Mosaic

Well-Known Member
Ok, this is a bit new to me.
I've done some reading up etc on the one wire Maxim PIC 16f628 comms.

I have some constraints as it wasn't originally planned.

I have one PIC 16F adc capable pin available. I have 2 tasks.

1) receive a 0-5V sensor signal, expected range about 0.5 to 1.5V max. Sample this signal faster than once per minute.

2) Master transmit (simplex) a fixed 4 bytes of changing data on a continuous basis. No acknowledge required. Data rate at 1 bit per mSec is reasonable.

3) Wire length perhaps 6 feet. Up to 4 slave receivers. Common ground.

So far I have determined that the range of signal from the sensor drive does not change the logic state of the comm. wire once we use a 270 Ohm adc pin resistor and a 1k ohm resistor from the sensor signal. Therefore the initial plan is to have all the slaves as digital inputs and occasionally switch the master Xmit pin to an ADC analog pin to sample the sensor. For the rest of the time (99.9%) some sort of sequential data is sent from the Master as a digital output.

Thus there needs to be a way to signal the slaves that fresh data has started, and a way for the slaves to know which bit (of the 32) is being sensed. Based on Maxims approach, perhaps using a long High bit for a fixed period can trigger the 'start' and shorter High bits can signal the bit transitions. With a max Sensor Volt of 1.5, the sensor should never send the line high even when the Master has switched to analog ADC mode. The duration of a low bit determines whether the bit transmitted is a 0 or 1. After receiving 32bits the slaves require another long 'HIGH" reset before receiving once again.


Is there anything I am missing here? I'd like advice on the approach.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top