This is complement unit transform new MK-EHN EME interface paralell input port (IC9-IC12)

 for serial increment-decrement pulse counters.

Original interface IC9-IC12 not soldering, and 3 controller wire connected to counter unit.


IC2 PIC 16F877 pin RE2 "LOAD"     to     PIC 16F628 RB0 "LD"

IC2 PIC 16F877 pin RE1 "CLK"     to     PIC 16F628 RB2 "CL"

IC2 PIC 16F877 pin RE0 "DATA"     to     PIC 16F628 RB1 "D"

From common AZ/EL relay power supply     to     P1    -     P2     to     AZ/EL relays power

AZ pulse sensors to AZ,    EL pulse sensors to EL inputs.


Pulse sensors HALL element or optoelectronic for open collector outputs, sensing rotation number and

directions from motor gears.

In circuit PIC microcontrollers count and transform pulse numbers from

 gear ratio to 360/65536 ratio.

Original PIC read coordinate instead of IC9-IC12 from serial 3wire-bus pulse counter.

If power OFF, controllers sensing power supply voltages if decrement bellow 9V, switch off az/el relays power, motors spin down, if voltages

decrements bellow 8V save actual coordinates to internal flash memory.(time interval settings 1000uF on 12V power line)

If next ON state, read previous coordinates from memory.

If press buttons and switch OFF at the same time, not save actual coordinate (calibration possibility).

Set F1EHN program system parameters, AZ and EL encoder format BIN type.


Download HEX file to PIC16F628


After programing, write manualy data flash puffer gear ratio (max. 65535)  in

 pic programmer software.


Actual coordinate:

Byte0: AZ LSB

Byte1: AZ MSB

Byte2: EL LSB

Byte3: EL MSB


Gear ratio:

Byte4: AZ LSB

Byte5: AZ MSB

Byte6: EL LSB

Byte7: EL MSB