i am looking to control 16 devices on one side with 16 switches on the other side and vise versa. thats 32 i/o. right now i would be running a 50 cond. cord between the two boards. i would like to run one or two fiber optic cables between the two boards. or i can also run a cat 5 cable between. i just need to be able to have 16 signals go both ways at the same time. please help me. :? :?:
i am looking to control 16 devices on one side with 16 switches on the other side and vise versa. thats 32 i/o. right now i would be running a 50 cond. cord between the two boards. i would like to run one or two fiber optic cables between the two boards. or i can also run a cat 5 cable between. i just need to be able to have 16 signals go both ways at the same time. please help me. :? :?:
You seem to be looking for the most complicated and difficult way you can find?, how far apart are the two boards?.
Basically you simply convert the parallel data to serial and send it down a link, at the receiver end you convert it back, PIC's would be ideal for this!.
The kind of link you use depends on a number of factors, how far it's got to travel, speed required etc.
The simplest would be a single wire each way, with a common ground - for longer distances you could use RS232, IR links, radio links, optical linkks etc.
You could certainly do it in hardware, but it would be FAR more complicated than software - don't forget you need to synchronise the two ends - this usually means start and stop bits, and possibly parity bits.
How far apart are you wanting to go?, and how fast?.
You should be able to do that quite easily down a piece of wire, particularly as speed isn't an issue. It would perhaps be an idea to use a MAX232 at either end, the +/-12V of RS232 travels better than 5V.
As for PIC programming it's really like any other kind of programming. For your application, requiring 16 inputs and outputs, this would require two 8 bit bytes sending and receiving, you could either do it like that (but it would require some kind of synchronising code (to make sure the two bytes are the correct way round). Or you could ignore the 8 bit UART, and use a software one - but make it a 16 bit UART rather than an eight bit one. This would give an 18 bit word, start bit, 16 data bits, and a stop bit.
im not used to computer programing. i dont know to much about the programing of the pic. i am used to plcs from allen braddly. those i can program. the pics look like they are more along the lines of computer programing. i dont know how to do that.
im not used to computer programing. i dont know to much about the programing of the pic. i am used to plcs from allen braddly. those i can program. the pics look like they are more along the lines of computer programing. i dont know how to do that.