MS_uC / dnd / V07 2- 1 Programming and GPIO Programming Microcontroller IDE usage, debugger GPIO – General Purpose Input/Output Week 2 - autumn term 2007.

Slides:



Advertisements
Similar presentations
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Advertisements

Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Chung-Ta King National Tsing Hua University
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
9/20/6Lecture 3 - Instruction Set - Al1 The Hardware Interface.
Microprocessor and Microcontroller
Processor System Architecture
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
MS_uC / dnd / V ARM966E-Mem-JTAG-Clock Programming Microcontroller ARM966E-S specifications: Memory – JTAG - Clock Autumn term K Byte Burst.
MS_uC / dnd / V RTC - Real Time Clock Programming Microcontroller ADC – Analog Digital Converter Autumn term K Byte Burst Flash 64K or 96K.
Refer to Chapter 6, 9 in the reference book
MS_uC / dnd / V TIM - Timer Programming Microcontroller TIM - Timer Autumn term K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.
MS_uC / dnd / V UART - Serial communic. Programming Microcontroller UART – Universal Asynchronous Receiver Transmitter K Byte Burst Flash.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
MS_uC / dnd / V VIC - Vectored Interrupts Programming Microcontroller VIC – Vectored interrupt controller Autumn term K Byte Burst Flash.
MS_uC / dnd / V RTC - Real Time Clock Programming Microcontroller RTC – Real Time Clock Autumn term K Byte Burst Flash 64K or 96K Byte SRAM.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Using PDG with e2studio: Example
Getting Started with a Cortex-M3 Board
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
Asst. Prof. Dr. Alper ŞİŞMAN
NS Training Hardware. Memory Interface Support for SDRAM, asynchronous SRAM, ROM, asynchronous flash and Micron synchronous flash Support for 8,
1-1 SYS Module System Clocks FXTAL BCLK Reset Circuit Reset Conditions Bootstrap Initialization.
NS Training Hardware. System Controller Module.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Atmega32 Architectural Overview
Silicon Labs ToolStick Development Platform
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
System Clocks.
LPC2148 Programming Using BLUEBOARD
ECE Department: University of Massachusetts, Amherst Using Altera CAD tools for NIOS Development.
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
Typical Microcontroller Purposes
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 2.
ECS642U Embedded Systems Digital I/O William Marsh.
1 General Purpose and Alternate Function I/O (GPIO and AFIO)
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Teaching Digital Logic courses with Altera Technology
بسم الله الرحمن الرحيم MEMORY AND I/O.
Multiplex of Data and Address Lines in 8088 Address lines A0-A7 and Data lines D0-D7 are multiplexed in These lines are labelled as AD0-AD7. –By.
Praxis I.  Introduction  Hardware  Software Tools  Microcontroller board  Blinky (simple program to flash a led)  References.
박 유 진.  2.4-GHz IEEE Compliant RF Transceiver  Excellent Receiver Sensitivity ( -97dBm) and Robustness to Interference  6-mm × 6-mm QFN40.
Outline Introduction to NuMaker TRIO Programming environment setup
Lab 1: Using NIOS II processor for code execution on FPGA
Atmega32 Architectural Overview
TI ARM I/O Programming Chapter 2
Microcontrollers & GPIO
Microcontroller Applications
Refer to Chapter 10 in the reference book
Programming Microcontroller ADC – Analog Digital Converter
Dr. Michael Nasief Lecture 2
Programming Microcontroller
Programming Microcontroller
Programming Microcontroller GPIO – General Purpose Input/Output
The Arduino Microcontroller: Atmel AVR Atmega 328
Getting the Most Out of Low Power MCUs
Hardware Source: ttp:// under
8051 Micro Controller.
Wireless Embedded Systems
Presentation transcript:

MS_uC / dnd / V Programming and GPIO Programming Microcontroller IDE usage, debugger GPIO – General Purpose Input/Output Week 2 - autumn term K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte Burst Flash OTP Mem UARTI2CSPI TIMRTC EXT. Bus GPIO USB 2.0FS CAN 2.0B Enet MAC PFQ BC DMA INTR Cntl ARM966 E CORE w/DSP 96 MHz CLK Cntl ADC LVD BOD PLL JTAGETM9

MS_uC / dnd / V Programming and GPIO Please copy examples to a directory of your choice Blinky MyFolder programme\keil\arm\boards\keil\mcbstr9\ copy uVision: [Project -> Open Project...] Select a.uv2 file which is a project file Check processor type:

