arm microcontroller course
play

ARM Microcontroller Course May 6, 2015 ARM Microcontroller Course - PowerPoint PPT Presentation

Introduction C Microcontroller ARM Microcontroller Course May 6, 2015 ARM Microcontroller Course Introduction C Microcontroller Table of Contents 1 Introduction 2 C Data types Operators Events 3 Microcontroller ARM Microcontroller


  1. Introduction C Microcontroller ARM Microcontroller Course May 6, 2015 ARM Microcontroller Course

  2. Introduction C Microcontroller Table of Contents 1 Introduction 2 C Data types Operators Events 3 Microcontroller ARM Microcontroller Course

  3. Introduction C Microcontroller The Course 4 Evenings ARM Microcontroller Course

  4. Introduction C Microcontroller The Course 4 Evenings Nucleo-F411RE board ARM Microcontroller Course

  5. Introduction C Microcontroller The Course 4 Evenings Nucleo-F411RE board Programming in C ARM Microcontroller Course

  6. Introduction C Microcontroller The Course 4 Evenings Nucleo-F411RE board Programming in C Manual and Datasheet ARM Microcontroller Course

  7. Introduction C Microcontroller The Course 4 Evenings Nucleo-F411RE board Programming in C Manual and Datasheet Build a Function Generator ARM Microcontroller Course

  8. Introduction C Microcontroller What is a Microcontroller? Processor ARM Microcontroller Course

  9. Introduction C Microcontroller What is a Microcontroller? Processor Memory ARM Microcontroller Course

  10. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory ARM Microcontroller Course

  11. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM ARM Microcontroller Course

  12. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals ARM Microcontroller Course

  13. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals Clock Generator ARM Microcontroller Course

  14. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals Clock Generator Digital General Purpose I/O ARM Microcontroller Course

  15. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals Clock Generator Digital General Purpose I/O Analog I/O (eg. ADC, Comparator) ARM Microcontroller Course

  16. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals Clock Generator Digital General Purpose I/O Analog I/O (eg. ADC, Comparator) Timers ARM Microcontroller Course

  17. Introduction C Microcontroller What is a Microcontroller? Processor Memory Program Memory RAM Peripherals Clock Generator Digital General Purpose I/O Analog I/O (eg. ADC, Comparator) Timers Hardware Serial Communication (eg. UART, SPI, I 2 C) ARM Microcontroller Course

  18. Introduction Data types C Operators Microcontroller Events Table of Contents 1 Introduction 2 C Data types Operators Events 3 Microcontroller ARM Microcontroller Course

  19. Introduction Data types C Operators Microcontroller Events Data types Integer types ( uint8_t , uint16_t , int32_t ,..) ARM Microcontroller Course

  20. Introduction Data types C Operators Microcontroller Events Data types Integer types ( uint8_t , uint16_t , int32_t ,..) Float types ( float , double ,..) ARM Microcontroller Course

  21. Introduction Data types C Operators Microcontroller Events Data types Integer types ( uint8_t , uint16_t , int32_t ,..) Float types ( float , double ,..) Enumerated types ( enum ) ARM Microcontroller Course

  22. Introduction Data types C Operators Microcontroller Events Data types Integer types ( uint8_t , uint16_t , int32_t ,..) Float types ( float , double ,..) Enumerated types ( enum ) Void ( void ) ARM Microcontroller Course

  23. Introduction Data types C Operators Microcontroller Events Data types Integer types ( uint8_t , uint16_t , int32_t ,..) Float types ( float , double ,..) Enumerated types ( enum ) Void ( void ) Derived types (pointers, arrays, structs, unions, function types,..) ARM Microcontroller Course

  24. Introduction Data types C Operators Microcontroller Events Operators Arithmetic + Adds two operands − Subtracts second operand from first ∗ Multiplies both operands / Divides numerator by de-numerator ++ Increases integer by 1 −− Decreases integer by 1 ARM Microcontroller Course

  25. Introduction Data types C Operators Microcontroller Events Operators Logical && Logical AND. Returns True when both operands are non-zero || Logical OR. Returns True when any of the operands is non-zero ! Logical NOT. Reverses the logical state of the operand. ARM Microcontroller Course

  26. Introduction Data types C Operators Microcontroller Events Operators Bitwise & Bitwise AND. Copies bit when it exists in both operands. | Bitwise OR. Copies bit when it exists in either operand. ˆ Bitwise XOR. Copies the bit if set in one operand, but not both. ∼ Flips the bits. << Binary Left Shift. Left operands value is moved left by right number of bits. >> Binary Right Shift. Left operands value is moved right by right number of bits. ARM Microcontroller Course

  27. Introduction Data types C Operators Microcontroller Events Operators Example uint8_t A = 0xEE; // equal to 0b11101110 uint8_t B = 5; // equal to 0b00000101 uint8_t C; // declare C C = A + B; // C = 0b11110011 C = A && B; // C = True = 0b00000001 C = A << 2; // C = 0b10111000 C = A & B; // C = 0b00000100 ARM Microcontroller Course

  28. Introduction Data types C Operators Microcontroller Events Polling and Interrupts Two approaches to checking a state Polling Check a value If changed, perform some action ARM Microcontroller Course

  29. Introduction Data types C Operators Microcontroller Events Polling and Interrupts Two approaches to checking a state Polling Check a value If changed, perform some action Interrupt When a change of a value happens, go immediately to ISR Perform Interrupt Service Routine (ISR) Resume code ARM Microcontroller Course

  30. Introduction C Microcontroller Table of Contents 1 Introduction 2 C Data types Operators Events 3 Microcontroller ARM Microcontroller Course

  31. Introduction C Microcontroller Memory Register ARM Microcontroller Course

  32. Introduction C Microcontroller Memory Register Memory Space ARM Microcontroller Course

  33. Introduction C Microcontroller Memory Register Memory Space Memory Mapped Peripherals ARM Microcontroller Course

  34. Introduction C Microcontroller Memory Register Memory Space Memory Mapped Peripherals Register Name Description 0x0800 0000 Flash Memory Start Address 0x2000 0000 SRAM Start Address 0x4002 0400 GPIOB MODER GPIO Port B Mode register 0x4002 000C GPIOA PUPDR GPIO Port A Pullup register 0x4001 300C SPI1 DR SPI Data register ARM Microcontroller Course

  35. Introduction C Microcontroller Programming in Eclipse The procedure: 1 Read the manual ARM Microcontroller Course

  36. Introduction C Microcontroller Programming in Eclipse The procedure: 1 Read the manual 2 Start a project in Eclipse ARM Microcontroller Course

  37. Introduction C Microcontroller Programming in Eclipse The procedure: 1 Read the manual 2 Start a project in Eclipse 3 Write your code ARM Microcontroller Course

  38. Introduction C Microcontroller Programming in Eclipse The procedure: 1 Read the manual 2 Start a project in Eclipse 3 Write your code 4 Compile the code ARM Microcontroller Course

  39. Introduction C Microcontroller Programming in Eclipse The procedure: 1 Read the manual 2 Start a project in Eclipse 3 Write your code 4 Compile the code 5 Flash to Nucleo board with STLink ARM Microcontroller Course

  40. Introduction C Microcontroller Planning Today: Read the manual 1 1 Yes I know, that was on the previous slide as well. Do it! :-) ARM Microcontroller Course

  41. Introduction C Microcontroller Planning Today: Read the manual Get used to Eclipse ARM Microcontroller Course

  42. Introduction C Microcontroller Planning Today: Read the manual Get used to Eclipse Turn a LED on/off ARM Microcontroller Course

  43. Introduction C Microcontroller Planning Today: Read the manual Get used to Eclipse Turn a LED on/off ARM Microcontroller Course

  44. Introduction C Microcontroller Planning Today: Read the manual Get used to Eclipse Turn a LED on/off What’s yet to come: Timers Analog Peripherals SPI Build a Function Generator using DDS ARM Microcontroller Course

  45. Introduction C Microcontroller Material You can find all material on http://www.scintilla.utwente.nl/docs/cursus Make sure you download: The Manual The Usermanual of the Nucleo-F411RE The Reference Manual of the STM32F411RE ARM Microcontroller Course

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend