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 / LCD display for 8051 F340

LCD display for 8051 F340

|

Microcontroller › 8051 › LCD display for 8051 F340

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 3 months ago by Cory.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 12, 2013 at 6:49 pm #2263
    Cory
    Participant

    I have written some assembly code for a digital clock.

    As far as I can tell the timer works properly.

     

    ;  Timer2_ISR:
    ;
    ;  Every 0.2 seconds this ISR will be called.
    ;  You will need to add code to take action during this IRS.
    ;
    ;*****************************************************************************

    T2ISR:

    ;         ADD YOUR TIMER2 ISR CODE HERE!!!!

                clr  TF2H                 ; Clears Timer 2 flag because unlike
                                          ;  timers 0 & 1 the hardware does not
                                          ;  clear timer 2 flag automatically
                                          ;  during an ISR
                
                            DJNZ 50H, FIVE            ; 5 TIMES COUNTER FOR 1 SECOND TIMER
                            MOV  50H, #5              ; RELOAD 50H
                            INC  TIME_SECOND                    ; +1 SECOND
                            DJNZ 55H, FIVE                        ; 60 SECONDS COUNTER
                            MOV  55H, #60                            ; RELOAD 55H
                            INC  TIME_MINUTE          ; +1 MINUTE
                            DJNZ 56H, FIVE            ; 60 MINUTES COUNTER
                            MOV  56H, #60             ; RELOAD 56H
                            INC  TIME_HOUR            ; +1 HOUR
                            DJNZ 57H, FIVE            ; 13 HOURS COUNTER
                            MOV  57H, #13                          ; RELOAD 57H
                           
    FIVE:                reti                      ; Return to “where ever” from interrupt

     

     

    I am having trouble having it display to my LCD.

    I know I would have to use a sub-routine to call the display; or maybe use push and pop. I am not sure….

     

     

    April 13, 2013 at 7:44 am #9479
    dinesh
    Participant

    Hi Cory.,.,

     

                  I am Dinesh And I am Working on 8051F340 Since last 6 months

    You should use Timer0 for generating Desired delay. There is same mathod which is used in 

    April 15, 2013 at 12:40 am #9488
    Cory
    Participant

    Hello Denish,

     

    Thank you for taking the time to try and assist me, but I do not see the rest of your post. It ends at “the same method as in”…

     

    Thanks regardless haha.

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

RSS Recent Posts

  • Does US electric code allow branching ? July 19, 2025
  • Faulty heat air gun (dc motor) - problem to locate fault due to Intermittent fault July 19, 2025
  • Fun with AI and swordfish basic July 19, 2025
  • Sump pit water alarm - Kicad 9 July 19, 2025
  • turbo jet fan - feedback appreciated. July 19, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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