Matrix keyboard with State Machine


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Matrix keyboard with State Machine

    Thanks to all!

    Ioannis

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Matrix keyboard with State Machine

    I did this a long time ago with a 4X4 membrane switch to play messages on an ISD chip.

    Low PORTC.7
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE1
    IF PORTB.2 = 0 Then MESSAGE9
    High PORTC.7

    Low PORTC.6
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE2
    IF PORTB.2 = 0 Then MESSAGE10
    High PORTC.6

    Low PORTC.2
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE3
    IF PORTB.2 = 0 Then MESSAGE11
    High PORTC.2

    Low PORTC.1
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE4
    IF PORTB.2 = 0 Then MESSAGE12
    High PORTC.1

    Low PORTC.0
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE5
    IF PORTB.2 = 0 Then MESSAGE13
    High PORTC.0

    Low PORTA.0
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE6
    IF PORTB.2 = 0 Then MESSAGE14
    High PORTA.0

    Low PORTA.1
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE7
    IF PORTB.2 = 0 Then MESSAGE15
    High PORTA.1

    Low PORTC.4
    Pause 1
    IF PORTB.4 = 0 Then MESSAGE8
    IF PORTB.2 = 0 Then MESSAGE16
    High PORTC.4

Similar Threads

  1. another state machine example
    By richard in forum Code Examples
    Replies: 2
    Last Post: - 19th October 2021, 12:27
  2. Matrix keyboard for up to 32 keys
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st June 2009, 01:43
  3. Keyboard Matrix with a Twist
    By k3v1nP in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 29th October 2008, 10:51
  4. State machine programming
    By tjstevens in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th April 2007, 22:45
  5. Matrix keyboard problem
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th May 2005, 18:50

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts