How to transfer data from 3 micro to 1

Status
Not open for further replies.

amindzo

Member
Hi, i want to transfer some data from 3 micro controllers to one micro. i don't want to use wireless transmission. the distance between micro controllers are at least 10 meter. i use PIC16F877A and picbasic pro 2.43, could you help me?
 
Hi, i want to transfer some data from 3 micro controllers to one micro. i don't want to use wireless transmission. the distance between micro controllers are at least 10 meter. i use PIC16F877A and picbasic pro 2.43, could you help me?

hi,
You could consider RS232, the PIC's hardware UART and two software UART's.
 
i haven't do that before and i don't know about UART , could you introduce some websites that have sample project to learn UART?
 
i haven't do that before and i don't know about UART , could you introduce some websites that have sample project to learn UART?


hi,
Look here for PIC assembler tutorials.
 
Last edited:
You could just use standard 5V TTL signals. Drive the RX/TX lines with a MOSFET transistor, something like a 2N7000. It's a short distance and you won't have any issues driving the lines or from noise. You could implement crude error detection like parity as well. It's simple and easy. I would set the receiving µC as the master to control the bus and the sending units as the slave. You could use polling for control or async. But it's hard to say. You could expound a little so we have a better understanding of what you are doing.
 
Hi,my friend suggest that you use a multi cable to connect one port to another port of main micro(8 wire,for example PORTB of micro 1 to PORTC of main micro) and use PEEK and POKE instruction. you put one byte on a port and read it from main micro and you should make a time program to read data on time.
but it is not a good method. it's need a lot of wire and the distance can effect on the voltage,current and also we have noise.
 
thanks but i use picbasic pro 2.43 and i'm not good in assembely.

hi,
I have just downloaded PicBasic demo to look at the commands.

It has hserin/out for the serial port also ASM [assembler].

Why cant you use hserin/out for the serial link.?
 
i know but the distance is long and we have noise and i have to add some codes like haming codes to find and correct the fault, i have done it before with wireless transmission with haming code but it doesn't work when i connect it with wire(a wire from,for example ,PORTC.0 to PORTC.0 of main micro), i have more faults.
 

hi,
For 10mtrs you should use a cable with an outer screen and if possible individual twisted pairs.

Using MAX232 line drivers/receivers, this cable will carry RS232 at +/-9V upto 30mtrs without problems.

What cable links did you try.?
 
hi,
For 10mtrs you should use a cable with an outer screen and if possible individual twisted pairs.

Using MAX232 line drivers/receivers, this cable will carry RS232 at +/-9V upto 30mtrs without problems.

What cable links did you try.?

I agree with Eric. 10 meters should be no problem, and I doubt you will need to mess around with hamming code...

If it is really noisy, then use rs485 or rs422 drivers on the UARTs with a twisted pair between them and you should have no trouble.
 
if i want to use serin and serout instructions, can i connect(for example) PORTB.0 of micro 1 to PORTC.1 of main micro with wire directly?(with 10 to 20 meter distance)
 
if i want to use serin and serout instructions, can i connect(for example) PORTB.0 of micro 1 to PORTC.1 of main micro with wire directly?(with 10 to 20 meter distance)

Well you could, but you said there was a lot of noise. The Max232 or similar driver will give you a much stronger signal, thus more reliability, but you could do it with out.

Why don't you give it a try with just the wire, and see how well it works? Then, if not, you can plan another way.
 
Hi, which cable i should use for this application to avoid noise problems and if i want to use MAX232 how should i connect it to microcontroller ? could you show me the diagram and the code in picbasic pro with serin and serout instructions?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…