This week we will learn embedded programming.
Let’s continue to experience the classroom notes filled with new terminology!
Microprocessors/Microcontrollers
-
Memory: registers, SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), FLASH, fuse
-
Peripherals: A/D (Analog to Digital), comparator, D/A, timer/counter/PWM (Pulse Width Modulation), USART (Universal Synchronous/Asynchronous Receiver-Transmitter), USB
-
Word size: 8, 16, 32, 64
-
Chip families: 8051, PIC, MSP, AVR (used in the course), ARM, STM32, mbed, PSoC, xCORE, Propeller
-
Suppliers: Octopart, Digi-Key, Mouser, Newark, Farnell, SparkFun, Adafruit
-
Clock
-
RC (10%, 1% calibrated)
-
Ceramic (0.5%)
-
Quartz (50 ppm)
-
PLL (Phase-Locked Loop)
-
Instruction cycles
-
Overclocking
Development
-
In-system development (loading programs to the processor)
-
Bootloader: Arduino, DFU, Micronucleus
-
JTAG controller, PDI (Parallel Data Interface)
-
ICE (In-Circuit Emulator)
-
ISP (In-System Programming): program used to interact with the programmer
-
Programmers
-
FabISP
-
avrdude
-
Atmel-ICE
-
JTAG, PDI
-
ISP
-
Assembly language: hex file, instruction set, opcodes, mnemonics, directives, expressions, avr-as, gavrasm
-
C language (Arduino low-level language): requires a compiler to convert C code into hexadecimal code (hex codes)
-
AVR is designed based on GCC (the GNU Compiler Collection). AVR Libc provides libraries for C language and AVR communication.
-
For OS X, use CrossPack for AVR
-
In this course, we use GCC to compile C code into hexadecimal code that AVR can understand
-
IDE
-
Write programs, compile, load to the processor
-
Atmel Studio, Eclipse, AVR, CodeBender
-
Interpreters (generally slow): Python, BASIC, FORTH, AVRSH, Javascript (Espruino, Tessel, iop.io)
Host Communication
-
There are some libraries for serial communication, such as Python’s pyserial
-
FTDI: provides USB communication connections with other modules (including modules, cables, integrated circuits, etc.)
-
Connection cables
-
libFTDI
Boards
-
AVR
-
Toolchain: CrossPack for OS X
-
The Atmel AVR series is a microcontroller based on an improved Harvard architecture, 8-bit to 32-bit RISC (Reduced Instruction Set Computing).
-
Arduino: development board + C language library + IDE + burning program + header files
-
XMEGA: newer series of AVR
-
ARM
-
ARM is the mainstream mobile processor architecture
-
STM32
-
Raspberry Pi
-
PSoC: Programmable System on Chip (Windows only)
Notes List
-
What can you learn from FabAcademy? [FabNotes001]
-
Week 1: Overview and Project Management [FabNotes002]
-
Assignment 1: Upload your website using Git [FabNotes003]
-
Week 2: CAD [FabNotes004]
-
Assignment 2: Create a model of a Theremin using CAD [FabNotes005]
-
Week 3: Machine Cutting [FabNotes006]
-
Assignment 3: Laser Cutting [FabNotes007]
-
Week 4: Making Circuit Boards [FabNotes008]
-
Are you clumsy? Come, make a circuit board to calm your nerves [FabNotes009]
-
Week 5: 3D Scanning and Printing [FabNotes010]
-
Assignment 5: 3D Scanning and Printing [FabNotes011]
-
Week 6: Circuit Design [FabNotes012]
-
Assignment 6: Circuit Board Design and Production [FabNotes013]
-
Week 7: CNC Machines [FabNotes014]