Systemy RT i embedded Wykład 2 Mikrokontrolery 8-bitowe Wrocław 2013
Plan AVR ATTiny ATMega ATXMega PIC PIC10/12 PIC16/18
Introduction - AVR
Introduction Source: [1]
ATTiny
ATTiny Main features: RISC processors few instructions, high clock frequency 8-bit processors with simplified architecture Most instructions executed in one clock cycle Clock range up to 20MHz 1 MIPS/MHz
ATTiny Main features: Small amount of program memory (0.5-8kB) Small amount of SRAM (< 512B) Small cases (down to SOT23-6) 6-32 pins Energy efficient (PicoPower) Low voltage supply from 0.7V!!! Capacitive Touch technology
ATTiny10 block diagram Source: [2]
ATTiny10 pinout Source: [2]
ATTiny10 instructions
ATMega
ATMega Main features: RISC processors few instructions, high clock frequency Large family of 8-bit processors Most instructions executed in one clock cycle Clock range up to 20MHz 1 MIPS/MHz
ATMega Main features: Sufficient amount of program memory (4kB- 256kB) Sufficient amount of SRAM (512B-16kB) EEPROM present (256B-4096B) Some versions energy efficient (PicoPower) Low voltage supply even from 0.9V
ATMega Main features: 8 channels of 10-bit ADC Analogue comparator 4 Timers (2 x 16 bit, 2 x 8 bit) 34 interrupt sources 8 PWM channels RTC SPI UART
ATMega64 block diagram Source: [3]
ATMega64 Instruction List
ATMega64 Sample code
ATMega64 Pinout Source: [3]
ATXMega
ATXMega Main features: New family of 8/16 bit processors RISC processors few instructions, high clock frequency Most instructions executed in one clock cycle Clock range up to 32MHz 1 MIPS/MHz
ATXMega Main features: Sufficient amount of program memory (16kB-384kB) Sufficient amount of SRAM (2kB-32kB) EEPROM (1kB-4kB) Energy efficient (PicoPower) Low voltage supply from 1.6V Many interesting peripherals (DMA) Fast Cryptography support for AES and DES
ATXMega Main features: High precision analog: 12-bit ADCs with gain stage and combined throughput of 4 MSPS Fast 12-bit DAC with high drive strength and other functions that reduce the need for external components Inter-peripheral signaling with 100% predictable response time AVR Software Library with many ready solutions USB connectivity
ATXMega Source: [4]
ATXMega64A1 Main features: 16 channels of 10-bit ADC 4 Analogue comparators 8 Timers (all 16 bit wide) 24 PWM channels RTC 4 x SPI 8 x UART DMA
ATXMega64A1 - CPU Main features: Harvard architecture Single stage pipelining Hardware multiplier with hardware support for data cipher/decipher Support for 8-, 16- and 32-bits arithmetics Direct addressing of 16MB of data and program memory
ATXMega64A1 - DMAC DMAC Direct Memory Access Controller - CPU-independent data transfer that significantly boosts performance
ATXMega64A1 - DMAC DMAC Direct Memory Access Controller Main features: Fast data transfer: From memory to peripherals From memory to memory From peripherals to memory From peripherals to peripherals 4 channels
ATXMega64A1 Event System - XMEGA Event System enables inter-peripheral communication without CPU or DMA usage - Up to 8 simultaneous events or interrupt conditions in the peripherals can automatically start actions in other peripherals
ATXMega64A1 Event System
ATXMega64A1 PMIC - PMIC - Programmable Multi-level Interrupt Controller - Features: - Separate interrupt vector for each interrupt - Short, predictable interrupt response time - Programmable Multi-level Interrupt Controller - 3 programmable interrupt levels - Selectable priority scheme within low level interrupts (roundrobin or fixed) - Non-Maskable Interrupts (NMI) - All peripherals can define three different priority levels for interrupts; high, medium or low.
ATXMega64A1 PMIC - PMIC - Programmable Multi-level Interrupt Controller - Features: - 45 interrupt bases - The interrupt vector is the sum of the peripheral s base interrupt address and the offset address for specific interrupts in each peripheral (abundance of interrupts!) - Medium level interrupts may interrupt low level interrupt service routines - High level interrupts may interrupt both low and medium level interrupt service routines
ATXMega64A1 PMIC
ATXMega64A3U - ADC 12-bit resolution Up to 2 Million Samples Per Second 4 inputs can be sampled within 1.5µs Down to 2.5µs conversion time with 8-bit resolution Down to 3.5µs conversion time with 12-bit resolution Differential and Single-ended input Up to 16 single-ended inputs 16x4 differential inputs without gain 16x4 differential input with gain
ATXMega64A3U - ADC Built in differential gain stage 1/2x, 1x, 2x, 4x, 8x, 16x, 32x and 64x gain options Single, continues and scan conversion options 4 internal inputs Internal Temperature sensor DAC Output VCC voltage divided by 10 1.1V Bandgap voltage
ATXMega64A3U - ADC 4 conversion channels with individual input control and result registers Enable 4 parallel configurations and results Internal and external reference options Compare function for accurate monitoring of user defined thresholds Optional event triggered conversion for accurate timing Optional DMA transfer of conversion results
ATXMega64A3U - ADC
ATXMega64A3U - DAC 12-bit resolution Up to 1Million Samples Per Second conversion rate per DAC channel Built in calibration that removes Offset error Gain error Multiple conversion trigger sources On new available data Events from the Event System
ATXMega64A3U - DAC High drive capabilities and support for Resistive load Capacitive load Combined resistive and capacitive load Internal and external reference options DAC output available as input to Analog Comparator and ADC Low Power mode with reduced drive strength Optional DMA transfer of data
ATXMega64A3U - DAC
ATXMega64A3U - USB One USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant interface Integrated on-chip USB transceiver, no external components needed 16 endpoint addresses with full endpoint flexibility for up to 32 endpoints One input endpoint per endpoint address One output endpoint per endpoint address Built in Direct Memory Access (DMA) to internal SRAM for Endpoint configurations Read and write of endpoint data
Wireless AVR
Wireless AVR Single Chip solution Currently only one single chip AVR available: ATMega128RFA1 IEEE 802.15.4 compliant (ZigBee) @ 2.4GHz Combination of ATMega core and RF transceiver
ATMega128RFA1 Features: supply voltage range down to 1.8V fast wake-up time from SLEEP mode to active modes variety of power-down modes, such as a wakeon-radio feature help keeping RF transceiver active while the microcontroller sleeps (higher efficiency!)
ATMega128RFA1 Features: Max clock 16MHz 2-cycle on chip multiplier 10-bit ADC, analog comparator 2xUSART, TWI, SPI RTC Case: 64-pin QFN
ATMega128RFA1
Introduction - PIC
Introduction
Introduction Source: [1]
Introduction - Architecture Main features: 8-bit RISC processors with modified Harvard architecture (instructions and data on separate busses) Two-stage pipelining Single word instructions
PIC10
PIC10
PIC10 Main features (1/2): Very simplified RISC processors Very few instructions (~30) Low clock rate, Difficulties in assembler programming Most instructions executed in one instruction clock cycle (1/4 clock rate) Clock range up to 4MHz
PIC10 Main features (2/2): Very tiny amount of program memory (< 750B) Almost no SRAM (< 24B) Small and very small cases (SOT23-6, DFN8, PDIP8) Very low power consumption (NanoWatt) Low voltage supply from 2V to 5V
PIC10F200 block diagram Source: [2]
PIC10F200 pinout Source: [2]
PIC10F200 instructions (33!)
PIC10F200 instructions (33!)
PIC12
PIC12 Main features (1/2): Simplified RISC processors Few instructions (>30) Decent clock rate, Difficulties in assembler programming Most instructions executed in one instruction clock cycle (1/4 clock rate) Clock range up to 20MHz
PIC12 Main features (2/2): Small amount of program memory (< 3750B) Almost no SRAM (< 128B) Small and very small cases (MSOP8, DFN8, PDIP8) Very low power consumption (NanoWatt) Low voltage supply from 2V to 5V
PIC12F615 block diagram Source: [3]
PIC16
PIC16
PIC16 Main features (1/3): RISC processors Rich family of processors More assembler instructions than in PIC10 and PIC12 Most instructions executed in one instruction clock cycle (1/4 clock rate) Good performance - clock range up to 32MHz
PIC16 Main features (2/3): More than 75 products @ 20 MHz Up to 16kB of program memory Up to1024b of SRAM EEPROM present (but not in all devices) Low power consumption (NanoWatt) Low voltage supply from 1.8V to 5V
PIC16 Main features (3/3): 10-bit ADC Analog comparator UART, USB, SPI USB Timers (PWM) Cap Sense LCD Drivers
PIC18
PIC18
PIC18 Main features : Efficient RISC processors Good performance up to 16MIPS Clock range up to 64MHz Low power consumption (nanowatt) Large number of different peripherals
PIC18 Main features : >200 devices: 18-100 pins Up to 128 KB Flash, 4 KB RAM, 1KB EEPROM Advanced Peripherals: -USB, Ethernet, CAN - 10 & 12-bit ADCs - Charge Time Measurement Unit - Integrated LCD Drivers - Peripheral Pin Select
Source: [5] PIC18
PIC18F2685 multiplier PIC18 processors have 8x8 hardware multipliers larger efficiency at the same cost Source: [5]
PIC18F47J53 nanowatt XLP Main features : Deep Sleep mode: CPU off, Peripherals off, Currents Down to 13 na and 850 na with RTCC Able to wake-up on external triggers, programmable WDT or RTCC alarm Sleep mode: CPU off, Peripherals off, SRAM on, Fast Wake-up, Currents Down to 105 na Typical Idle: CPU off, Peripherals on, Currents Down to 2.3 ua Typical Run: CPU on, Peripherals on, Currents Down to 6.2 ua Typical Watchdog Timer: 0.8 µa, 2V Typical
PIC18F47J53 PMP PMP Parallel Master Port 8-bit, highly configurable, parallel I/O module designed to communicate with a wide variety of parallel devices: communication peripherals, LCDs, external memory devices and microcontrollers
PIC18F47J53 PMP Main features : Up to 16 bits of addressing when using data/address multiplexing Up to 8 Programmable Address Lines One Chip Select Line Programmable Strobe Options: Individual Read and Write Strobes or; Read/Write Strobe with Enable Strobe Address Auto-Increment/Auto-Decrement Programmable Polarity on Control Signals Programmable Wait States Selectable Input Voltage Levels
PIC18F47J53 PMP
PIC18F47J53 RTCC RTCC Real Time Clock and Callendar Time: hours, minutes and seconds 24-hour format (military time) Calendar: weekday, date, month and year Alarm configurable Year range: 2000 to 2099 Leap year correction BCD format for compact firmware Optimized for low-power operation User calibration with auto-adjust Calibration range: +/-2.64 seconds error per month Requirements: external 32.768 khz clock crystal
Thank you for your attention
References [1] www.atmel.com [2] ATTiny10 documentation; www.atmel.com [3] ATMega64 documentation; www.atmel.com [4] ATxMega64A1 documentation; www.atmel.com [5] www.microchip.com [6] PIC10F200 documentation; www.microchip.com [7] PIC12F615 documentation; www.microchip.com [8] PIC16F1934 documentation; www.microchip.com [9] PIC18F2685 documentation; www.microchip.com