Answer :- The time delay value is 250 us.
Instruction cycle is 1us. Hence the number of timer count required
is 250.
Since timer overflows when it goes to FFFFH, hence the timer must
be loaded with value 250 count less than FFFFH. So the timer load
value is = (0xFFFF - (hex of 250)) = 0xFFFF - 0xFA =
0xFF05. The delay subroutine can be
written as-
Delay250us: ; subroutine name
MOV TMOD. #01 ; set timer0 mode 1 i.e. 16-bit timer
MOV TL0, #05H ; load timer count value, lower 8-bit
MOV TH0, #0FFH ; load timer count value, upper 8-bit
SETB TR0 ; start the timer
Here : JNB TF0, Here ; wait untill timer overflows
CLR TR0 ; stop the timer after it finishes the count
CLR TF0 ; clear the interrupt
RET ; return from the subroutine
Write a routine to implement a time delay of approximately 250 ms using TMRO. Assume an...
Using AVR write a subroutine that can create a time delay that is a multiple of 1ms. The multiple is passed in register r16, assume the CPU clock in 16MHz. (please include full working code) The processor used is the ATMEGA328P
Problem 9: (10 Points) Find out the total time delay of the following code's execution: (The instruction cycle is 4 of the oscillator cycle, and assume the CPU is running on 40MHz crystal and TMP1 and TMP2 are user defined DM address) MOVLW MOVWF MOVLW MOVWF NOP NOP DECFSZ GOTO NOP NOP DECF BTFSS GOTO OXEE TMP2 OXAA TMP1 LOOP2 LOOP1 TMP1,F LOOP TMP2,F STATUS,Z LOOP2 Problem 9: (10 Points) Find out the total time delay of the following code's...
Implement Y=(A' AND B) OR C using PLA. What is the gate delay?
Assume the clock frequency is 9 MHz, calculate the total delay when the instruction CALL DELAY_ME is executed. [17, 20, 25, 33, 35] DELAY_ME: LDI R21,25 ; 1 clock cycle LOOP_D2: RCALL DELAY0 ; RCALL DELAY0 ; RCALL DELAY0 ; NOP ; 1 clock cycle DEC R21 ; 1 clock cycle BRNE LOOP_D2 ; 1/2 clock cycle(s) LDI R17,5 ; 1 clock cycle EXTRA_D2: DEC R17 ; 1 clock cycle BRNE EXTRA_D2 ; 1/2 clock cycle(s) NOP ; 1 clock...
Problem 2. Sender Utilization (20 pt.) Assume stop-and-wait, 100 Mbps link, 10 ms propagation delay, 10,000 bit packet. Calculate sender utilization. Assume pipelining and 20 packets can be sent without ACK, 100 Mbps link, 10 ms propagation delay, 10,000 bit packet. Calculate sender utilization.
Assume that XTAL = 8MHz. Find the TMR0H, TMR0L value needed to generate a time delay of 1msec. Using Timer0 in 16-bit mode and a prescale valye of 1:128.
3. a. Calculate the delay generated by the subroutine given in table 2. Assume the system clock period as 0.35us. (10 Marks) Table 2 Label Instruction T-states LXID, 7200 10 NOP NOP DELAY DCXD 16 NOP 14 MOV AD 14 ORAC UNZ DELAY 107 b. What will be value of maximum and minimum delay possible to generate from the subroutine given in table 2? (6 Marks) c. Write a program for 8255 PPI to generate the rectangular waveform as shown...
Question 2 An on-delay timer is used when you want a time delay to occur before an input instruction becomes true. True False Question 3 bit of the timer functions similar to an For the programmed timer circuit shown the instantaneous contact. L1 Laddor logic program 2. laput Outputs Input A TON Le Output BG TIMER OND Timer Time base Preset Accumu Oupur c- o 5 99 5 1 Output D HLON b. DN EN PB1 d. PB2
04. a) Write an 8051 C program to send values 00 through FFH to port Pl. b) Write an 8051 C program to send values -3 to +3 to port P1. c) Write an 8051 C program to toggle all bits of P1 (between 55H and AAH) with some delay d) A door sensor is connected to P1.1 and a buzzer to P1.7. Write an 8051 C program to monitor the sensor and when it opens (0') sound the buzzer...
1) 2) The time delay is measured for a city street. Variability in this value is estimated as = 0.3 (for time in minutes) by experience. Traffic signs and lights were recently altered to facilitate traffic and reduce delays. Delay times in minutes for a random car sample before and after the rearrangement are shown below. Before 7.5 7.0 7.1 7.3 7.7 7.0 6.8 6.6 7.0 7.3 7.5 7.2 After 6.5 6.6 5.3 6.4 7.0 5.7 6.0 5.9 5.8 6.1...