I was wandering if anyone could program a PIC for me, I've finally got the spec sorted.

1 analouge input

1 digital input

4 digital outputs (A,B,C,D)

Here's what I want it to do.

When digital input = 1, outputs A,B,C & D = 1 regardless of analouge input.

When digital input = 0

if analogue in = 0v A,B,C & D = 0

if analogue in = 0.21v A = 1 B,C & D = 0

if analogue in = 0.62v B = 1 A,C & D = 0

if analogue in = 0.79v A & B = 1 C & D = 0

if analogue in = 1.02v C = 1 A,B & D = 0

if analogue in = 1.31v A & C =1 B & D = 0

if analogue in = 1.67v B & C = 1 A & D = 0

if analogue in = 2.08v AB & C = 0 D = 1

if analogue in = 2.42v A & D = 1 B & C = 0

if analogue in = 2.54v B & D = 1 A & C = 0

Also some error margines would be great, ie

if anaglogue in < 0.1v A,B,C & D = 0

if analogue in > 0.1v & if analogue in < 0.4v A = 1 B,C & D = 0

However I'm not too bothered where the error margines lie aslong as they are about half way between the input values.

If anyone could do this for me it would be great, I am more than willing to pay for it. Also I have the post AtoD values for the analogue input if that helps.

Rob

PS, The whole think is an interface for a Sony joystick.

1 analouge input

1 digital input

4 digital outputs (A,B,C,D)

Here's what I want it to do.

When digital input = 1, outputs A,B,C & D = 1 regardless of analouge input.

When digital input = 0

if analogue in = 0v A,B,C & D = 0

if analogue in = 0.21v A = 1 B,C & D = 0

if analogue in = 0.62v B = 1 A,C & D = 0

if analogue in = 0.79v A & B = 1 C & D = 0

if analogue in = 1.02v C = 1 A,B & D = 0

if analogue in = 1.31v A & C =1 B & D = 0

if analogue in = 1.67v B & C = 1 A & D = 0

if analogue in = 2.08v AB & C = 0 D = 1

if analogue in = 2.42v A & D = 1 B & C = 0

if analogue in = 2.54v B & D = 1 A & C = 0

Also some error margines would be great, ie

if anaglogue in < 0.1v A,B,C & D = 0

if analogue in > 0.1v & if analogue in < 0.4v A = 1 B,C & D = 0

However I'm not too bothered where the error margines lie aslong as they are about half way between the input values.

If anyone could do this for me it would be great, I am more than willing to pay for it. Also I have the post AtoD values for the analogue input if that helps.

Rob

PS, The whole think is an interface for a Sony joystick.

## Comment