EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / NewbieL Help with keypad and LCD program 8051

NewbieL Help with keypad and LCD program 8051

|

Microcontroller › 8051 › NewbieL Help with keypad and LCD program 8051

  • This topic has 0 replies, 1 voice, and was last updated 15 years, 5 months ago by Jack M.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • November 9, 2010 at 6:39 pm #469
    Jack M
    Participant

    I am starting to learn C and am studying the lcd keypad program (project MC032) but I am not sure how to go about this.

    I have a 20char x 2 line optrex character lcd
    I have wired a 10 key keypad using the 3 col x 4 row kepad matrix as shown in the schematic for project MC032.
    C2/R4 and C3/R4 are not used
    I need to limit the range of inches between 5.00  max and 0.50 minimum; this is the length of my linear screw.
    I want to display on the first line of the LCD [ Num of Inches:2.00 ] then move the cursor to the first digit
    when C1/R2 (#3) is pressed I want to decrease the first digit by one until it reachs 0
    when C2/R2 (#4) is pressed I want to increase the first digit by one until it
    reachs 5 unless the 2nd and 3rd digit is greater than one. my limit is 5.00 inches

    if C3/R1 (#2) is pressed move cursor to the right one digit unless there are no more digits
    if C2/R1 (#1) is pressed move cursor to the left one digit unless there are no more digits

    Which means that 2nd and 3rd digits may have different settings depending on  other digits setting.

    when C3/R2 (#5) is pressed it takes all of the individual numbers, converts it to a single interger and stores it to a variable i.e.  “2.65”  or “4.73”

    The second line on the LCD will display [ Num of Photos:030 ]

    I would like to do the same thing that was done for the first line.

    Range is 002 -250.

    I am not sure as to how limit the ranges and change the inidiviual numbers

    Your probably wondering what I am doing.    I am trying to build my wife automatic macro photograhy  lead screw.

    She puts in the number of inches of travel and number of photos then the controller moves the camera to each step, a mini relay will activate
    the remote shutter release.  She gets to decide the number of steps and distance.


  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • AI algorithm for bots April 17, 2026
  • SDCC Array Access In Timer 0 Interrupt Handler April 16, 2026
  • EasyEda program has a major bug April 16, 2026
  • ANOTHER OLD PROJECT REDO April 16, 2026
  • How to set the OSCAL in a PIC 12F675 April 16, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise