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, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
You know the right answer?
Suppose you are writing your own high levels functions to read and write the digital pins. a. Write...
Questions
Questions on the website: 13722367