Question: QUESTION 1 [ 2 5 ] The following AVR program is a student's counter that counts the number of students in a class room and
QUESTION
The following AVR program is a student's counter that counts the number of students in a class room and displays on a remote unit with a USART interface running HyperTerminal. Only one person can enter and exit at a time. The initially empty class room has a maximum capacity of students, one entry and one exit point equipped with entry and exit sensors that generate a LOW when activated. The code shown in Figure Q below is not complete. Assume all the registers are defined.
The ATmega parameters are as follows: A clock. USART baud rate of one start bit, data bits, no parity and one stop bit. The code is not complete. Assume all the registers are defined.
a Draw a block level schematic diagram representing the modules required to build the system, their functions and how they are interconnected including the remote unit. Indicate the pin connections used and the reason for the choice.
b Determine the hexadecimal values missing at the following:
i Line
ii Line
c Write the code to be placed at the following:
i Line configuring the interrupts.
ii Line configuring the USART protocol.
iii. Line and Line
d What would happen if Line is omitted?
e What could be wrong with Line How would you correct the problem?
Note: In all cases show the working.
table;Line rimp Init,;Line org xdots....,;Line rimp INTOISR,;Line xdotsF,;Line rimp INTISR,;Line org ;Line Initstack;Line ;configure Interrupts,:Line ;configure USART,;Line Idi NumStds Ox;Line Start:;Line rcall transmit,;Line jjmp Start,;Line INTOISR:,;Line ;process line,;Line reti;Line INTISR:,;Line ;process line,;Line reti;Line TRANSMIT:;Line sbis UCSRA, UDRE,;Line rjmp TRANSMIT,;Line out UDR, NumStds;Line ret;Line
Figure Q
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
