2. Intro to Microcontrollers Flashcards
What inputs does the microcontroller need to handle in a washing machine?
- buttons on control panel (on/off - digital)
- water level (digital?)
- water temp (continuous - analog)
What outputs does the microcontroller need to handle in a washing machine?
- display on control panel
- heater, water valves (on/off - digital)
- motor (may appear analog but usually digital using pulse width modulation)
What else does the microcontroller need to handle in a washing machine?
- timer to control washing programme
- memory for program and variables, clock generator, logic to start machine up correctly.
What are digital inputs/outputs?
Either 0 or 1 , i.e. on or off.
What are analog inputs/outputs?
Continuous.
What is cheaper digital or analog?
Digital
What do we need inside a microcontroller?
- Arithmetic logic unit (ALU) - performs arithmetic and other manipulations on data.
- Memory for program - must be non volatile (retain program even when power is switched off). - read-only memory (ROM).
- Memory for data - may be volatile - random access memory (RAM)
- Communication with outside world - input and output ports - may need to handle digital and analog signals.
- Clock - to keep all parts synchronized.
- Instruction decoder
Can you draw the diagram connecting all parts of a microcontroller together?
YES OR NO
Name some examples of peripherals that may be used in a microcontroller?
- timers
- watchdog timer (WDT)
- Interrupts
- analog/digital converter
- control of reset & start up
- interfaces (serial, USB)
- Data EEPROM (electrical eraseable programmable memory)
How is memory in a computer just like a tall stack of pigeonholes?
There may be several stacks of different types of memory. Each pigeonhole is identified by its ADDRESS which is a serial no. starting from 0.
What does the address point to?
A memory location (register)
When we communicate with memory what do we need to handle?
Both the data and the address
How is data transferred between memory and the rest of the system?
Using BUSES - shared sets of wires that join the components, something like a multi-lane highway.
What are the different types of buses and their responsibilities?
ADDRESS BUS - carries address (serial number) of pigeon hole
DATA BUS - carries byte either from the memory (READ OPERATION) or to the memory (WRITE OPERATION)
CONTROL LINES - are also needed to synchronize timing, select READ/WRITE, ensure only one device tries to use the bus at once.. IGNORE!
Can you draw the diagram relating the buses to memory, cpu and other devices for a PC?
YES OR NO