Select Git revision
-
Robert Hart authoredRobert Hart authored
index.html 1.74 KiB
<!DOCTYPE html>
<html>
<title>Electronics intro: microcontrollers. </title>
<xmp theme="journal" style="display:none;">
<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.

#### 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.

---
- Analog to Digital converter. (ADC) "Analog" input. Uses digital process to infer analog voltage.

---
- 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)

---
</xmp>
<script src="../strapdown-gh-pages/strapdown-gh-pages/v/0.2/strapdown.js"></script>
</html>