Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started