Key fifo


Closed Thread
Results 1 to 2 of 2

Thread: Key fifo

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838

    Default Key fifo

    Hi guys , i having some trouble getting my head arround doing a fifo for keys , what i need is FIFO which goes upto 5 deep ,

    so as progressively 5 keys are pressed , the array builds down , and the newest key is Key_array(0) , oldest is Key_array(4) , if key_value = 10 then clear the values from array

    regards

  2. #2
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Key fifo

    Code:
      if key >0  then 
      
       for Key_count  = 4 to 1 step - 1 
           Key_value(Key_count) = Key_value( Key_count - 1)
       next Key_count     
     
        Key_Value(0) = Key
       endif
    this seems to work

Similar Threads

  1. USB key not found
    By shrtrtrt in forum General
    Replies: 3
    Last Post: - 20th April 2011, 15:12
  2. VDIP used in FIFO mode
    By Jacques in forum General
    Replies: 0
    Last Post: - 18th May 2010, 10:19
  3. Key Pad Project
    By AMay in forum Schematics
    Replies: 5
    Last Post: - 3rd April 2007, 21:14
  4. Key Pad Matrix
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th November 2004, 23:50
  5. Electronic Key
    By Carl0701 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th February 2004, 10:01

Members who have read this thread : 1

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