PDA

View Full Version : Help with a Parallel I/O to Machine Interface?



john meiers
- 15th September 2005, 16:33
I have 6 16F628's each controlling similar machine operations - need a program for a master PIC to communicate with a PC running VisBasic.net via a parallel port interface (8 I/O). The master PIC will then need to send pulses to each machine-control PIC every 3 seconds or so, as defined by the PC. I was thinking of using the first 3 I/O of the parallel port for PIC addressing, the next 3 for data, etc.

I'm fairly new at this stuff. I was able to create the code and build the small PIC units, but this is out of my league. Can anyone help me?

mister_e
- 15th September 2005, 16:38
can you use serial COM port instead? Much easier, less time consumming too!

CocaColaKid
- 15th September 2005, 16:57
Why not just create an address on each of the PICs and attach an address to the packets being sent.

john meiers
- 16th September 2005, 18:37
Ya..how would I do that? Serial would be fine, I just thought the wiring / programming would be easier with parallel. Any suggestions?

CocaColaKid
- 16th September 2005, 18:43
You could send a packet containing any number of bytes. For example you could send a 3 byte packet with byte0 being the address of the device you wish to be the recipient, byte1 being the actual command (ex. write or read) and byte2 being the actual data to be transmitted.

john meiers
- 16th September 2005, 18:50
i see...sounds good. That would eliminate a lot of work programming an intermediary PIC..plus the individuals could communicate with the computer program easier as well. How would I do the clock / timing between the comp and PICs?