COS10004-Lab56-Template

.docx

School

Swinburne University of Technology *

*We aren’t endorsed by this school

Course

10004

Subject

English

Date

Jan 9, 2024

Type

docx

Pages

9

Uploaded by DukeTank8613

Report
| COS10004 Lab 5 16 - Snippets of code: 16.1 Establish the base address of the GPIO registers. Insert code screenshot here 16.2 Program GPIO18 for writing. Insert code screenshot here 16.3 Set GPIO18 to ON. Insert code screenshot here 16.4 Stop the instruction pointer (program counter) from continuing beyond the executable program code. Insert code screenshot here
|
| 20. Once you are comfortable in your understanding of the GPIO registers, answer the following questions: 20.1. What number bit is set (within the associated 32-bit block) to enable GPIO23 for writing? Written response 9 20.2. What is the byte offset from GPIO_BASE that this 32-bit block must be written to in memory? Written response 8 20.3. What number bit is set to set GPIO23 to ON (again within the 32-bit block associated with that GPIO pin)? Written response 23 20.4. What is the byte offset from GPIO_BASE that this 32-bit block must be written to memory? Written response 28
| 21. Source code Insert code screenshot here 22. Consider how you would program one of the GPIO pins used above to turn off the LED it controls. Choose one of the LEDs to turn off, and respond the following: Written response Firstly, we have to add in the BASE and the GPIO_OFFSET which is the number we need in order to interface with the peripheral. Then in order to write in the GPIO18 we need to function register one to program for the output. Write in zero to the GPIO pin to zero setting the bit 18. 22.1. Which exact snippet of code will need to change compared to turning the LED on? Insert code screenshot here
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help