element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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: Navigation Computer Display: Keyboard Switch Interface: v2
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 23 Nov 2020 11:44 PM Date Created
  • Views 426 views
  • Likes 1 like
  • Comments 2 comments
  • mcp23017
  • keyboard scanning
  • interupt
  • arduino mega
Related
Recommended

NexGen: Navigation Computer Display: Keyboard Switch Interface: v2

phoenixcomm
phoenixcomm
23 Nov 2020

I have blogged about the Navigation Computer Display's Keyboard here. I was moving a 6821 PIA to its resting place and checked my Databooks where I found a pdf copy of the 6800 application manual. where they had a 4x4 keyboard interface. It was based around a row and column decoder but one cool thing added to it, and no diodes.image

imageimage

And this has one more trick provided by the quad input NAND-Gate. Now an MCP23017 will work very nicely. It has interrupt outputs. But if you don't want to use this part this will still work on your Arduino.

Here is the keyboard mapping:

int keyMap [][] = {1, 2, 3}, {4, 5, 6}, {7, 8, 9}

{A, 0, B}, {C, F , D};

int alphaMap[][] = {A, B, C}, {D, E, F}, { G, H, I}, {J, K, L}, {N, N, 0}, {P, Q, R}, {S, T, U}, {V, W, X}, {Y, Z}

A0123
A1456
A2789
A3CLR0ENT
A4KYBDn/aTGT-STR
B0B1B2

The scanner is now just two loops one inside each other:

int scaner(){
int row;
int col;

    for ( row = 0; row < 6; row ++) {
          digitalWrite( row, HIGH ); 
        for ( col = 0; col < 4; col++) {
              if ((state = digitalRead(col)) == HIGH) {
                    break; }
              else {
                return( keyMap[row][col];)
          }}}}             

There is a problem with the alphaMap as it does not reflect what happens with an alpha keystroke, as it is not just one keystroke but a combination of two keystrokes. The following is from TM 11-5841-281-12, OPERATOR'S AND ORGANIZATIONAL MAINTENANCE MANUAL DOPPLER NAVIGATION SET section 3.5:

Data Entry. To enter a number, press the corresponding key. To enter a letter, first press the key corresponding to the desired letter; then press a key in the left, mid, or right column corresponding to the position of the letter on the pushbutton. For example; to enter an L, first press L, then either 3,  6, or 9 in the right column.

To accomplish this task a state table must be built, which has direct consequences on the MCD's displays.

 

BTW the scanner on the left is not the scanner for the keyboard, the scanner is a state table but everything is rolled up into it. Alpha Keys, Numeric Keys, and the four special keys CLR, ENT, KYBD, TGT-STR. As well as the position of both rotatory switches Mode and Display.

~~Cris

  • Sign in to reply

Top Comments

  • DAB
    DAB over 4 years ago +1
    It will be interesting to see if you get any key bounce. DAB
  • phoenixcomm
    phoenixcomm over 4 years ago in reply to DAB +1
    DAB Most likely yes, but followed by a Schmitt Trigger. That should take care of any bounce. But I'm short of caps, and need to buy some. But currently, on the other project running Schmitt Triggers, two…
  • phoenixcomm
    phoenixcomm over 4 years ago in reply to DAB

    DAB Most likely yes, but followed by a Schmitt Trigger. That should take care of any bounce. But I'm short of caps, and need to buy some. But currently, on the other project running Schmitt Triggers, two together in series and that seems to work.

     

    ~~

    Cris

     

    BTW Love your comment and the three stars but how about a  like?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 4 years ago

    It will be interesting to see if you get any key bounce.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
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