I can't beleive this works! :D


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default I can't beleive this works! :D

    Hi Guys,
    If you connect an LCD as described in the manual, there are exactly seven port pins left on a 16F84/628. A 3x4 matrix
    keypad generaly requires seven pins, but I was able to flog the
    LCD data port for the keypad scan outputs since no program
    will ever scan the keypad and write to the LCD at exactly the same time.. and now there's four spare pins for speakers, switches, etc.

    At the moment, the only hardware bug is holding down three or
    more keys will cause jargon on the display, so I will stay away from keypad combinations for activating menu functions.

    Now I'm thinking it would be better to use the 4 bit LCD data port
    as inputs for the keypad scan routine, and switch back to output
    for the PBP LCD libraries.
    Cheers, Art.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Post

    Art,

    If you need a couple more pins, you could use the internal oscillator of the 16F628.

    Then if you move the LCD Enable line from RB3 to RA6, you can use the CCP module (HPWM) to control the brightness of the LCD backlight.

    Just an thought.

  3. #3
    Join Date
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    Very Cool!!!
    Nice project!!!
    Great drawing also!!
    I've been able to save pins on a keypad by using an A/D input and configure the keypad wires to 11 resistors in a series voltage divider ladder.
    No button pressed is a specific voltage output from the resistive divider circuit.
    Every pad button pressed produces its own voltage.
    FUN STUFF!!! :-]

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    Hi Art,
    I feel that way every time I make something that works
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    And it still works ten years later!!


  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    Should have made a special character for #.

    Robert

  7. #7
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    Lol, that would use more memory defining the character,
    and sending it to LCD CGRAM.
    So long as I had the memory, you are right

    I think I could have also flogged pin RA4 to use any time other than when LCDOUT is printing.

    Most importantly, I should not have done this:

    Which is why I'm suprised it STILL works! Too bad if I ever dropped it.

    Now I have to hope this thread get buried again!

  8. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: I can't beleive this works! :D

    Quote Originally Posted by Art View Post

    Now I have to hope this thread get buried again!
    BUMP
    bump
    Last edited by Archangel; - 11th October 2013 at 07:18.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. PORTA.0 works, PORTB.7 or .6 do not
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd September 2009, 04:25
  2. AD works in Porta.0 but not in porta.1
    By ruijc in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 19th February 2008, 20:22
  3. Replies: 42
    Last Post: - 14th January 2008, 11:38
  4. TMR1 How it works?
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 12th January 2007, 14:24
  5. 16F628A using PORTA.4, and it works, but...
    By zx81 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th August 2005, 08:45

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