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.

2 Wire simplex communication between PC and PIC ?

Status
Not open for further replies.

ItsMike

New Member
Hello,

I'm working on a spinning pov display which I want to connect to the pc.
I would like to be able to send data to the pic at the highest rate possible using only 2 wires (1 of them is the common ground).

Since it's a spinning pov display the 3 contacts (+V, GND, DATA) will be moving and probably picking up noise.

Hopefully this pic will clarify the connections:

**broken link removed**

Anyways, in order to use serial communication between the pc and the pic do I have to use an RS232 to TTL convertor (max232) ?
I've read somewhere that noways the serial port uses TTL signals.
What kind of bitrate will I be able to get from this setup ?
Is there any way (some simple modulation ?) to get a high bitrate ? around 14400 bps ?
 
forgive my ignorance but how would IR help? if its to negate the 3 connections then how can the IR beam be seen correctly from a sensor on a spinning platform?? wireless i can see how it would work but not IR
 
I would like to control the display in real time or as close to that as possible.

Wireless would be too slow or too expensive.
I doubt IR would be as fast as wired communication, especially on a spinning platform (unless I mount the IR sensor exactly on the spinning axis).
 
The IR fills the room.

i still dont het this?? if IR fills the room then why does a TV remote need to be pointing pretty much at the TV? i am not trying to be difficult but i cant understand why a very fast spinning sensor wouldnt wouldnt miss packets of data? i have done a little with IR sensors recently and i had trouble making sure the sensors were correctly allinged. maybe i am missing a trick here?
 
I think this thread is close to crashing..... Mike rs232 would be fine you can achieve bit rates up to 115000 baud... But we need to know how much data needs to be passed. The trouble here is, if you need two way communication RS232 will not suffice. Can you tell me what kind of data and the packet size, if possible. We can take it from there.

Ian

Sorry I should also have told you.... I have developed a two wire interface, using just power and ground to connect via a current driven RS232 link (one way at the moment, but there is scope).
 
Last edited:
That's very helpful, why won't you enlighten me instead.
Oh, you edited your original response :(

Ok, so you want 14400bps simplex to the PIC & were concerned about noise & also about driving RS232.

To remove the noise you can use an RC LPF followed by a schmitt trigger inverter. You need an inverter due to the RS232 having opposite polarity to a PIC UART (note: some pics can set the polarity/inversion the uart); the schmitt trigger part helps remove some of the noise. Also, make sure the RC time delay is bigger than the glitches and smaller than the bit times.

As far as using IR - that's also very feasible, if you wanted to try. Just don't use a phototransistor as the receiving element as they're very slow. Try a photodiode and AC amplifier (a few transistors). Mounting the photodiode shouldn't be that critical; while the IR transmitter will produce a nonuniform wide angle pattern, due to the high speed of transmission (i.e. the bittimes) vs the low speed of rotation of the detector, the intensity shouldn't change much during a bit time.

EDIT: you mentioned RS232 using TTL - no, it doesn't. A PC serial port will accept inverted TTL serial data; it outputs positive and negative voltages though. Normally you use a MAX232, or a resistor & diode clamp + inverter to make your uC able to stomach it.
 
Last edited:
were should be we're

What speed can you get out of IR Receiver Module - Radio Shack - 276-640. It's sensitivity is fantastic and is not affected by ambient room illumination.
 
Oh, you edited your original response :(

Ok, so you want 14400bps simplex to the PIC & were concerned about noise & also about driving RS232.

To remove the noise you can use an RC LPF followed by a schmitt trigger inverter. You need an inverter due to the RS232 having opposite polarity to a PIC UART (note: some pics can set the polarity/inversion the uart); the schmitt trigger part helps remove some of the noise. Also, make sure the RC time delay is bigger than the glitches and smaller than the bit times.

As far as using IR - that's also very feasible, if you wanted to try. Just don't use a phototransistor as the receiving element as they're very slow. Try a photodiode and AC amplifier (a few transistors). Mounting the photodiode shouldn't be that critical; while the IR transmitter will produce a nonuniform wide angle pattern, due to the high speed of transmission (i.e. the bittimes) vs the low speed of rotation of the detector, the intensity shouldn't change much during a bit time.

EDIT: you mentioned RS232 using TTL - no, it doesn't. A PC serial port will accept inverted TTL serial data; it outputs positive and negative voltages though. Normally you use a MAX232, or a resistor & diode clamp + inverter to make your uC able to stomach it.

ok that makes sense with the IR thanks for the clarifacation
 
I think this thread is close to crashing..... Mike rs232 would be fine you can achieve bit rates up to 115000 baud... But we need to know how much data needs to be passed. The trouble here is, if you need two way communication RS232 will not suffice. Can you tell me what kind of data and the packet size, if possible. We can take it from there.

Ian

Sorry I should also have told you.... I have developed a two wire interface, using just power and ground to connect via a current driven RS232 link (one way at the moment, but there is scope).

As I stated before, I aim for about 14kbps (16*96(pixels)*10(fps)). The higher I can go the better.
I have two available connections, one which is the ground and one dedicated to communication.
Also I only need SIMPLEX communication.
 
You put the micro next to the display and you only need a very small amount of up-date information via the link
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top