FSKey6r3

This file includes the original Toggle to pulse output code which is dis-abled in favour of the Rotary Encoder routine: I will sort it out if any one is interested.
Eight toggle switch changes are reflected through to PortB as pulse outputs or
Four Rotary Encoders can be used but note that all changes are sent to a single pair of outputs as would be suitable for Flight Simulator key function: Inputs are made to PORTA in sequential pairs 'AB' with 'A' on even numbered inputs and 'B' on odd numbered inputs.

This is a basic routine for a PIC 16F62X series micro-controller that provides a positive 'true' output on PORTB bit6 or bit7 for rotation in the opposing directions and both 'low' when no change is detected. PORTB bit5 gives 5mSec positive 'true' pulse when any valid change is detected;
PORTB bit5 is pulsed positive 'true' for about 200mSec after power-up as indication of readiness.
PORTA are inputs and PORTB b5,6 & 7 are the outputs.

Inputs should be hardware "de-bounced" to complement the software "de-bounce" function and Schmitt trigger inputs: a suggested circuit is available.
The outputs can be used to drive a 2N7002 FET which are coupled to the keyboard = & - keys for the increase/decrease function: a suggested circuit is available.
The software FSKeys6 is part of a larger programme that provides a simulated key-press for toggle input that is not included here. The software is Copyright but may be freely used for non-commercial purposes; please contact me for permission for use in commercial activity.


Toggle Switch & Rotary

Back to Home page

13:53 21/10/2016

content generator: Lotus Word Pro & MS Notepad