input logic threshold level for pic 16F628


Results 1 to 5 of 5

Threaded View

  1. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Thats Great Al! Love the follow thru!

    I've been trying to figure out how that might work with the TTL levels.
    I keep coming up with Butkis. But I could be missing the point.

    The main problem I get hung up on it that pressing keys 1,1 and 1,2 at the same time, is electrically identical to pressing 1,3. And the problem repeats throughout the rest of the keypad.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3073" /><!-- Name:  2Buttons.bmp
Views: 4617
Size:  139.0 KB -->

    So I figured they had to be different somehow, and that difference has to be readable on chips that don't have A/D. Like the 16F628 already in play.

    I never like adding more parts, but I think they may help to decide if a keypress is valid or not in this case.

    If the schematic looked something like this ...

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3077" /><!-- attach]3077[/attach] -->

    Then all the rows can be set HIGH and when any key is pressed it should get a PORTB change interrupt as expected. And the key can also be read as planned.

    But then, it can do some additional testing to look for double keypresses, by measuring RCTIME or equivalent capacitor discharge times.

    The resistor R1 - R4 values would indicate how many diodes (bits) should have been read. Columns with 1 diode have the lowest value and should discharge fast. Columns with 2 diodes have a resistor that increases the RCTIME to indicate 2 bits. 3 diodes and 4 diodes per column have progressively larger resistors.

    The idea is that if you receive a key with 3 bits = 1, then the RCTIME should also indicate 3-bits as a check/balance. Pressing any other keys simultaneously will give an incorrect "Check".

    I haven't figured out any part values or code snippets since I'm not sure if the concept will work.

    Maybe someone can see why it won't work, and we won't have to.
    Attached Images Attached Images  
    DT

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  2. Replies: 0
    Last Post: - 2nd February 2009, 23:23
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. Logic Level Triac
    By emavil in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th November 2006, 18:18
  5. Input
    By ECaro03 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 2nd December 2004, 19:56

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