<br> ## Microcontrollers. [Datasheet](https://datasheet.octopart.com/ATTINY45-20SU-Atmel-datasheet-41301906.pdf) for ATtiny45, the small AVR microcontroller in the inventory. Other ATtiny's and ATMega's (including the Mega328P used in Arduino) are similar. XMEGAs have more capabilities. ___ ###Microcontrollers. As circuit elements. Programming will be discussed later. Pins: Supply (2.7-5.5V), ground, reset. Other pins available for input and output. Configured by programming to be input or output. ![picture](../images/t45_pinout.png) #### Input. - Digital inputs (using VCC=5V): Low for 0 - ~2.3 V. High for 2.3 - 5 V. - Individual pins can be configured to have an input pullup resistor. This is used, for example, to make a simple button input circuit. ![picture](../images/input_pullup.jpg) --- - Analog to Digital converter. (ADC) "Analog" input. Uses digital process to infer analog voltage. ![picture](../images/pot.png) ![picture](../images/pot_input.jpg) --- - Built-in analog amplifier. Attiny45 has a 20X differential amplifier. #### Output. - Digital output. Low (0 V), high (Supply voltage, e.g. 5V), tri-state (floating, with high input impedance). - what can the ucontroller drive? - Things with high input impedance: FETs, Piezoelectric transducers, other microcontroller inputs. - To some extent, things with low imput impedance: maximum current is 40mA per I/O pin. Enough to (over)drive LEDs. - One way to get "Analog" out: Pulse width modulation (PWM) ![picture](../images/input_output.jpg) ---