Freescale ARM I/O Programming

Slides:



Advertisements
Similar presentations
3-1 Peripherals & I/O lines All the on-chip peripherals are configured and controlled through Special Function Registers (SFR) Many of the SFR’s are bit.
Advertisements

Georgia Tech Digital Back-end µHRG interface Curtis Mayberry School of Electrical and Computer Engineering Georgia Institute of Technology January 13 th,
Input/Output (I/O) Ports and Interfacing
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.
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
1-1 SYS Module System Clocks FXTAL BCLK Reset Circuit Reset Conditions Bootstrap Initialization.
Multiplexed External Bus Interface-MEBIV3 By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg., SITS, Pune-41
3-1 Digital I/O A group of I/O pins is called a PORT  A port is where data enters/leaves the system. Digital I/O pins are usually grouped into 8,16 or.
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
Lecture 2 Silicon Labs C8051F020 System Overview.
ECS642U Embedded Systems Digital I/O William Marsh.
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
7/23 Coldfire 5211 Signals and IO Multiplexing Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Eric Glover Steve Andre Shaun Greene Russell Willmot.
Chapter 3 Parallel Ports, Power Supply and the Clock Oscillator The aims of this chapter are to introduce: Why we need parallel input/output; How simple.
RenBED – Technical Training Jon Fuge – Renishaw plc.
TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.
Chapter 2 MSP432 ARM I/O Programming 1. Chapter Review Section 2.1: MSP432 Microcontroller and LaunchPad Section 2.2: GPIO (General Purpose I/O) Programming.
Mobile phone keypad sensed password entry for door opening.
1 The LPC1768 Architecture (with focus on Cortex-M3)
Project Title PASSWORD BASED CIRCUIT BREAKER CONTROL TO ENSURE ELECTRIC LINE MAN’S SAFETY Under the Guidance of Submitted by.
Cypress Roadmap: Platform PSoC®
Outline Introduction to NuMaker TRIO Programming environment setup
CC2430 module Jinho Son Real-Time System Lab.
REMOTE CONTROL OF A MECHATRONICS SYSTEM WITH WIRELESS COMMUNICATIONS
Fundamentals of Computer Engineering
I/O Systems.
Input/Output Ports and Interfacing
ABSTRACT The controller continuously polls the temperature with certain regular time intervals and displays over the 7_segment display The temperature.
TI ARM I/O Programming Chapter 2
Microcontrollers & GPIO
PRE-PROGRAMMED DIGITAL SCROLLING MESSAGE
For further information
Cypress Roadmap: CapSense® Controllers
Refer to Chapter 5 in the reference book
SUBMITTED BY EDGEFX TEAM
Lecture 15 PicoBlaze Overview
Refer to Chapter 10 in the reference book
Project Title ARDUINO BASED WIRELESS ELECTRICAL APPARATUS CONTROL SYSTEM USING IR COMMUNICATION Under the Guidance of Submitted by.
Under the Guidance of Submitted by
COMP2121: Microprocessors and Interfacing
Atmel ARM I/O Programming
Under the Guidance of Submitted by
Freescale ARM Timer Programming
Programming Microcontroller GPIO – General Purpose Input/Output
The Arduino Microcontroller: Atmel AVR Atmega 328
Introduction to Microprocessors and Microcontrollers
UART Serial Port Programming
STM Arm I/O Programming
ریز پردازنده. ریز پردازنده مراجع درس میکروکنترلرهای AVR برنامه نویسی اسمبلی و C محمدعلی مزیدی، سپهر نعیمی و سرمد نعیمی مرجع کامل میکروکنترلرهای AVR.
ADC, DAC, and Sensor Interfacing
ADC, DAC, and Sensor Interfacing
SPI Protocol and DAC Interfacing
I2C Protocol and RTC Interfacing
Lecturer: Reza Arjmandi Autumn 2015
Baremetal C Programming for Embedded Systems
Cypress Roadmap: CapSense® Controllers
8051 Micro Controller.
SPI Protocol and Programming
UNIT-III Pin Diagram Of 8086
Wireless Embedded Systems
I/O Programming with Arduino
Under the Guidance of Submitted by
TI LaunchPad I/O Programming with Energia
Arduino Board.
Arduino म्हणजे काय?.
Speaker: Yu-Ju Cho 卓余儒 Advisor: Prof. An-Yeu Wu 吳安宇教授
Costas Foudas, Imperial College, Rm: 508, x47590
Presentation transcript:

