Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Unit 2 project 3: flash leds in one hz frequency using loop | EET 430L | ECPI University

[ad_1]

 

Project: Please read Chapter 3 of your textbook for writing subroutines and Chapter 4 of your textbook; then, write assembly programs to do the following:

  1. The clock frequency is Dragon 12 board 24MHz.
    Flash all LEDs in one Hz frequency when running your program.
  2. You must complete the given delay subroutine using LOOP to time approximately one second.
    You need to turn on all the LEDs, then, call this subroutine, turn off all LEDs, and then, call this subroutine.

    Note:
    NOP consumes 1 Clk Cycle
    DEC consumes 4 Clk Cycles
    BNE consumes 3 Clk Cycles

    Delay subroutine template
    L2         LDAA    #240
                 STAA    R1
    L1         NOP                 ;1 Clk Cycle
                 NOP                 ;1 Clk Cycle
                 NOP                 ;1 Clk Cycle
                 DEC     R1        ;4 Clk Cycles
                 BNE     L1         ;3 Clk Cycles
    Total number clock is that 10 Clk x 240 times = 2400 Clk = 0.1ms

[ad_2]

Source link