2x16 LCD and 4x4 keypad example


Posted on Feb 5, 2014

A very simple circuit forexperiments with AT90S2313, 2x16 LCD display and 4x4 keypad. The clock is based on 4 MHz crystal, but you can use any other crystalbetween 1-4 MHz. The keys with the name `A`, `B`. `F` are typed to the LCD with numbers 10-16. Because the AVR has only 15 I/O pins we work the LCD display with 4-bit data bus. The 4 resistors


2x16 LCD and 4x4 keypad example
Click here to download the full size of the above Circuit.

(10 k) are protecting the AVR from anyshortcut onthe columns of the keypad when AVR is scanning the keys by changing the pinstatus from input to output. I wrotethe source code ina simple form, that it means I haven`t made any economy to the flash memory, for understanding the way howthis circuit works. The AVR configure the PortB as PB0-PB3 inputs and PB4-PB7 outputs. Onthe beginning, the AVR puts the pin PB4 at logic `0` to enable the column 1 (the first 4 keys) and reads the status of the keys. If we have pressed any of the 4 first keys then the AVR sends the number of the key to the LCD display. If we have not pressed any of 4 first keys, the AVR puts the PB4 at logic `1` and PB5 at logic `0` to enable the secondcolumn. Reading the statusof the keys and display the result to LCD, etc, until the 16th key is been read. After that, the circuit starts again to read from the 1st key (1st column).




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Metal detector with 4030 CMOS
    Lamp flasher II
    5 Mhz phase encoding
    Active band-reject filter
    Farnsworth Model GT-051 Bakelite Radio (1948)
    Audio level meter using LM3915
    Simple Voltage comparator using CA3140
    how to make inexpensive current
    RF Induction Meter
    IR Widget Consumer infrared remote control capture and visualization
    high and low voltage cut out with delay and music circuit diagram
    gic
    SERVO CONTROLLER DIGITAL
    gmc sierra 1500 1995 gmc serria abs light comes
    Flicker frequency of multiple sets of different light-emitting diode lights chain circuit



    Top