You are given a task to build a voltmeter that measures from 0Vdc to 200Vdc. The microcontroller
Question:
You are given a task to build a voltmeter that measures from 0Vdc to 200Vdc. The microcontroller can only input voltage from 0V to 5V, therefore you need to condition the signal before sending to the microcontroller on PA5. Choose suitable resistor values to translate the input voltage to 0V – 5V. Write an AVR C program for the ATMega32 microcontroller that continuously measures the voltages on PA5 and sends a string to the USART port, which is similar to: “Voltage = x.x V”. The voltage sent must be scaled in software to be the correct value at the input of the voltage divider circuit. Assume the microcontroller is clocked by a 16 MHz oscillator and the USART port is configured for 8 data bits, one stop bit and a baud rate of 2400 bps. The ADC is configured to use the internal voltage reference and 10-bits resolution. Draw the microcontroller circuit showing the voltage divider and all the necessary components needed to have a functioning circuit.
An Introduction to the Mathematics of financial Derivatives
ISBN: 978-0123846822
2nd Edition
Authors: Salih N. Neftci