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

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, BardiFan
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
image
Engineering, 04.07.2019 18:10, hadellolo8839
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, niicoleassssssf
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
image
Engineering, 04.07.2019 18:10, bunnles
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
You know the right answer?
Suppose you are writing your own high levels functions to read and write the digital pins. a. Write...

Questions in other subjects: