subject
Engineering, 07.04.2020 03:12 izquierdohannah

Suppose you are writing your own high levels functions to read and write the digital pins. a. Write 9 "#define" macros for PINB, C,D, PORTB, C,D and DDRB, C,D, so that you can use them in part b. b. Write the C code to set up the PIN, PORT, and DDR registers for the following functions. Be sure to consider all possible input cases, ranges, etc. WriteGPIOhigh(int port, unsigned char mask) //port=0 means PORTB, 1=PORTC, 2=PORTD //mask = 8 bit mask indicating which pins to write high. Ex. 0001 0010= Write bit 1 and 4 high WriteGPIOlow(int port, unsigned char mask) //port=0 means PORTB, 1=PORTC, 2=PORTD //mask = 8 bit mask indicating which pins to write low. Ex. 0010 0001= Write bit 0 and 5 low EnableGPIOpullup(int port, unsigned char mask) //port=0 means PORTB, 1=PORTC, 2=PORTD //mask = 8 bit mask indicating which pins to enable pullup. unsigned char readGPIOport(int port) //port=0 means PORTB, 1=PORTC, 2=PORTD //returns all 8 pins from port "port" by way of an unsigned char Are the above functions sufficient to completely implement GPIO functionality? If not propose modifications or additions necessary to completely implement full GPIO functionality.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 06.07.2019 03:30
Acubic shaped box has a side length of 1.0 ft and a mass of 10 lbm is sliding on a frictionless horizontal surface towards a 30 upward incline. the horizontal velocity of the box is 20 ft/s. determine how far up the incline the box will travel (report center of mass distance along the inclined surface, not vertical distance)
Answers: 1
question
Engineering, 06.07.2019 05:10
The constant-pressure specific heat of air at 25°c is 1.005 kj/kg.°c. express this value in kj/kg k, jg c, kcalk.c, and btu/lbm °f.
Answers: 1
question
Engineering, 06.07.2019 05:20
Acantilever of 3 m length with a t-shaped cross-section is loaded by three concentrated loads: w,-80 n at the free end, w 30 n, and w,-60 n at a distance of 1 m from the free end. all loads are applied at the outer edges of the flange as indicated in the sketch below. (a)-determine the maximum torsional shear stresses in the flange and in the web at distances 0.5 m and 2.5 m from the free end (sections i and ii marked in the sketch) b)- determine thefh end cross section assuming a shear modulus of 210 gpa.
Answers: 3
You know the right answer?
Suppose you are writing your own high levels functions to read and write the digital pins. a. Write...
Questions
question
Business, 26.11.2021 14:00
question
Mathematics, 26.11.2021 14:00
question
World Languages, 26.11.2021 14:00
Questions on the website: 13722363