PDA

View Full Version : Remote PIC input question



Adrian
- 1st September 2007, 09:46
Not strictly a PBP programming question but I hope not too far off topic for someone to offer me some advice. I'm planning a conbined lap counter/timer and will be selecting 6 or 7 functions by earthing normally held high pins (pull up resistors) on the PIC. The selection will be made on a small portable control panel 6 or 7 metres from the main unit and PIC, wired down a multicored cable. My question is...is it acceptable to earth PIC input pins at this distance or is it either mandatory/safer or wiser to earth say via local optical isolators, controlling these from the control panel.

Some advice would be gratefully received

Thank you

Adrian

muddy0409
- 1st September 2007, 12:26
My 2 cents worth is:
As long as the earth connection is part of the multicore cabling and the function you are selecting is not critical enough to be effected by contact bounce, (which could be defeated in software anyway), then you should be OK. I would certainly try this way before goping to other additional components. I have in fact done similar with a timing unit where the remote switching just selects the function but not the starting or stopping of the actual counting. This is done in software at the main unit and has nothing to do with the remote gear.

Adrian
- 1st September 2007, 15:44
Thanks Peter
Sounds a good piece of advice. I must admit I started off without thinking about opto isolators but have got a bit 'windy' - hence the question. I am debouncing the 'clock' inputs for the lap counter in software but these remote panel selectors are far less fussy, so I'll try the simple way first. Thanks for your advice. By the way we have an Australian visitor staying with us at present - he flew over to the UK to take part in some model team race flying National event we have here each August. He is from Parkville in the centre of Melbourne

Regards


Adrian