View Single Post
Old 01-21-2017, 04:48 PM   #2980 (permalink)
motorulf
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
OK, here are the DIFF-files for my reverse function hack.
I used source code from Jan-06-2017.
Paul, may i attach that version of source code here?

Diff.zip

It uses the ICSP header for input and the LED output as an indicator.
No settings for reverse-amps, so you get full power backwards.
Use this at your own risk!!




I forgot to add the resistance...
Put resistor values as suggested here, it worked good for me:
Quote:
Originally Posted by thingstodo View Post
I would add a couple of resistors on the board, and one in series with the switch, to limit the max current into the micro.

Perhaps a 22K from Vcc (whether that is 5V or 3.3V) or your top trace on the board to the PIC pin or middle trace on the board. A 10K resistor from the PIC pin, or middle trace on your board, to Gnd, the bottom trace on your board. This one is shown as 'some resistor. That sets up a voltage divider for about 1/3 of Vcc on the input pin, which should read as 0 or OFF.

The switch would go in series with a 2K2 resistor - top trace to your switch .. green wire ... which is now wired in parallel with the 22K resistor. That sets up the PIC pin for about 85% of Vcc and should read as 1 or ON.

These resistor values are ones that I typically use. They limit current under 3 mA and are easy to buy. I didn't look up the specs on the PIC, but I don't expect any issues with low current into the PIC pin.
This was a comment to this:

Making it:

Last edited by motorulf; 01-21-2017 at 04:56 PM.. Reason: adding more stuff
  Reply With Quote
The Following 2 Users Say Thank You to motorulf For This Useful Post:
kalidasbala (01-22-2017), MPaulHolmes (01-21-2017)