​ ​ ​ ​ LCD Keypad Shield
Results 1 to 5 of 5

Thread: LCD Keypad Shield

  1. #1

    Default LCD Keypad Shield

    Can be found for less than $5 which seems like good value.
    the unique thing it has 6 key switches to get your project up and running quickly.
    there seem to be a lot of different makes but all seem to work identically.

    Unlike older LCD's these new 1's work happily at 4v you just need to adjust the contrast to suit.
    when you power up you will also find the backlight led will be at full brightness.
    If you want to reduce this send a low signal to D.10 the transistors base which controls it.
    If your using the RST switch it needs to have a pullup resistor.

    The code example shows the pinouts and how we can connect to a 20m2
    - dim the backlight using hpwm
    -display keyvalues on the LCD from O to 6 depending on the key pressed
    if you press multiple keys the lower valued or reset takes priority.
    Code:
    '#Picaxe 20m2         .------------------------.
    '                     | LCD KeypadShield       |
     SETFREQ M32       '  |         _ _ _ _   Aref |
    '                     |        |       |  GND  |
     dirsB = %00001111 '  |        |       |  D.13 |    B.7  Hi2C SCL
     dirsC = %10111111 '  |        |       |  D.12 |    B.5  Hi2C SDA
    '    %-------- C.6 -->|  RST   |       |  D.11 |
    '(requires pullup)    |  3V3   |    16 |  D.10 |<-- C.4  SwitchLED(optional)
    '    RST Sw 5      -->|  5V    | 2   6 |  D.9  |<-- C.3  Enable
    '                  -->|  GND   | 1   4 |  D.8  |<-- C.2  RS
    '                     |  GND   |       |       |
    '                     |  VIN   |       |       |
    '                     |        |VDD 15 |       |
    '                     |        |    14 |  D.7  |<-- B.3  DB7
    '                     |        |    13 |  D.6  |<-- B.2  DB6
    '   %-%-%-%-%- C.7 -->|  A.0   |    12 |  D.5  |<-- B.1  DB5	
    '  SELEC Sw 4         |  A.1   |    11 |  D.4  |<-- B.0  DB4
    '   LEFT Sw 3         |  A.2   |       |  D.3  |
    '   DOWN Sw 2         |  A.3   |_ _ _ _|  D.2  |
    '    UP  Sw 1         |  A.4         TX / D.1  | 
    '  RIGHT Sw 0         |  A.5         RX / D.0  |
    '                     |___               ______|
    '                         \_____________/       
         
     	SYMBOL RS        = C.2
    	SYMBOL E         = C.3
    	SYMBOL RSTswitch = pinC.6
    	SYMBOL Switches  = C.7	
     	SYMBOL senddata   = b0  		
     	SYMBOL index      = b1
    	SYMBOL pushbutton = b2
     	
    	TABLE   0, ($33,$32,$28,$0C,$01,$02,$06)  '(4Bit)(2line/5x8)(Display On)(Clear Display)(Return Home)(Entry Mode Set)
    IntialiseDisplay:
                     hpwm 0,0,%0010,240,120         ' mode,polarity,B,period,duty (diM lcd LED C.4) @5v duty 000 16ma / 120 21ma / 35ma not connected
           FOR  index = 0 to 6                      ' total current includes 20m2 (about5ma)        @4v duty 000 12ma / 120 16ma / 23ma not connected
     READTABLE index, senddata : pinsB = senddata /16 : PULSOUT E,1 : pinsB = senddata : PULSOUT E,1' Initialise LCD/OLED
      	NEXT index  :  PAUSE 10		
    Menu: 
     ReadADC Switches,pushbutton : pushbutton = pushbutton  *6 + 293 /300        'check pushbutton status 0 to 4
      IF RSTswitch = 0 THEN : pushbutton = 5 : ENDIF                             'check reset 5 overide
                                                                                 'value 6 no button pressed 
    	pushbutton = pushbutton + "0"                                          'convert to ASCII for display										     
    Display:
                LOW  RS                                     ' commandmode 
                senddata = 128 : pinsB = senddata /16 : PULSOUT E,1 : pinsB = senddata : PULSOUT E,1' (128-147) Line 1 Cursor Position
    
               HIGH RS                                      ' charactermode
               FOR  index = 0 TO 14
     	          LOOKUP index,("20M2 KEYvalue ",pushbutton) ,senddata 
     	                       pinsB = senddata /16 : PULSOUT E,1 : pinsB = senddata : PULSOUT E,1' sending characters  
               NEXT index
         goto menu
    Attached Images Attached Images
    Last edited by marks; 03-10-2017 at 18:32.

  2. #2
    Moderator
    Join Date
    Jan 1970
    Location
    North Norfolk blow-in.
    Posts
    6,133
    Blog Entries
    1

    Default

    What's the source for the
    LCD Keypad shield?

    e

  3. #3

    Default

    Hi eclectic,
    this is where i usually get things if thats what you meen.
    http://www.ebay.com.au/itm/Yellow-Ba...item5d4384a773
    luckily it only usually takes a couple of weeks.
    even our local altronics store has them for 14.95 but they are highly available everywhere.

  4. #4
    Senior Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    4,308

    Default

    The Shield LCD looks very similar to the Deal Extreme one that I documented back in 2012. At least they have corrected the silk screen spelling in this version!

    A couple of hardware mods that are worth considering for this board are:
    1. Carefully unsolder and remove the contrast pot and resolder it on the rear side of the board. This allows the board to be mounted on a panel or your enclosure.
    2. The membrane switches can be replaced with ones with a 12mm actuator. As above, this allows you to mount the LCD on a front panel and have the buttons protrude through the panel.
    Refer to the picture (I also removed the reset switch completely).

    Timer Panel LoRes.JPG

  5. #5

    Default

    I might go looking for a few different types of shields but are never too keen when a datasheet is not made available.
    I started the thread to help with the pinouts and some imformation and light code to get started!
    I did assume all these lcd keypad shields were identical but this appears not to be the case.
    the lcd side seem to follow the same pinouts, but there are quite a few different ladder switch resistor arrangements.
    So it would be a good idea to check your own adc switch values.
    For those that wish to make there own version2 seems a good design see the attachment.
    and for the DF robot shields that are new will add an attachment to post 1 for the switch resistor arrangements.
    I think for a lot of shields in use using a 20m2 probaly makes more sense,you can make reuse of the reset sw,
    there are also ones arround already with the longer switches.
    Attached Images Attached Images

Bookmarks

Posting Permissions

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