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
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 19:10
With increases in magnification, which of the following occur? a. the field of view decreases. b. the ambient illumination decreases. c. the larger parts can be measured. d. the eyepiece must be raised.
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