Question: Struggling with coding assignment in my microprocessors class using the C language. We are using the pic24 chipset if thats helpful. Wondering if someone could

Struggling with coding assignment in my microprocessors class using the "C" language. We are using the pic24 chipset if thats helpful. Wondering if someone could post answers to these with explanations.

Struggling with coding assignment in my microprocessors class using the "C" language.

1/0 PORT Configuration Write a line of C code for each question below 1. Set PORTA bit4 and bit2 as digital 1/0 -> PORTA = Ob0000000000001010; 2. Set PORTA bit4 as digital 1/0 -> PORTA = Ob0000000000001000; 3. Set PORTA bit 9 and 10 as analog 1/0 -> TRISA = Ob0000011000000000; 4. Set PORTA bit4 output -> TRISA = Ob000000000001000; 5. Set PORTA bit2 as output -> TRISA = Ob0000000000000010; 6. Set PORTB bit4 input -> TRISB = 1b0000000000001000; 7. Set PORTB bit2 as input -> TRISB = 1b0000000000000010; Assuming pins mentioned below set as output pins 8. Set PORTA bit4 as HIGH -> LATA = 0x000f; 9. Set PORTA bit2 as LOW -> LATB = 0x0000; Assuming pins mentioned below set as input pins 10. Check if PORTA bit4 is HIGH or LOW 11. Check if PORTA bit2 is HIGH or LOW PORTA 12. Write a C code (like we did in class) that blinks two LEDs (RED and GREEN LED). When one of them is ON other one should be OFF. 1/0 PORT Configuration Write a line of C code for each question below 1. Set PORTA bit4 and bit2 as digital 1/0 -> PORTA = Ob0000000000001010; 2. Set PORTA bit4 as digital 1/0 -> PORTA = Ob0000000000001000; 3. Set PORTA bit 9 and 10 as analog 1/0 -> TRISA = Ob0000011000000000; 4. Set PORTA bit4 output -> TRISA = Ob000000000001000; 5. Set PORTA bit2 as output -> TRISA = Ob0000000000000010; 6. Set PORTB bit4 input -> TRISB = 1b0000000000001000; 7. Set PORTB bit2 as input -> TRISB = 1b0000000000000010; Assuming pins mentioned below set as output pins 8. Set PORTA bit4 as HIGH -> LATA = 0x000f; 9. Set PORTA bit2 as LOW -> LATB = 0x0000; Assuming pins mentioned below set as input pins 10. Check if PORTA bit4 is HIGH or LOW 11. Check if PORTA bit2 is HIGH or LOW PORTA 12. Write a C code (like we did in class) that blinks two LEDs (RED and GREEN LED). When one of them is ON other one should be OFF

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!