MS_uC / dnd / V Programming and GPIO compiling Blinky.c... compiling LCD.c... compiling UserFont.c... linking... Program Size: Code=2264 RO-data=96 RW-data=4 ZI-data=1292 ".\Flash\Blinky.axf" - 0 Error(s), 0 Warning(s). [Project -> Rebuild all target files] No errors, no warnings is what we like to see Generated files are found in the Flash folder of the project directory:

MS_uC / dnd / V Programming and GPIO Debug commands Debugging the application: Breakpoint: Execution stopped. Line 055 will be executed next

MS_uC / dnd / V Programming and GPIO Processor insight Only accessible if target is not running

MS_uC / dnd / V Programming and GPIO System and Clock settings

MS_uC / dnd / V Programming and GPIO Peripheral Bridge 1 configuration "slow" peripherals PCG1: Peripheral Clocking Gate Register 1: 0 PRR1: Peripheral Reset Register 1: 0 GPIO7 enabled (LED) After Reset: ports disabled

MS_uC / dnd / V Programming and GPIO Definition zA GPIO is a digital binary signal zIts switching level depends on the technology used zA GPIO normally is programmable as unconnected, input, output zA GPIO might have built-in elements like pull-up, pull- down or ESD devices zA GP Output signal is able to sink (or source) a defined amount of current zA GP Input has a defined Impedance which might be taken into account if a passive sensor is linked to it zA GP Input has a defined hysteresis to avoid "flippering" of the signal "Schmitt Trigger input"

MS_uC / dnd / V Programming and GPIO GPIO debug support in IDE peripherals [Peripherals-I/O Ports] P3 as input P3.6 active SCU_GPIOIN3: all bits connected to input GPIO_DIR7: all bits as output SCU_GPIOOUT7: all bits output Altern1 SCU_GPIOIN7: no copy to input pins SCU_GPIOTYPE7: push-pull output

MS_uC / dnd / V Programming and GPIO General Purpose I/O Variable Pin attribution:

MS_uC / dnd / V Programming and GPIO Pin assignment for peripherals Peripheral# No of Unit Port Assignment IO ModePeriphera l # No of Unit Port Assignment IO Mode ADC8 chann- els P4Always Connected Motor Control 1P6Alt Out CAN1P1, P3, P5Alt In Alt out SSP2P2, P5Alt In Alt Out ETM1P0,P2,P4,P5,P 6, P7 Alt In Alt Out Timers4P0, P4, P6, P7Alt In Alt Out Ethernet MAC 1P0, P1, P5Always Connected UART3P1, P2, P3, P5, P6, P7 Alt In Alt Out EMIMuxP8, P9, P7P7 – Alt Out USB1D+/D- Ext clk – P3 Dedicated pins Non- mux P8, P9, P7P7 – Alt Out External Interrupt 30P3, P5, P6, P7Always Connected Chip Select 4P0, P5, P7Alt OutExternal DMA Req 2P3Always Connected I2C2P0, P1, P2Alt In Alt Out

MS_uC / dnd / V Programming and GPIO GPIO Configuration Registers zSCU_GPIOOUT – select alternative output for a peripheral zSCU_GPIOIN- specify input to a peripheral zSCU_GPIOTYPE- Open Collector or Push-pull zGPIO_DIR – specify direction for standard I/O pin zGPIO_Data – Data register for standard I/O pin ®

MS_uC / dnd / V Programming and GPIO GPIO signal flow

MS_uC / dnd / V Programming and GPIO GPIO registers SCU_GPIOOUTn SCU_GPIOINn SCU_GPIOTYPEm Push-pull Open collector n : [9:2] Port number and alternate function GPIO_DATA GPIO_DIR 00h..3FCh [7..0] GPIO_SEL 400h 420h APB0_Base + Ex: GPIO7 direction register non-buffered:0x5800 D400 SCU_PCGR1_Val SCU_PRR1_Val In File STR91x.s: Peripheral Clock Gating Register Peripheral Reset Register

MS_uC / dnd / V Programming and GPIO ARM Peripheral Bus 0 access (APB0)

MS_uC / dnd / V Programming and GPIO GPIO Access through Memory

MS_uC / dnd / V Programming and GPIO Library source Library examples

MS_uC / dnd / V Programming and GPIO Add library files with new path if necessary:

MS_uC / dnd / V Programming and GPIO Debugging system variables: SCU : System Control Unit 1.) Add a static pointer variable to SCU: int main() { static SCU_TypeDef *sb = SCU; ….. 2.) In Debug mode, add this variable to the watch window ( put cursor onto "sb", then right click) 3.) The structured variable is now visible at address 0x5C Changes in variables will be highlighted when stepping trough the program  There is no live debug symbol or memory updates when the processor is running 0x5C will show GPIO_OUT7