Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question about PIC 16F87/88. Data: http://ww1.microchip.com/downloads/en/DeviceDoc/30487D.pdf Consider the following assembly language code. The clock frequency is 4 MHz - and al initialization steps have been
Question about PIC 16F87/88. Data: http://ww1.microchip.com/downloads/en/DeviceDoc/30487D.pdf
Consider the following assembly language code. The clock frequency is 4 MHz - and al initialization steps have been done correctly (like setting up digital I/O, the oscillator configuration, etc.); Constants ___ BitPattern EQU H'20' LoopCtr EQU H'21' MaxCount EQU .23; Main program loop ___ MainLoop CLRF BitPattern CALL Output BSF BitPattern, CALL Output RRF BitPattern CALL Output BSF BitPattern, CALL Output GOTO MainLoop Output MOVF BitPattern, MOVWF PORTB MOVLW MaxCount MOVWF LoopCtr Loop NOP DECFSZ LoopCtr GOTO Loop NOP RETURN a. What sequence of numbers appears in BitPattern (hex or decimal is fine, just make sure it is clear which one you are doing!) b. From the start of one of the CALL instructions to the end of the subsequent RETURN instructino, how many cycles are taken? c. Sketch the waveforms you would see if oscilloscope probes are attached to the pins associated with PORTB and P0RTB. Indicate both the vertical and horizontal scales (voltes/div and time/div). Consider the following assembly language code. The clock frequency is 4 MHz - and al initialization steps have been done correctly (like setting up digital I/O, the oscillator configuration, etc.); Constants ___ BitPattern EQU H'20' LoopCtr EQU H'21' MaxCount EQU .23; Main program loop ___ MainLoop CLRF BitPattern CALL Output BSF BitPattern, CALL Output RRF BitPattern CALL Output BSF BitPattern, CALL Output GOTO MainLoop Output MOVF BitPattern, MOVWF PORTB MOVLW MaxCount MOVWF LoopCtr Loop NOP DECFSZ LoopCtr GOTO Loop NOP RETURN a. What sequence of numbers appears in BitPattern (hex or decimal is fine, just make sure it is clear which one you are doing!) b. From the start of one of the CALL instructions to the end of the subsequent RETURN instructino, how many cycles are taken? c. Sketch the waveforms you would see if oscilloscope probes are attached to the pins associated with PORTB and P0RTB. Indicate both the vertical and horizontal scales (voltes/div and time/div)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