The miniDragon+ Board and CodeWarrior Lecture L2.1.

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
Advertisements

7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
Seven Segment Display. What's A 7-Segment Display? A 7-segment display is a package with 7 bar-shaped LEDs arranged to allow the display of many useful.
LED Display. LED Typical LED forward bias voltage: 1.5 to 2.0 V Typical currents needed to light LED range from 2 to 15 mA.
Lab7: Introduction to Arduino
EET 2261 Unit 8 Seven-Segment Displays; S19 Records; System Clocks
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
Example 11 Analog-to-Digital Converter Lecture L5.1.
The Xilinx CPLD Lecture 4.2. XC9500 CPLDs 5 volt in-system programmable (ISP) CPLDs 5 ns pin-to-pin 36 to 288 macrocells (6400 gates) Industry’s.
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Arduino. Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source.
BCD to 7-Segment Display
Lab 6 :Digital Display Decoder: 7 Segment LED display Slide #2 Slide #3 Slide #4 Slide #5 Slide #6 Slide #7 Display Decoder Fundamentals LT Control Input.
ECE 448: Spring 12 Lab 4 – Part 2 Finite State Machines Basys2 FPGA Board.
Figure 1.1 The Altera UP 3 FPGA Development board
Module 2 – Digital I/O Output: Use the digital port to provide signals to display a number on a seven segment light emitting display (LED) display by wiring.
Dr. Hoganson CSIS Segment Display and Count by 16 This is our third lab using the 68HC11 microcontroller. We will write a program that counts by.
BASIC Stamp Editor Once installed, the Stamp Editor will be available on your desktop, and as a menu option under Start  Program Files  Parallax Inc.
Objectives How Microcontroller works
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
1 4-Integrating Peripherals in Embedded Systems (cont.)
1 4-Integrating Peripherals in Embedded Systems. 2 Introduction Single-purpose processors  Performs specific computation task  Custom single-purpose.
Team Members: Ruichen Zhao Xhoua Lor Jen-Yuan Hsiao John Marion.
Digilab2 DIO1 Board. Digilab2 – DIO1 Boards 50 MHz clock mclk Prom socket Spartan IIE.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Interfacing Light-Emitting Diodes (LEDs) & Push Buttons to Microcontrollers.
© 2008 RoboRubik1 11 Technical Communication Skills Practicum Theory of Operation and Hardware Design Narrative.
Parallel Interfacing Chapter 7. Parallel Interfacing Parallel I/O Ports Using Parallel Ports Seven-Segment Displays Keypad Interfacing Liquid Crystal.
Reaction Timer Project
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
Example 11 Analog-to-Digital Converter Lecture L5.1.
Example 12 Pulse-Width Modulation (PWM): Motors and Servos Lecture L8.1.
Counter Circuits and VHDL State Machines
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Examples Lecture L2.2. // Example 1a: Turn on every other segment on 7-seg display #include /* common defines and macros */ #include /* derivative.
Microcontroller based Traffic signal Umer Butt Amna Rashid Izza Rabbani Rozab Naveed Ramesha Akram.
Tutorial 9 Module 8 – 8.1,8.2,8.3. Question 1 Distinguish between vectored and non-vectored interrupts with an example Build a hardware circuit that can.
Atmega328p Introduction for Digital and PWM Output Brion L Fuller II Robotics Club.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Fundamentals of Computer Engineering
TI ARM I/O Programming Chapter 2
Example 14 Real-time Interrupts
UTA010 : Engineering Design – II
Microcontroller 8951S #interface-2.
4-Integrating Peripherals in Embedded Systems
COMP211 Computer Logic Design Introduction to the DE2 Board
Example 19 Measuring Pulse Widths Using Interrupts
4-Integrating Peripherals in Embedded Systems
Arduino.
University of Maryland Baltimore County Department of Computer Science and Electrical Engineering   CMPE 212 Laboratory (Discussion 7) Hasib Hasan
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Example 10 ASCII String to Binary Conversion
Example 5 Pushbutton Switches: S1 and S2
Chapter 2 Push button and Potentiometer
STM Arm I/O Programming
Example 9 Binary to ASCII String Conversion
Example 6 Hex Keypad Lecture L3.2.
Example 15 Interrupt-Driven Controller
Interrupts in C Programs
Example 16 Circular Queue
Example 13 The Serial Peripheral Interface (SPI)
Example 17 SCI Receive Interrupts
Example 7 Liquid Crystal Display
CSCI1600: Embedded and Real Time Software
Example 18 Pulse Train Using Interrupts
CSCI1600: Embedded and Real Time Software
Lab 1. Introduction to the DE2 Board
Lecture 4. Introduction to the DE2 Board
ECE 3567 Microcontrollers Lab
Presentation transcript:

The miniDragon+ Board and CodeWarrior Lecture L2.1

miniDragon+ Serial cable Reset button Power plug 2 pushbutton switches A/D Pot Run/Load switch 7-segment display I/O headers

Table 1.1 Parallel Ports in the MC9SDP256 Port Port NameDDR NameAvailable Pins miniDragon use Port TPTTDDRT7:0 Port SPTSDDRS7:0SCI(1:0) Port MPTMDDRM7:0LCD Port PPTPDDRP7:0 Port HPTHDDRH7:07-Seg Display Port JPTJDDRJ7,6,1,0 Port AD0PORTAD0Input only7:0Switches, pot Port AD1PORTAD1Input only7:0 Port APORTADDRA7:0Keypad Port BPORTBDDRB7:0 Port EPORTEDDRE7:0Mode, XIRQ Port KPORTKDDRK7, 5:0

Port Data Register Px7Px6Px5Px4Px3Px2Px1Px0PORTx Port Data Direction Register DDx7DDx6DDx5DDx4DDx3DDx2DDx1DDx0DDRx DDx[7:0]:Data Direction for Port x 0 – Input 1 – Output Registers associated with parallel I/O ports

Turning on an LED

A 7-segment display contains seven light emitting diodes (LEDs)

The miniDragon+ board has a common-cathode 7- segment display. This means that all the cathodes are tied together and connected to ground. The output pins 6:0 of Port H are connected through a 1 kW current-limiting resistor to each of the anodes, g – a. In the common-cathode case, an output 1 will turn on a segment and an output 0 will turn it off. g f e d c b a Port H: bit

Programming in C using CodeWarrior

LBE_DP256 is a stationery project that we have created that contains the file main.asm which includes over 80 assembly language routines to perform many I/O functions for the MC9S12DP256 microcontroller on the miniDragon+ board.

Example 1a is the default main.c program for a LBE_DP256 project.

// Example 1a: Turn on every other segment on 7-seg display #include /* common defines and macros */ #include /* derivative information */ #include "main_asm.h" /* interface to the assembly module */ #pragma LINK_INFO DERIVATIVE "mc9s12dp256b" void main(void) { PLL_init(); // set system clock frequency to 24 MHz DDRH = 0xff; // Port H is output PTH = 0x55; // switch on every other segment for(;;) {} /* wait forever */ } Example 1a

Lab 1 Go through the CodeWarrior tutorial in Appendix A. In this tutorial you will compile and run the C programs for Examples 1 – 4.