Presentation is loading. Please wait.

Presentation is loading. Please wait.

Designing with Components Wilmer Arellano. How to chose a Microcontroller Choose one that you are familiar with or that is easy to learn.

Similar presentations


Presentation on theme: "Designing with Components Wilmer Arellano. How to chose a Microcontroller Choose one that you are familiar with or that is easy to learn."— Presentation transcript:

1 Designing with Components Wilmer Arellano

2

3 How to chose a Microcontroller Choose one that you are familiar with or that is easy to learn

4 How to chose a Microcontroller When possible select a self contained board that can be used as a learning lab

5 http://www.mikroe.com/

6 Different MCU Sockets

7 Configurability

8 Power Supply

9 Programmer

10 Main Features dsP4011 High-Performance, Modified RISC CPU: Modified Harvard architecture C compiler optimized instruction set architecture with flexible addressing modes 83 base instructions 24-bit wide instructions, 16-bit wide data path 48 Kbytes on-chip Flash program space (16K instruction words) 2 Kbytes of on-chip data RAM 1 Kbyte of nonvolatile data EEPROM Up to 30 MIPS operation: DC to 40 MHz external clock input 4 MHz-10 MHz oscillator input with PLL active (4x, 8x, 1 6x) 30 interrupt sources: 3 external interrupt sources 8 user-selectable priority levels for each interrupt source 4 processor trap sources 16 x 16-bit working register array

11 http://www.ee.nmt.edu/~rison/ee308_spr99/supp/990119/harvard.gif Harvard Architecture

12 How to chose a Microcontroller Make a pin count per peripheral required ADC, UARTS, etc

13 Pinout and Family Differences

14 How to chose a Microcontroller Additional boards and accessories available may help

15

16 1. Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) 2. Brown-out Reset (BOR): A momentary dip in the power supply to the device has been detected which may result malfunction. 3. The Controller Area Network (CAN) module is a serial interface, useful for communicating with other CAN modules or digital signal controller devices. 4. The 10-bit, high-speed Analog-to-Digital Converter (ADC) allows conversion of an analog input signal to a 10-bit digital number. 5. Input capture is useful for such modes as: Frequency/Period/Pulse Measurements 6. Output Compare is useful in applications requiring operational modes, such as: Generation of Variable Width Output Pulses Power Factor Correction 7. The Inter-Integrated Circuit module provides complete hardware support for both Slave and Multi- Master modes of the 120 serial communication standard with a 16-bit interface. ARITHMETICS Program Memory Data Memory With two address generators Input/Output Ports Peripherals Program Counter

17 8. The Serial Peripheral Interface (SPI) module is a synchronous serial interface. It is useful for communicating with other peripheral devices, such as EEPROMs, shift registers, display drivers and A/D converters, or other microcontrollers. 9. Timers 5x16 bit timers 10. The QEI module provides the interface to incremental encoders for obtaining mechanical position data. 11. PWM. This module simplifies the task of generating multiple, synchronized Pulse-Width Modulated (PWM) outputs. In particular, the following power and motion control applications are supported by the PWM module: 12. UART. UNIVERSAL ASYNCHRONOUS RECEIVER TRANSMITTER: Full-Duplex, 8 or 9-bit Data Communication 13. PSV Program Space Visibility Program Memory Data Memory With two address generators Input/Output Ports Peripherals Program Counter ARITHMETICS

18 How to chose a Microcontroller Select one where many libraries are available

19

20

21 How to chose a Microcontroller Make sure that good online documentation is available http://www.mikroe.com/en/books/ http://arduino.cc/en/Tutorial/HomePage

22 How to chose a Microcontroller If you are new to this type of components and the project allows: Start with a simple microcontroller

23

24 Traffic Light Control  Int ledRed = 13; int ledGreen = 11; int ledYellow = 12;  void setup() { pinMode(ledRed, OUTPUT); // sets the digital pin as output pinMode(ledYellow, OUTPUT); // sets the digital pin as output pinMode(ledGreen, OUTPUT); // sets the digital pin as output }  void loop() { digitalWrite(ledGreen, HIGH); // sets the Green LED on delay(1000); // waits for a second digitalWrite(ledGreen, LOW); // sets the Green LED off digitalWrite(ledYellow,HIGH); // sets the Yellow LED on delay(1000); // waits for a second digitalWrite(ledYellow, LOW); // sets the Yellow LED off digitalWrite(ledRed, HIGH); // sets the Red LED on delay(1000); // waits for a second digitalWrite(ledRed, LOW); // sets the Reed LED off }

25 Arduino USB Board

26

27

28 Arduino Ethernet Shield

29

30 Example #include // network configuration. gateway and subnet are optional. byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; byte ip[] = { 10, 0, 0, 177 }; byte gateway[] = { 10, 0, 0, 1 }; byte subnet[] = { 255, 255, 0, 0 }; // telnet defaults to port 23 Server server = Server(23); void setup() { // initialize the ethernet device Ethernet.begin(mac, ip, gateway, subnet); // start listening for clients server.begin(); } void loop() { Client client = server.available(); if (client) { server.write(client.read()); }

31 Arduino Mega

32 ATmega64O/1 280/1281/2560/2561

33

34 How to chose a Microcontroller Make sure you can meet the throughput One line of C code can transform into many lines of assembly If necessary take one step further

35 ColdFire V1 ColdFire® Core brings 8-bit ease of use to 32-bit performance V2 ColdFire Core

36

37 ColdFire V3 ColdFire Core: Single-Issue + Pipelined Local Refined instruction prefetch pipeline Branch prediction capabilities Higher frequencies of operation V4e ColdFire Core: Limited Superscalar High performance IP Core for the 68K/ColdFire family Partial superscalar execution Harvard memory architecture resulting in enhanced bandwidth Support for variable sized instruction caches and data caches Minimal change-of-flow program execution time via sophisticated 2 level branch acceleration Virtual memory management unit (MMU)

38 2 Steps Forward

39 16 Channel PWM. http://www.adafruit.com/blog/2012/12/11/player-piano-plays-wikipedia-modifications-uses-adafruit-16-channel-12-bit-pwmservo-driver- raspberrypi-raspberry_pi/

40 3 Steps Forward

41 Summary 1. Choose one that you are familiar with or that is easy to learn 2. When possible select a self contained board that can be used as a learning lab 3. Make a pin count per peripheral required ADC, UARTS, etc 4. Additional boards and accessories available may help 5. Select one where many libraries are available 6. If you are new to this type of components and the project allows: Start with a simple one 7. Make sure you can meet the throughput One line of C code can transform into many lines of assembly 8. If necessary take 1, 2, or 3 steps further


Download ppt "Designing with Components Wilmer Arellano. How to chose a Microcontroller Choose one that you are familiar with or that is easy to learn."

Similar presentations


Ads by Google