Question: Question No. 3: Answer the following question? (25) [CLO3] Write One C program for ATMega328 (A) That reads temperature from LM35 connected to pin PortC.5

 Question No. 3: Answer the following question? (25) [CLO3] Write One

Question No. 3: Answer the following question? (25) [CLO3] Write One C program for ATMega328 (A) That reads temperature from LM35 connected to pin PortC.5 of ATMega328 and then transmits the temperature in Fahrenheit on serial port. (10) (B) And that also receives two bytes of data from PC via serial port. First byte represents the frequency of wave (in Hertz) to be generated on PortB.3. The second byte represents the duty cycle of the wave. For example, if the two bytes received from serial port are 200, 70, it would mean that a waveform of 200Hz is to be generated on PortB.3 with duty cycle of 70%. The maximum allowed value of second byte is 100. (15) Notes for parts A and B: - All the program blocks must be used with interrupts only i.e. polling is not allowed. - All the blocks must be accessed using registers only i.e. built in functions are not allowed. Assume crystal frequency of 10Mhz The timer should work in Normal mode Serial port should work with Baud rate of 2400, Asynchronous UART, 8-bit data, two stop bits, even parity ADC should work with VREF = 2.5, right justified and CLK/64

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!