element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator NexGen Flight Simulator: Hacking the Navigation Computer Display: Keyboard & Switch Interfaces
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 17 Oct 2018 12:59 AM Date Created
  • Views 407 views
  • Likes 3 likes
  • Comments 0 comments
  • diy cockpit
  • design overview
  • software overview
  • arduino
  • diy electronics
  • nexgen flight simulator
Related
Recommended

NexGen Flight Simulator: Hacking the Navigation Computer Display: Keyboard & Switch Interfaces

phoenixcomm
phoenixcomm
17 Oct 2018

image>have talked about the CP-1252/ASN-128 before Hacking The Navigation Computer Display. I have changed my mind about using a ps2 decoder to interface with the keyboard. I will write my own. It's about 30 lines of code, not including Scanner.h  (prototypes) and Matrix.h which describes the 2 dimension array for the keyboard.<image

The Switches where made by Clare Pendar (Now Visualux) Pn: S180 11D5F4 and are very pricey. Thankfully I have about 3 of these units in various stages of disrepair so parts thankfully are not an issue.

Analysis: The Keyboard consists of 14 STDP switches, they also have a light keycap. They are arranged in three columns where the outside columns have 5 switches each and the middle column has 4. Each switch has pins 1 and 2 jumpered together forming an SPDT switch.

Connector Goes To:
W5P1 Keyboard
W5P2 Thumb Wheel Switch 1
W5P3 DISPLAY Switch 1
W5P4 Keyboard
W5P5 Thumb Wheel Switch 2
W5P8 Relay - Remove
W5P9 MODE Switch 2
Connector Pin color Goes To:
W5P1 12 yellow 0, 1, 2, 3
W5P1 13 blue
W5P1 14 yellow ENT, CLR, KBD
W5P1 15 blue
W5P4 8 gray
W5P4 9 blue
W5P4 10 blue
W5P4 11 yellow 4, 5, 6, 7
W5P4 12 yellow 8, 9, TGT
W5P4 13 gray
  • First I used a DVM to check which yellow wire went where, as you can see in the table below.
  • But the blues where a mess but junk box comes to the rescue. I had remains of an old project that had some led mounted on a header connected to a resistor pack. Now this will do. So I just connected the 4 LEDs to the blue wires on the two connectors (W5P1 & W5P4) and put 5 volts and the rest is history, as you see the table below.

This is the first cut off my keyboard scanner as you can see I have not included anything for de-bounce, etc. if scan() returns an alphanumeric character we are good to go. If scan() returns -1 then nothing there.

 

PS give a break with the code I know there are some errors here but you get the idea.

 

scan.c

/*

*  CP-1252.scan.c

*

*  Created on: Oct 16, 2018

*      Author: Harrison

*/

 

#include "Scanner.h"

#include "Maxtrix.h"

 

char scan () {

   int state;

   char varchar = -1;

   int row =1;

   int col;

 

// Start rows in known state

   for (row = 1; row < 5; row++) {

      digitalWrite( row, HIGH);}

 

// Seach for a row + col

   do {

       for ( col=1; col <=4; col++ ) {

           if ((state = digitalRead(col)) == HIGH) {

              break;}

           else {

                varchar = Matrix[row][col];

                  }}}

   while( row < 5 );

retrun( varchar);

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube