Planering inbyggda system

From Datateknik
(Difference between revisions)
Jump to: navigation, search
(Labb 2 - Blinky LED etc etc)
(Labb 2 - Blinky LED etc etc)
Line 39: Line 39:
 
* You can '''draw''' some awesome diagrams in [https://fritzing.org/home/ fritzing], but you can *NOT* '''simulate''' i.e. make the LED blink
 
* You can '''draw''' some awesome diagrams in [https://fritzing.org/home/ fritzing], but you can *NOT* '''simulate''' i.e. make the LED blink
 
* Physical device programmed with web-based compiler [[File:LPC1768withUSBcable.jpg|x300px]] [[File:mbed-webIDE.png|x300px]]
 
* Physical device programmed with web-based compiler [[File:LPC1768withUSBcable.jpg|x300px]] [[File:mbed-webIDE.png|x300px]]
 +
3.1 Starting to Program................................................................................. 37
 +
  3.1.1 Thinking About the First Program.................................................................. 37
 +
  3.1.2 Using the mbed API ............................................................................... 40
 +
  3.1.3 Exploring the while Loop.......................................................................... 41
 +
3.2 Voltages as Logic Values............................................................................. 42
 +
3.3 Digital Output on the mbed........................................................................... 44
 +
  3.3.1 Using Light Emitting Diodes ...................................................................... 44
 +
  3.3.2 Using mbed External Pins ......................................................................... 46
 +
3.4 Using Digital Inputs................................................................................. 47
 +
  3.4.1 Connecting Switches to a Digital System........................................................... 47
 +
  3.4.2 The DigitalIn API ................................................................................ 48
 +
  3.4.3 Using if to Respond to a Switch Input ............................................................ 49
 +
3.5 Digital Input and Output With the Application Board.................................................. 51
 +
3.6 Interfacing Simple Optodevices ...................................................................... 54
 +
  3.6.1 Optoreflective and Transmissive Sensors........................................................... 54
 +
  3.6.2 Connecting an Optosensor to the mbed.............................................................. 55
 +
  3.6.3 Seven-Segment Displays............................................................................ 56
 +
  3.6.4 Connecting a Seven-Segment Display to the mbed ................................................... 58
 +
3.7 Switching Larger DC Loads............................................................................ 61
 +
  3.7.1 Applying Transistor Switching..................................................................... 61
 +
  3.7.2 Switching a Motor With the mbed................................................................... 63
 +
  3.7.3 Switching Multiple Seven-Segment Displays......................................................... 64
 +
3.8 Mini Project: Letter Counter ........................................................................ 65
  
 
==h2==
 
==h2==

Revision as of 14:33, 15 October 2019

prequel

Contents

Kursböcker

Kursbok BOKfastandeffectiveembeddedsystemsdesign.png

Referenslitteratur BOKperryxiao.jpg


LABBAR

Labb 1 - von Neumann & Assemblerprogrammering

von Neumann

ARM assembler

Vilken assembler passar till följande kod:

int square(int num) {
   register int temp;
   register float x;
 
   temp =  4;
   x = 3.1415;
    
   return temp + (int) x;
}

Kontrollera på sidan https://godbolt.org/ Glöm inte att ändra till gcc för ARM

Labb 2 - Blinky LED etc etc

  • You can draw some awesome diagrams in fritzing, but you can *NOT* simulate i.e. make the LED blink
  • Physical device programmed with web-based compiler LPC1768withUSBcable.jpg Mbed-webIDE.png
3.1 Starting to Program................................................................................. 37
 3.1.1 Thinking About the First Program.................................................................. 37
 3.1.2 Using the mbed API ............................................................................... 40
 3.1.3 Exploring the while Loop.......................................................................... 41
3.2 Voltages as Logic Values............................................................................. 42
3.3 Digital Output on the mbed........................................................................... 44
 3.3.1 Using Light Emitting Diodes ...................................................................... 44
 3.3.2 Using mbed External Pins ......................................................................... 46
3.4 Using Digital Inputs................................................................................. 47
 3.4.1 Connecting Switches to a Digital System........................................................... 47
 3.4.2 The DigitalIn API ................................................................................ 48
 3.4.3 Using if to Respond to a Switch Input ............................................................ 49
3.5 Digital Input and Output With the Application Board.................................................. 51
3.6 Interfacing Simple Optodevices ...................................................................... 54
 3.6.1 Optoreflective and Transmissive Sensors........................................................... 54
 3.6.2 Connecting an Optosensor to the mbed.............................................................. 55
 3.6.3 Seven-Segment Displays............................................................................ 56
 3.6.4 Connecting a Seven-Segment Display to the mbed ................................................... 58
3.7 Switching Larger DC Loads............................................................................ 61
 3.7.1 Applying Transistor Switching..................................................................... 61
 3.7.2 Switching a Motor With the mbed................................................................... 63
 3.7.3 Switching Multiple Seven-Segment Displays......................................................... 64
3.8 Mini Project: Letter Counter ........................................................................ 65

h2

Personal tools
Namespaces

Variants
Actions
Navigation
Tools