LCD problems when EBIT is changed


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello,

    Yes I did understand he is on RA5 and what he is using each pin for but wouldn't the lack of a pull up also affect the proper operation if he didn't have a high level on RA4?

    BobK

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BobK View Post
    Hello,

    Yes I did understand he is on RA5 and what he is using each pin for but wouldn't the lack of a pull up also affect the proper operation if he didn't have a high level on RA4?

    BobK
    DOH! No kidding... RSREG is on RA4...duh.........
    BUT...that would also mean that the LCD never worked in the first place.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    DOH! No kidding... RSREG is on RA4...duh.........
    BUT...that would also mean that the LCD never worked in the first place.
    That was my thinking, I assumed it was working with the e bit hooked to PortB and he only moved that.
    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.

  4. #4
    Join Date
    May 2007
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    I havenot yet find the reason why my RA5 connection would not work, but I found an alternative solution by using mister_e's keypad routines to connect my keypad to different ports. Thank you mister_e!

    However, I still have a problem:
    I have connected my 4x4 keypad to pin 4-7 of PORTB and PORTC and is using the following code to send the keypad output to the LCD:

    DEFINE KEYPAD_ROW 4 ' 4 ROW keypad
    DEFINE KEYPAD_ROW_PORT PORTC ' ROW port = PORTC
    DEFINE KEYPAD_ROW_BIT 4 ' ROW0 = PORTC.4
    DEFINE KEYPAD_COL 4 ' 4 COL keypad
    DEFINE KEYPAD_COL_PORT PORTB ' COL port = PORTB
    DEFINE KEYPAD_COL_BIT 4 ' COL0 = PORTB.4
    DEFINE KEYPAD_DEBOUNCEMS 200 ' debounce delay = 200 mSec
    DEFINE KEYPAD_AUTOREPEAT 1 ' use auto-repeat feature

    PAUSE 500
    LCDOUT $FE,1,"Initializing ...."
    Pause 1000

    INCLUDE "KeyPad.bas"
    start:
    @ READKEYPAD _myvar
    lcdout $fe,1
    lcdout " Key Value = ",DEC2 myvar
    GOTO start

    If I press a key on the keypad, then the correct key value is displayed, thus I know my keypad is connected right and working, BUT while no key is pressed on the keypad, different key values are being displayed as if a key was pressed, e.g. key value = 20, 13, 20, 05, 20, 09 .......
    Every second value is a 20?
    Why is this happening and how can I get rid of key values being read while no key was pressed?
    Thanks for the help thusfar!

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm sounds like you miss to install the Pull-up resistors?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    May 2007
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Steve

    I have 270 ohm resistors on the 4 PORTC pins.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Between the i/o and VCC?


    EDIT:::: MIIP they have to be connected on PORTB, between i/o and VCC.

    EDIT2:::: You could also try to use those internal...
    Code:
    OPTION_REG.7=
    Last edited by mister_e; - 12th June 2007 at 21:49.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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