150 likes | 239 Views
This Thursday, Oct. 25 th 1-1:50pm: Exam in DUANE G140 Covers lectures and labs (except today’s lecture on microcontrollers) You may bring handwritten notes covering one side of one 8-1/2 x 11 piece of paper and a calculator (no textbooks/lab manuals).
E N D
This Thursday, Oct. 25th 1-1:50pm: Exam in DUANE G140 Covers lectures and labs (except today’s lecture on microcontrollers) You may bring handwritten notes covering one side of one 8-1/2 x 11 piece of paper and a calculator (no textbooks/lab manuals)
Exam topics include but are not limited to: • Complex transfer functions • Complex impedance • Bode Plots and decibels • Transistor circuits (BJT & JFET) • Op-Amp circuits (open loop, pos. & neg. FB) • Digital electronics (but no microcontrollers) • … Last opportunity to get help with your exam preparations: Wednesday 5:30 – 7pm in G230
Digital electronics overview (qualitative!) Field programmable gate arrays (FPGA) Digital Signal Processors (DSP) processing throughput Microcontrollers (MCU) Programmable Logic (ROM, PAL and CPLD etc.) (not to scale) Discrete Logic (AND/OR etc.) Networks of transistors, diodes etc. (not to scale) complexity
MCU: Microcontroller Unit Data bus CPU: Central Proces-sing Unit External pins Peripherals Memory Address bus Microcontroller chip
Memory block with N bytes of storage space Address bit 2 bit 0 Byte 0 0000 Byte 1 0001 0002 Byte 2 bit 7 bit 1 Byte N N
Reading data* +5V R/W +5V = “read!” Data 8 lines for 1 Byte 16 lines for an integer 32 lines for a long-int. … Address 16 lines for 64kB 20 lines for 1MB 32 lines for 4 GB … Address Data * All this is done inside the microcontroller. You do not need an extra chip for this week’s lab.
Writing data* +5V +0V = “write!” R/W Data Address Address Data * All this is done inside the microcontroller. You do not need an extra chip for this week’s lab.
There are many types of memory ROM: Read-Only Memory RAM: Random Access Memory Read & write Read only - Program code - Constants - Variables ROM: factory programmed PROM: Program once (OTROM) FLASH: Program ~10,000 times (Can only erase large areas at once. Good for program storage. Cheap.) EEPROM: Program ~1Million times (Can erase small chunks. Good for storing user settings. Very expensive small.) SRAM: Static RAM. Fast & easy to use. (usually used in MCUs). DRAM: Dynamic RAM. Very cheap Hard to use. Usually used in PCs. (MRAM:Magnetoresistive RAM . Fast & non-volatile RAM. The future?)
The Peripherals and the Memory often share the same Address and Data busses. They are arranged such that data and peripheral functions appear at different addresses. Data bus CPU: Central Proces-sing Unit External pins Peripherals Memory Address bus Microcontroller chip
“Memory-map” of PIC 16F630/637 Communicate with peripherals Data storage (variables you use in your code go here)
Writing to address 07h changes the voltage at PORT C pins A ‘1’ produces 5 V; a ‘0’ 0 V at the output (reading PORT A returns the current voltages at RAx pins if configured as inputs) bit 2 bit 0 bit 1 bit 7