Question: 4- Please inspect to given mikroC code and circuit schematic. MikroC code De R2 L-GREEN D1 R3 COCIN ONLINE LEDOEN all: ALS RASOV TOUT SCOTT

4- Please inspect to given mikroC code and circuit schematic. MikroC code De R2 L-GREEN D1 R3 COCIN ONLINE LEDOEN all: ALS RASOV TOUT SCOTT RUTOCOPE Cosa NO ROSTECK TIT 01 void main() 02 03 TRISC = 0; 04 OPTION_REG.INTEDG - 17 05 INTCON.GIE - 13 06 INTCON. INTE = 11 07 while (1) 09 PORTC-OxEF; 10 11) 12 13 void interrupt() 14 1 15 INTCON.INTF-17 16 PORTC-PORTC; 17 Delay_ms (2000); 18 GO 20: 04 RE 11 DS ROS RDAN ROPA RO SOREN 05 LOR RO GREEN INTCON register a) According to given MikroC code decide that which port is used for output? (5p) w RWO RW PEIE Answer: GIE enable disable unmasked interrupts PEE enable disable unmasked perferal interrupts TOIE enable/disable Tm interrupts INTE enable disable RBA interupt RBIE enable disable RB port change interrupt TOIF To register overflow b) There are one error in the code. Please compare a) According to given MikroC code decide that which port is used for output? (Sp) INTCON register RW. RWO RWO PEIE TOE 11 ww RW RO RE RWO BITE Answer: GIE enable/disable unmasked interrupts PEIE enable/disable unmasked perforat interrupts TOIE enable/disable Tmo interrupts INTE enable disable R80Ant interrupt RBIE enable/disable RB port change interrupt TOIF Tmeregister overflow INTERBO/Int interrupt occurred RBIE one of the PORT(04.167) has changed state b) There are one error in the code. Please compare hardware, software to find error. Which line has an error and write the correct one (8) Answer: OPTION REG register RW: RW.1 WI W REPUINTED W? INTEDG rising edge or falling edge c) What does this code do? Your answer must include what is the input and output of this circuit. (7) Page 4 of 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
