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 / Help with assembly coding

Help with assembly coding

|

Microcontroller › 8051 › Help with assembly coding

  • This topic has 1 reply, 2 voices, and was last updated 9 years ago by Ashutosh Bhatt.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • June 23, 2016 at 4:54 am #4493
    Greg
    Participant

    Write a program that continuously flashes the LEDs on the PB-507 trainer as described below. The output LEDs will always be defined as follows regardless of the trainer you use: b7  b6  b5  b4  b3  b2 b1  b0. (11.0592 MHz crystal oscillator)

     

    • Turn on the b7 – b4 LEDs on for 1 seconds
    • Then turn on b0 LED on for 2 seconds
    • Then turn on b4, & b3 LEDs on for 0.5 second
    • Repeat continuously

    The only moves I can use is…

    MOV

    NOP

    DJNZ

    SJMP

    something like this but I cant get the timing down.

     

    MOV P1,#01H
    MOV R0,#250
    SUE:
    NOP
    NOP
    NOP
    NOP
    NOP
    DJNZ R0,SUE
    MOV P1,#0H
    MOV R0,#250
    BOB:
    NOP
    NOP
    NOP
    NOP
    NOP
    DJNZ R0,BOB
    SJMP JOE
    June 23, 2016 at 9:32 am #13985
    Ashutosh Bhatt
    Participant

    this is very simple program

    just you need is delay. make a delay loop of 0.5 sec – 500000 micro sec.

    use it twice to get delay of 1 sec and four times to get delay of 4 sec thats it

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

RSS Recent Posts

  • Faulty heat air gun (dc motor) - problem to locate fault due to Intermittent fault July 19, 2025
  • Does US electric code allow branching ? 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