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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started