Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

kindly scroll down we will find the images attached I need the solutions ASAP please please I need a solution to all the questions and

kindly scroll down we will find the images attached

I need the solutions ASAP please

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

image text in transcribedplease I need a solution to all the questions and i need it ASAP thanks in Advance

g. (2 points) What is the address of the .' In the string defined below? thisArray: ascii "Hello, Mr. Bond" i. ii. thisArray + 36 thisArray + 8 thisArray + 9 thisArray + 32 thisArray + 18 iv. V. 4. (20 points) Below is a picture of the modENC (a rotary encoder). Let's assume we want to use the rotary encoder with our Blackboard, and it will be attached to PMOD A port which has a register address located at 0x4BB07004. This encoder has 6-pins and is a GPIO input into our system. Please see the reference manual of the PmodENC attached. The pinout description in the reference manual, and the pins mapped to the Blackboard are shown in the table below: PmodENC Pin 4 BTN SHTE Blackboard PMOD_A PmodENC Register Bit Pin (1) JA3_P A (2) JA3_N 5 B (3) JA4_P 6 BTN (4) JA4_N 7 SWT (5) GND N/A GND (6) VCC N/A VCC 26 RE Digilent Rotary Encoder Module a. (8 points) Create C-based functions to get the current value of the button and current value of the switch respectively: 1/ This function returns the state of the encoder button // This function returns the state of the encoder switch int getEncoderButtonState() int getEncoder Switch State) { { b. (12 points) Create a C-based function to detect if the encoder is being rotated right or left. For the purposes of this homework ignore button debounce (e.g. switch chatter shown in Figure 2 of the PmodENC reference manual). Hint: you are looking for a rising edge on inputs A and B (which button goes from low to high first and which button goes from low to high second?) The order of rising edge gives enough information on whether the encoder is rotated left or right: // This function returns a-1 if the encoder is rotated left and a +1 if the encoder is rotated right int getEncoder Rotation ) { 5. (15 points) The ARM Cortex-A9 does not have a division assembly instruction. Devise a pseudocode algorithm that would accomplish integer division with the limited assembly instruction set. Hint: consider a simple division example such as 12 + 4. One possible approach would be repeated subtraction. When we divide 12 by 4, what we really want to know is how many times the number 4 will fit into the number 12 (how many times can we subtract the divisor from the dividend until we reach zero). 6. (5 points) The ARM Cortex-A9 does not have a division assembly instruction. Devise an ARM assembly solution following the pseudocode you developed from the last problem. g. (2 points) What is the address of the .' In the string defined below? thisArray: ascii "Hello, Mr. Bond" i. ii. thisArray + 36 thisArray + 8 thisArray + 9 thisArray + 32 thisArray + 18 iv. V. 4. (20 points) Below is a picture of the modENC (a rotary encoder). Let's assume we want to use the rotary encoder with our Blackboard, and it will be attached to PMOD A port which has a register address located at 0x4BB07004. This encoder has 6-pins and is a GPIO input into our system. Please see the reference manual of the PmodENC attached. The pinout description in the reference manual, and the pins mapped to the Blackboard are shown in the table below: PmodENC Pin 4 BTN SHTE Blackboard PMOD_A PmodENC Register Bit Pin (1) JA3_P A (2) JA3_N 5 B (3) JA4_P 6 BTN (4) JA4_N 7 SWT (5) GND N/A GND (6) VCC N/A VCC 26 RE Digilent Rotary Encoder Module a. (8 points) Create C-based functions to get the current value of the button and current value of the switch respectively: 1/ This function returns the state of the encoder button // This function returns the state of the encoder switch int getEncoderButtonState() int getEncoder Switch State) { { b. (12 points) Create a C-based function to detect if the encoder is being rotated right or left. For the purposes of this homework ignore button debounce (e.g. switch chatter shown in Figure 2 of the PmodENC reference manual). Hint: you are looking for a rising edge on inputs A and B (which button goes from low to high first and which button goes from low to high second?) The order of rising edge gives enough information on whether the encoder is rotated left or right: // This function returns a-1 if the encoder is rotated left and a +1 if the encoder is rotated right int getEncoder Rotation ) { 5. (15 points) The ARM Cortex-A9 does not have a division assembly instruction. Devise a pseudocode algorithm that would accomplish integer division with the limited assembly instruction set. Hint: consider a simple division example such as 12 + 4. One possible approach would be repeated subtraction. When we divide 12 by 4, what we really want to know is how many times the number 4 will fit into the number 12 (how many times can we subtract the divisor from the dividend until we reach zero). 6. (5 points) The ARM Cortex-A9 does not have a division assembly instruction. Devise an ARM assembly solution following the pseudocode you developed from the last

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions