element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
Personal Blogs
  • Members
  • More
Personal Blogs
NexGen Flight Simuator Nexgen: CP-1252/ASN-128: Decoding the Keyboard
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 8 Aug 2021 10:39 PM Date Created
  • Views 275 views
  • Likes 4 likes
  • Comments 0 comments
  • nexgen
  • mcp23017
  • interrupt driven keyboard
  • microchip
  • i2c interface
  • diy flight simulator
  • cp-1252_asn-128
  • arduino
  • an1081
Related
Recommended

Nexgen: CP-1252/ASN-128: Decoding the Keyboard

phoenixcomm
phoenixcomm
8 Aug 2021

imageOk, the Keyboard is comprised of 3 columns, the two outer columns have 5 switches each, and the center column has 4 switches. The switches are all lights.  Pins 1 are white, are lamp Ground, pin 8, gray is lamp power. One side of the switch is jumpered together, pins 3 & 4, and there is a black wire attached as well, which makes this switch effectively an SPDT switch.

If you look down at the switch and hold the jumper (pins 1 and 2 ) on the right side, also has the black wire. The top is the normally open side, and has a yellow wire on it, so when the switch is depressed it closes. The bottom is normally closed, and has a blue wire on it.,so when the switch is depressed it opens.  There are two connectors W5P1 & W5P4 coming from the switches. So there is the quandary, there are two ways to skin this cat (keyboard).

image

A) wire each of the 14 switches to input on an MCP23017, when a key is pressed an interrupt is generated and read the expander. Done.

B) Don't screw with the keyboard anymore figure out the rows and columns a originally built. Rows go to one-half of the MCP23x08 the Columns go to the other then you need a scanner, that is triggered by a key press. Microchip has an application note  AN1081 

C) And let's not forget you can also achieve similar results as A) by using 2 7-bit priorities that are cascaded.   

KBD TGT
1 2 3
4 5 6
7 8 9
CLR 0 ENT
W5P1 W5P4
15 14 13 12 13 12 11 10 9 8
Blue Yellow Blue Yellow Gray Yellow Yellow Blue Blue Gray
Cut

Overlay

Power

  • 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 © 2023 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