Question: A program written in assembly language targeted for the circuit above is listed as below: ORG 0000H CNT1 EQU 0x30 ; 0x30 is the location

A program written in assembly language targeted for the circuit above is listed as below:

ORG 0000H

CNT1 EQU 0x30 ; 0x30 is the location for CNT1

CLRF TRISB, 1 ; Set to output

MOVLW 0x01

MOVWF PORTB

LOOP1: MOVLW 0b11001

MOVWF CNT1 ; Put this binary no. into CNT1

LOOP2: RLNCF PORTB, 1, 0 ; Rotate Left

DECF CNT1, 1, 0 ; Decrement CNT1

BNZ LOOP2 ; Jump to LOOP2 if not zero

BRA LOOP1 ; Jump to LOOP1

END: ; End of program

The crystal frequency is 16MHz and each instruction takes 4 cycles to execute.

The output voltage range of the DAC is set to between 0-5V.

Based on the circuit, program and the given conditions,

(a) Sketch and label the output waveform of this circuit for 2 cycles. Show the necessary calculations.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!