Planering inbyggda system

From Datateknik
(Difference between revisions)
Jump to: navigation, search
(Kursböcker)
(Kursböcker (2.5hp))
 
(50 intermediate revisions by one user not shown)
Line 3: Line 3:
 
Because Oct 31 == Dec 25
 
Because Oct 31 == Dec 25
  
=Kursböcker=
+
'''ISY200 1 Embedded systems (Embedded systems) 2,5 hp Grundnivå IV'''
Kursbok [[File:BOKfastandeffectiveembeddedsystemsdesign.png|x150px]]
+
  
Referenslitteratur [[File:BOKperryxiao.jpg|x150px]]
+
G1F - grundnivå, har mindre än 60 hp kurs/er på grundnivå som förkunskapskrav
 +
'''Förkunskapskrav:'''
 +
GPP101 - Grundläggande Programmering med Python (LÄGG TILL "eller GPP100")
 +
DAK100 - Datorarkitektur
 +
ELK202 - Elektronik, grundläggande
  
Böcker rekommenderade av ARM: https://os.mbed.com/cookbook/Books
+
=Kursböcker (2.5hp)=
 +
Kursbok: [[File:BOKfastandeffectiveembeddedsystemsdesign.png|x150px]] [[http://www.embedded-knowhow.co.uk/Book_3_Ed2.htm hemsida]]
 +
,  
 +
 
 +
Referenslitteratur [[File:BOKperryxiao.jpg|x150px]] Lösenord: "applications" [[https://www.wiley.com/WileyCDA/Section/id-830821.html hemsida]]
 +
 
 +
Andra böcker rekommenderade av ARM: https://os.mbed.com/cookbook/Books
 +
 
 +
= SCHEMA =
 +
 
 +
* 2h föreläsning
 +
* 2h datasal (helklass) Rita kretsdiagram + man skriver färdigt programmen för LABBEN
 +
** Startar tidigast kl 15.15 - Robert går efter 20 minuter
 +
* 3h halvklass LABBEN (förkrav programmering och skisser SKALL vara klara)
 +
Summa: 10h i sal för Robert (per vecka)
 +
 
 +
0.5 hp per uppgift ger 2.5hp totalt
 +
 
 +
<p style="page-break-after: always;">&nbsp;</p>
  
 
= LABBAR =
 
= LABBAR =
 +
[[file:keystone-examples.jpg|x150pxl]]
 +
 +
Installation:
 +
* DYR Keystone-Blind  https://www.dustin.se/product/5010795548/adapter
 +
* 49kr Keystonemonteringsplatta, 1port, https://www.dustin.se/product/5010873378/keystonemonteringsplatta
 +
* 10" keystone patchpanel  https://www.dustin.se/product/5011085091/patchpanel
 +
* 70mm dosa??, 2st https://www.dustin.se/product/5011071355/exxact-2-port-keystone-wall-socket
 +
* 37kr Banana Keystone Black https://www.elfa.se/en/speaker-module-black-tuk-limited-kspbk/p/30142043
 +
* 37kr Banana Keystone Red https://www.elfa.se/en/speaker-module-red-tuk-limited-ksprd/p/30142044?track=true
 +
*
 
Hardware:  
 
Hardware:  
 
* LPC1768 [https://www.mouser.se/ProductDetail/NXP-Semiconductors/OM11043598?qs=sGAEpiMZZMtw0nEwywcFgMZY9wrACQssuxRMKF%252Bad2Q%3D Mouser 522kr]
 
* LPC1768 [https://www.mouser.se/ProductDetail/NXP-Semiconductors/OM11043598?qs=sGAEpiMZZMtw0nEwywcFgMZY9wrACQssuxRMKF%252Bad2Q%3D Mouser 522kr]
 
* I/O Board [https://www.mouser.se/ProductDetail/Seeed-Studio/103990015?qs=sGAEpiMZZMtw0nEwywcFgJyDZ86X%2FJy4lYdefUidtmLr7tBINIM9ug%3D%3D Mouser 751kr]  
 
* I/O Board [https://www.mouser.se/ProductDetail/Seeed-Studio/103990015?qs=sGAEpiMZZMtw0nEwywcFgJyDZ86X%2FJy4lYdefUidtmLr7tBINIM9ug%3D%3D Mouser 751kr]  
 +
* Keil LPC1769 Evaluation Board [[file:Keil-LPC1769-Evaluation-Board.png|x100px]]
 
== Labb 1 - von Neumann &amp; Assemblerprogrammering ==
 
== Labb 1 - von Neumann &amp; Assemblerprogrammering ==
'''von Neumann'''
+
'''skriv "assembler" för von Neumann (fetch-decode-execute)'''
 
* Fetch-Decode-Store CYCLE
 
* Fetch-Decode-Store CYCLE
 
** BBC: https://www.bbc.co.uk/bitesize/guides/z2342hv/revision/5 (Inqluding test!!)
 
** BBC: https://www.bbc.co.uk/bitesize/guides/z2342hv/revision/5 (Inqluding test!!)
Line 43: Line 75:
 
Glöm inte att ändra till '''gcc för ARM'''
 
Glöm inte att ändra till '''gcc för ARM'''
  
==Labb 2 - Blinky LED etc etc ==
+
<p style="page-break-after: always;">&nbsp;</p>
 +
 
 +
==Labb 2 - 2Blinky LED, 3(DigitalIn + Digital Out + Interfacing OptoSensor) ==
 +
Projekt: Kan man digitalt läsa av en fläkts RPM med en digital brutare? (smatterband :-)
 +
 
 +
<font size="+2">Digital I/O</font>
 
* 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 (LPC1768) programmed with web-based compiler (MBED) [[File:LPC1768withUSBcable.jpg|x300px]] [[File:mbed-webIDE.png|x300px]]
 
* Physical device (LPC1768) programmed with web-based compiler (MBED) [[File:LPC1768withUSBcable.jpg|x300px]] [[File:mbed-webIDE.png|x300px]]
Line 71: Line 108:
 
  3.8 Mini Project: Letter Counter ........................................................................ 65
 
  3.8 Mini Project: Letter Counter ........................................................................ 65
  
==Labb 3 ==
+
<p style="page-break-after: always;">&nbsp;</p>
Chapter 4. Analog Output
+
4.1. Introducing Data Conversion
+
4.2. Analog Outputs on the mbed
+
4.3. Another Form of Analog Output: Pulse Width Modulation
+
4.4. Pulse Width Modulation on the mbed
+
==Labb 4: Chapter 5. Analog Input==
+
5.1. Analog-to-Digital Conversion (ADC)
+
5.2. Combining Analog Input and Output
+
5.3. Processing Data From Analog Inputs
+
5.4. Some Simple Analog Sensors
+
5.5. Exploring Data Conversion Timing
+
Chapter 6. Further Programming Techniques
+
Chapter 7. Starting with Serial Communication
+
==h2==
+
  
  Chapter 4. Analog Output
+
==Labb 3 - Analog I/O (4.1+5.1) ==
 +
Projekt? Analog PWM-styrning av CPU-fläkt och avläsning av RPM
 +
   
 +
<font size="+2">Analog I/O</font>
 +
 
 +
Chapter 4. Analog Output  
 
  4.1. Introducing Data Conversion
 
  4.1. Introducing Data Conversion
 
  4.2. Analog Outputs on the mbed
 
  4.2. Analog Outputs on the mbed
  4.3. Another Form of Analog Output: Pulse Width Modulation
+
4.3. Another Form of Analog Output: Pulse Width Modulation
 
  4.4. Pulse Width Modulation on the mbed
 
  4.4. Pulse Width Modulation on the mbed
Chapter Review
+
Chapter 5. Analog Input
 
+
Chapter 5. Analog Input
+
 
  5.1. Analog-to-Digital Conversion (ADC)
 
  5.1. Analog-to-Digital Conversion (ADC)
 
  5.2. Combining Analog Input and Output
 
  5.2. Combining Analog Input and Output
Line 103: Line 129:
 
  Chapter Review
 
  Chapter Review
  
Chapter 6. Further Programming Techniques
+
==Labb 4 - Serial Communication (7:SPI,I2C,Asynch,USB) ==
6.1. The Benefits of Considered Program Design and Structure
+
6.2. Functions
+
6.3. Program Design
+
6.4. Working With Functions on the mbed
+
6.5. Using Multiple Files in C/C++
+
6.6. Modular Program Example
+
6.7. Working With Bespoke Libraries
+
Chapter Review
+
  
  References
+
   
 +
<font size="+2">Serial Communication </font>
 
  Chapter 7. Starting with Serial Communication
 
  Chapter 7. Starting with Serial Communication
 
  7.1. Introducing Synchronous Serial Communication
 
  7.1. Introducing Synchronous Serial Communication
Line 126: Line 145:
 
  7.10. Mini Project: Multinode I2C Bus
 
  7.10. Mini Project: Multinode I2C Bus
 
  Chapter Review
 
  Chapter Review
 
+
==Labb 5 - Interrupts, Timers (Chapter 9)==
Chapter 8. Liquid Crystal Displays
+
Chapter 9. Interrupts, Timers, and Tasks
8.1. Display Technologies
+
8.2. Using the PC1602F LCD
+
8.3. Using the mbed TextLCD Library
+
8.4. Displaying Analog Input Data on the LCD
+
8.5. Pixel Graphics—Implementing the NHD-C12832 Display
+
8.6. Color LCDs—Interfacing the uLCD-144-G2
+
8.7. Mini Project: Digital Spirit Level
+
Chapter Review
+
 
+
Chapter 9. Interrupts, Timers, and Tasks
+
 
  9.1. Time and Tasks in Embedded Systems
 
  9.1. Time and Tasks in Embedded Systems
 
  9.2. Responding to External Events
 
  9.2. Responding to External Events
Line 150: Line 159:
 
  9.11. Where Do We Go From Here? The Real-Time Operating System
 
  9.11. Where Do We Go From Here? The Real-Time Operating System
 
  9.12. Mini Projects
 
  9.12. Mini Projects
 +
Chapter Review
 +
 +
==Labb 6 - Power (Ch15.4 - 15.6: Power Consumption)==
 +
Chapter 15. Hardware Insights: Clocks, Resets, and Power Supply
 +
15.1. Hardware Essentials
 +
15.2. Clock Sources and Their Selection
 +
15.3. Reset
 +
'''15.4. Toward Low Power'''
 +
'''15.5. Exploring mbed Power Consumption'''
 +
'''15.6. Getting Serious About Low Power; the M0/M0+ Cores and the Zero Gecko'''
 +
Chapter Review
 +
 +
= Chapters NOT included =
 +
 +
 +
Chapter 6. Further Programming Techniques
 +
6.1. The Benefits of Considered Program Design and Structure
 +
6.2. Functions
 +
6.3. Program Design
 +
6.4. Working With Functions on the mbed
 +
6.5. Using Multiple Files in C/C++
 +
6.6. Modular Program Example
 +
6.7. Working With Bespoke Libraries
 +
Chapter Review
 +
References
 +
 +
Chapter 10. Memory and Data Management
 +
10.1. A Memory Review
 +
10.2. Introducing Pointers
 +
10.3. Using Data Files With the mbed
 +
10.4. Example mbed Data File Access
 +
10.5. Using External SD Card Memory With the mbed
 +
10.6. Using External USB Flash Memory With the mbed
 +
10.7. Mini Project: Accelerometer Data Logging on Exceeding Threshold
 +
Chapter Review
 +
 +
Chapter 6. Further Programming Techniques
 +
6.1. The Benefits of Considered Program Design and Structure
 +
6.2. Functions
 +
6.3. Program Design
 +
6.4. Working With Functions on the mbed
 +
6.5. Using Multiple Files in C/C++
 +
6.6. Modular Program Example
 +
6.7. Working With Bespoke Libraries
 +
Chapter Review
 +
References
 +
 +
Chapter 8. Liquid Crystal Displays
 +
8.1. Display Technologies
 +
8.2. Using the PC1602F LCD
 +
8.3. Using the mbed TextLCD Library
 +
8.4. Displaying Analog Input Data on the LCD
 +
8.5. Pixel Graphics—Implementing the NHD-C12832 Display
 +
8.6. Color LCDs—Interfacing the uLCD-144-G2
 +
8.7. Mini Project: Digital Spirit Level
 
  Chapter Review
 
  Chapter Review
  

Latest revision as of 22:52, 3 November 2019

Why do computer scientists confuse Halloween and Christmas?

Because Oct 31 == Dec 25

ISY200 1 Embedded systems (Embedded systems) 2,5 hp Grundnivå IV

G1F - grundnivå, har mindre än 60 hp kurs/er på grundnivå som förkunskapskrav

Förkunskapskrav:
GPP101 - Grundläggande Programmering med Python (LÄGG TILL "eller GPP100")
DAK100 - Datorarkitektur
ELK202 - Elektronik, grundläggande

Contents

[edit] Kursböcker (2.5hp)

Kursbok: BOKfastandeffectiveembeddedsystemsdesign.png [hemsida] ,  

Referenslitteratur BOKperryxiao.jpg Lösenord: "applications" [hemsida]

Andra böcker rekommenderade av ARM: https://os.mbed.com/cookbook/Books

[edit] SCHEMA

  • 2h föreläsning
  • 2h datasal (helklass) Rita kretsdiagram + man skriver färdigt programmen för LABBEN
    • Startar tidigast kl 15.15 - Robert går efter 20 minuter
  • 3h halvklass LABBEN (förkrav programmering och skisser SKALL vara klara)

Summa: 10h i sal för Robert (per vecka)

0.5 hp per uppgift ger 2.5hp totalt

 

[edit] LABBAR

x150pxl

Installation:

Hardware:

[edit] Labb 1 - von Neumann & Assemblerprogrammering

skriv "assembler" för von Neumann (fetch-decode-execute)

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

 

[edit] Labb 2 - 2Blinky LED, 3(DigitalIn + Digital Out + Interfacing OptoSensor)

Projekt: Kan man digitalt läsa av en fläkts RPM med en digital brutare? (smatterband :-)

Digital I/O

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

 

[edit] Labb 3 - Analog I/O (4.1+5.1)

Projekt? Analog PWM-styrning av CPU-fläkt och avläsning av RPM

Analog I/O

Chapter 4. Analog Output

4.1. Introducing Data Conversion
4.2. Analog Outputs on the mbed
4.3. Another Form of Analog Output: Pulse Width Modulation
4.4. Pulse Width Modulation on the mbed

Chapter 5. Analog Input

5.1. Analog-to-Digital Conversion (ADC)
5.2. Combining Analog Input and Output
5.3. Processing Data From Analog Inputs
5.4. Some Simple Analog Sensors
5.5. Exploring Data Conversion Timing
5.6. Mini Projects
Chapter Review

[edit] Labb 4 - Serial Communication (7:SPI,I2C,Asynch,USB)

Serial Communication

Chapter 7. Starting with Serial Communication
7.1. Introducing Synchronous Serial Communication
7.2. SPI
7.3. Intelligent Instrumentation
7.4. Evaluating SPI
7.5. The I2C Bus
7.6. Communicating With I2C-Enabled Sensors
7.7. Evaluating I2C
7.8. Asynchronous Serial Data Communication
7.9. USB
7.10. Mini Project: Multinode I2C Bus
Chapter Review

[edit] Labb 5 - Interrupts, Timers (Chapter 9)

Chapter 9. Interrupts, Timers, and Tasks

9.1. Time and Tasks in Embedded Systems
9.2. Responding to External Events
9.3. Simple Interrupts on the mbed
9.4. Getting Deeper Into Interrupts
9.5. An Introduction to Timers
9.6. Using the mbed Timer
9.7. Using the mbed Timeout
9.8. Using the mbed Ticker
9.9. The Real-Time Clock
9.10. Switch Debouncing
9.11. Where Do We Go From Here? The Real-Time Operating System
9.12. Mini Projects
Chapter Review

[edit] Labb 6 - Power (Ch15.4 - 15.6: Power Consumption)

Chapter 15. Hardware Insights: Clocks, Resets, and Power Supply

15.1. Hardware Essentials
15.2. Clock Sources and Their Selection
15.3. Reset
15.4. Toward Low Power
15.5. Exploring mbed Power Consumption
15.6. Getting Serious About Low Power; the M0/M0+ Cores and the Zero Gecko
Chapter Review

[edit] Chapters NOT included

Chapter 6. Further Programming Techniques
6.1. The Benefits of Considered Program Design and Structure
6.2. Functions
6.3. Program Design
6.4. Working With Functions on the mbed
6.5. Using Multiple Files in C/C++
6.6. Modular Program Example
6.7. Working With Bespoke Libraries
Chapter Review
References
Chapter 10. Memory and Data Management
10.1. A Memory Review
10.2. Introducing Pointers
10.3. Using Data Files With the mbed
10.4. Example mbed Data File Access
10.5. Using External SD Card Memory With the mbed
10.6. Using External USB Flash Memory With the mbed
10.7. Mini Project: Accelerometer Data Logging on Exceeding Threshold
Chapter Review
Chapter 6. Further Programming Techniques
6.1. The Benefits of Considered Program Design and Structure
6.2. Functions
6.3. Program Design
6.4. Working With Functions on the mbed
6.5. Using Multiple Files in C/C++
6.6. Modular Program Example
6.7. Working With Bespoke Libraries
Chapter Review
References
Chapter 8. Liquid Crystal Displays
8.1. Display Technologies
8.2. Using the PC1602F LCD
8.3. Using the mbed TextLCD Library
8.4. Displaying Analog Input Data on the LCD
8.5. Pixel Graphics—Implementing the NHD-C12832 Display
8.6. Color LCDs—Interfacing the uLCD-144-G2
8.7. Mini Project: Digital Spirit Level
Chapter Review
Chapter 10. Memory and Data Management
10.1. A Memory Review
10.2. Introducing Pointers
10.3. Using Data Files With the mbed
10.4. Example mbed Data File Access
10.5. Using External SD Card Memory With the mbed
10.6. Using External USB Flash Memory With the mbed
10.7. Mini Project: Accelerometer Data Logging on Exceeding Threshold
Chapter Review
Part II. Moving to Advanced and Specialist Applications
Chapter 11. Wireless Communication – Bluetooth and Zigbee
11.1. Introducing Wireless Data Communication
11.2. Bluetooth
11.3. Zigbee
11.4. Mini Projects
Chapter Review
Chapter 12. Internet Communication and Control
12.1. Introduction to Internet Communication
12.2. The Ethernet Communication Protocol
12.3. Local Area Network Communications With the mbed
12.4. Using Remote Procedure Calls With the mbed
12.5. Using the mbed With Wide Area Networks
12.6. The Internet of Things
Chapter Review
Chapter 13. Working With Digital Audio
13.1. An Introduction to Digital Audio
13.2. USB MIDI on the mbed
13.3. Digital Audio Processing
13.4. Digital Audio Filtering Example
13.5. Delay/Echo Effect
13.6. Working With Wave Audio Files
13.7. High-Fidelity Digital Audio With the mbed
13.8. Summary on Digital Audio and Digital Signal Processing
13.9. Mini Project: Portable Music Player
Chapter Review
Chapter 14. Letting Go of the mbed Libraries
14.1. Introduction: How Much Do We Depend on the mbed API
14.2. Control Register Concepts
14.3. Digital Input/Output
14.4. Getting Deeper Into the Control Registers
14.5. Using the DAC
14.6. Using the ADC
14.7. A Conclusion on Using the Control Registers
Chapter Review
Chapter 15. Hardware Insights: Clocks, Resets, and Power Supply
15.1. Hardware Essentials
15.2. Clock Sources and Their Selection
15.3. Reset
15.4. Toward Low Power
15.5. Exploring mbed Power Consumption
15.6. Getting Serious About Low Power; the M0/M0+ Cores and the Zero Gecko
Chapter Review
Chapter 16. Developing Commercial Products With mbed
16.1. Embedded Systems Design Process
16.2. Using mbed-Enabled Platforms in Commercial Products
16.3. Implementing the mbed Architecture on a Bespoke Printed Circuit Board
16.4. Programming the LPC1768 Directly
16.5. Case Study: Irisense Temperature Logger With Touch Screen Display
16.6. Closing Remarks
Chapter Review
Quiz
Personal tools
Namespaces

Variants
Actions
Navigation
Tools