Freescale ARM I/O Programming Chapter 2 Freescale ARM I/O Programming

Freescale KL25Z128VLK4 Microcontroller High-Level Block Diagram

Freescale FRDM Trainer board

Memory Map

Memory Map in KL25Z128VLK4 Allocated size Allocated address Flash   Allocated size Allocated address Flash 128KB 0x00000000 to 0x0001FFFF SRAM 16KB 0x1FFFF000 to 0x20002FFF I/O All the peripherals 0x400FF000 to 0x400FFFFF

GPIO Memory Map

Fields Values Description Some Valid Values Q Qualification status • M = Fully qualified, general market flow • P = Prequalification KL## Kinetis family • KL25 A Key attribute • Z = Cortex-M0+ FFF Program Flash memory size • 32 = 32 KB • 64 = 64 KB • 128 = 128 KB T Temperature range (°C) • V = –40 to 105 PP Package identifier • FM = 32 QFN (5 mm x 5 mm) • FT = 48 QFN (7 mm x 7 mm) • LH = 64 LQFP (10 mm x 10 mm) • LK = 80 LQFP (12 mm x 12 mm) CC Maximum CPU frequency (MHz) • 4 = 48 MHz

Kinetis MCU Portfolio

KL25Z128VLK4 Pin-out

The Data and Direction Registers and a Simplified View of an I/O pin

GPIOx_PDOR (Port Data Output Register)

GPIOx_PDDR (Port Data Direction Register)

Some GPIO Registers for PORTA Address Name Description Type Reset Value 0x400F F000 GPIOA_PDOR Port Data Output Register R/W 0x00000000 0x400F F004 GPIOA_PSOR Port Set Output register W (always reads 0) 0x400F F008 GPIOA_PCOR Port Clear Output Register 0x400F F00C GPIOA_PTOR Port Toggle Output Register 0x400F F010 GPIOA_PDIR Port Data Input Register R 0x400F F014 GPIOA_PDDR Port Data Direction Register

Alternative Functions of Pins

PORTx_PCRn Register is used to select alternate pin functions (from Sec 11.5 of KL25 Ref. Man.)

SIM_SCGC5 (System Clock Gating Control Register 5) Register

LED connection to PTB and PTD Freescale FRDM board

PSOR (Port Set Output Register)

PCOR (Port Clear Output Register)

PTOR (Port Toggle Output Register)

Reference clock source Clock setup modes in Keil MDK-ARM v5 Freescale Kinetis KLxx Series Device Family Support Pack CLOCK_SETUP Mode Reference clock source Core clock Bus clock FLL Engaged Internal slow internal clock 32.768kHz 41.94MHz 13.98MHz 1 PLL Engaged External external crystal 8MHz 48MHz 24MHz 2 Bypassed Low Power External 8MHz

Connecting External Switches to the Microcontroller

PS and PE bits

Seven-Segment

Assignments of port pins to each segments of a 7-seg LED . g f e d c b a

Segment patterns for the 10 decimal digits for a common cathode 7-seg LED Num D7 D6 D5 D4 D3 D2 D1 D0 Hex value   . g f e d c b a 1 0x3F 0x06 2 0x5B 3 0x4F 4 0x66 5 0x6D 6 0x7D 7 0x07 8 0x7F 9 0x6F

Microcontroller Connection to 7-segment LED

Microcontroller Connection to 7-segment LED with Buffer Driver