logo elektroda
logo elektroda
X
logo elektroda

89C51 Assembly Code for Programmable Delay Timer With 16x2 LCD and 4x4 Keypad

411 9
Best answers LABEL_AI_GENERATED

How can I build a programmable delay timer on an 89C51 with a 16x2 LCD and 4x4 keypad so the delay can be set from 1 second to 1 hour in assembly?

Use timer interrupts to count short time slices and accumulate them until the programmed delay expires; one reply suggests Timer0 in 8-bit auto-reload mode with about a 10 ms interrupt tick, then using a counter to reach the desired delay and trigger the output [#21661124] For a 1-hour range, avoid a blocking delay loop and base the design on interrupt counting plus a programmed setpoint. The LCD part is not automatic: you must know the LCD controller, whether it is in 8-bit, 4-bit, or serial mode, and how it is wired before writing the display routine [#21661126][#21661129] The thread also warns that 89C51 assembly is hard for beginners, so you should first draw the hardware diagram and flow chart before coding [#21661129] A complete assembly solution is not given in the replies, but the key approach is timer interrupt counting plus separate keypad input and LCD output routines [#21661124][#21661129]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
  • Need assembly timer logic with LCD and keypad input

    #1 21661121
    Rathina Vel
    Anonymous  
  • ADVERTISEMENT
  • #2 21661122
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #3 21661123
    Raj Mohan
    Anonymous  
  • Timer0 overflow code for 10 ms interrupts

    #4 21661124
    Devesh Samaiya
    Anonymous  
  • #5 21661125
    Steve Lawson
    Anonymous  
  • Need hardware diagram, flow chart, and LCD bus details

    #6 21661126
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #7 21661127
    Rathina Vel
    Anonymous  
  • ADVERTISEMENT
  • #8 21661128
    Rathina Vel
    Anonymous  
  • 89C51 assembly is too difficult for beginners

    #9 21661129
    Mark Harrington
    Anonymous  
  • #10 21661130
    Raja Muthyala
    Anonymous  

Topic summary

LABEL_AI_GENERATED
The discussion centers on developing an assembly language program for the 89C51 microcontroller to create a programmable delay timer with a 16x2 LCD and a 4x4 matrix keypad. The user aims to input delay times ranging from 1 second to 1 hour via the keypad, display the countdown on the LCD, and produce an output signal after the delay. The hardware setup includes Port 0 connected to the LCD in 8-bit mode, Port 1 driving an 8-bit DAC 0808, Port 2 interfacing with the matrix keypad, and Port 3 managing LEDs and feedback signals. Responses highlight the complexity of using 89C51 and assembly language for this task, suggesting alternatives like PIC or Atmel microcontrollers for easier timer and interrupt handling. Key technical points include the necessity of timer interrupts for long delays, LCD interfacing modes (8-bit, 4-bit, serial), and the importance of understanding LCD driver commands (e.g., HD44780 compatibility). Sample C code snippets for timer interrupts and delay functions were provided for conceptual guidance, though the original requester prefers assembly. The discussion also emphasizes the need for a clear algorithm, flowchart, and hardware schematic to manage the project effectively. Questions about achieving very long delays (e.g., 50 minutes) with 89C51 were raised, underscoring the challenge of precise timing over extended periods using this microcontroller.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT