Question: #include avr.h > . section . init 0 . section . init 0 . global entry entry: / / Step 1 : Drive SPI MOSI

#include avr.h>
.section .init0
.section .init0
.global entry
entry:
// Step 1: Drive SPI MOSI HIGH
ldi r16,0x01
out SPI_MOSI, r16
// Step 2: Create a rising edge on the SPI CLK net 8 times
ldi r16,0x01
ldi r17,0x00
// Loop to create 8 rising edges
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
out SPI_CLK, r16// Drive SPI CLK HIGH
out SPI_CLK, r17// Drive SPI CLK LOW
// Step 3: Create a rising edge on the DISP LATCH
ldi r16,0x01
out DISP_LATCH, r16// Drive DISP LATCH HIGH
/** CODE: Write your code for Ex E2.0 above this line. */
// END OF EXTENSION02 EXERCISES //
// DO NOT EDIT BELOW THIS LINE //
break
loop:
rjmp loop // Loop indefinitely

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 Programming Questions!