Appendix B: System Development Example MTT48 V2.1 B - 1 APPENDIX B: SYSTEM DEVELOPMENT.

Slides:



Advertisements
Similar presentations
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
Advertisements

The 8051 Microcontroller and Embedded Systems
System Overview MTT48 V Motorol a MOTOROLA 68HC08 INTRODUCTION AND SYSTEM OVERVIEW.
MC68HC11 System Overview. System block diagram (A8 version)
4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
Programmable Keyboard/ Display Interface: 8279
SCI: Serial Communications Interface Presented by: Sean Kline Chad Smith Jamie Cruce.
External Interrupt Module MTT EXTERNAL INTERRUPT REQUEST MODULE (IRQ)
68HC11 Polling and Interrupts
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Harrison Jones Alexis Noel William Allen SERIAL COMMUNICATION INTERFACE (SCI)
Clock Generation Module MTT CLOCK GENERATION MODULE (CGM)
NS Training Hardware. System Controller Module.
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
Serial Communication Interface (SCI) Kevin Stuart Matt Betts March 27, 2007 ME 6405, Sp 07.
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Timer Interface Module MTT TIMER INTERFACE MODULE (TIM)
Monitor ROM Module MTT48 V MONITOR ROM MODULE (MON)
SC200x Peripherals Broadband Entertainment Division DTV Source Applications July 2001.
Input/Output mechanisms
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
System Clocks.
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
Revised: Aug 1, ECE 263 Embedded System Design Lessons 23, 24 - Exceptions - Resets and Interrupts.
AT91 Embedded Peripherals
Unit 4 Design and Synthesis of Datapath Controllers
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
HC08 ARCHITECTURE DETAILS
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
Serial Communication Interface Ta Kim Nicholas Earnhart Razid Ahmad ME 6405 – Fall 2008 November 6, 2008.
Direct Memory Access Module MTT M DIRECT MEMORY ACCESS MODULE (DMA)
8051 Micro controller. Architecture of 8051 Features of 8051.
Low Power Modes MTT48 V LOW POWER OPERATION.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
I/O Ports MTT I/O PORTS. I/O Ports MTT Module Objectives Configure any pin as either input or output Read or write data from/to port.
HCS12 Technical Training, Rev 2.0 Module 7- SCI, Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
Resets & Interrupts MTT CPU08 Core Motorola CPU08 RESETS & INTERRUPTS.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
EPROM/OTPROM Module MTT48 V EPROM PROGRAMMING.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
Low-Voltage Inhibit Module MTT M LOW VOLTAGE INHIBIT MODULE (LVI)
Components of a typical full-featured microcontroller.
8251 USART.
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
Why are Timer Functions Important?
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
Tutorial Introduction
68HC11 Interrupts & Resets.
Tutorial Introduction
UART Serial Port Programming
SPI Protocol and DAC Interfacing
NS Training Hardware.
Presentation transcript:

Appendix B: System Development Example MTT48 V2.1 B - 1 APPENDIX B: SYSTEM DEVELOPMENT

Appendix B: System Development Example MTT48 V2.1 B HC08 SYSTEM EXAMPLE Simple application set-up Power-On / Reset CPU Initialization Memory initialization

Appendix B: System Development Example MTT48 V2.1 B - 4 APPLICATION DESCRIPTION Basic automotive instrument cluster panel Displays PRNDL setting based on 3 discrete inputs –Port A PTA2-PTA0 Calculates and displays vehicle speed by measuring a pulse frequency –1 Pulse indicates 1 revolution of wheel axle –Input on timer channel 1 Receives data relating to warning lamps from powertrain control module via SCI at 9600 baud –Eight warning lamp discrete outputs on Port B (Engine over-temp, low oil pressure, low fuel, service engine, etc.)

Appendix B: System Development Example MTT48 V2.1 B - 5 APPLICATION DESCRIPTION (CONT.) Receives battery voltage, coolant temperature, and outside air temperature values from 8 bit A/D converter via SPI –Port A Bit 7 as SS line for A/D Key in ignition generates an external Interrupt on IRQ2 4 MHz external crystal and desire 8 MHz bus frequency

Appendix B: System Development Example MTT48 V2.1 B - 6 INSTRUMENT PANEL CONTROLLER IRQ2 Key in ignition PTB0 PTB1 PTB2 PTB3 PTB4 PTB5 PTB6 PTB7 Warning Light 1 Warning Light 2 Warning Light 3 Warning Light 5 Warning Light 6 Warning Light 7 Warning Light 8 Warning Light 4 68HC708XL36 8-Bit A/D SS PTA7 SPSCK MOSI MISO SPSCK MOSI MISO Battery Voltage Coolant Temp Air Temperature (SCI) TXD (SCI) RXD To Powertrain Control Module From Powertrain Control Module PTA2 PTA1 PTA0 From PRNDL Switch 3 From PRNDL Switch 2 From PRNDL Switch 1 TCH1 Axle Ref. Pulses

Appendix B: System Development Example MTT48 V2.1 B - 7 POWER-ON RESET At Reset, the following occurs All registers set to initial default values Interrupts are disabled Stack Pointer set to $00FF Program Counter load with value at $FFFE-$FFFF Program execution begins

Appendix B: System Development Example MTT48 V2.1 B - 8 CPU INITIALIZATION Set proper bus frequency of 8 MHz Configure CGM for proper bus frequency –Must use PLL, N = 8, L = 6 –See CGM exercise May wish to move stack location Example: Move stack to address $0100 LDHX #$0101 TXS; Subtracts 1 in process Initialize/clear RAM to known state Could be performed using DMA –See DMA exercise part 4

Appendix B: System Development Example MTT48 V2.1 B - 9 CPU INITIALIZATION If using interrupts Initialize interrupt service routines –TIM Channel 1 –SCI Transmit and Receive –SPI Transmit and Receive –IRQ2 Enable interrupts

Appendix B: System Development Example MTT48 V2.1 B - 10 I/O PORT INITIALIZATION NOTE:Order of submodule initialization may or may not be critical to application Configure I/O Ports PRNDL –Set Port A Data Direction Bits 2-0 as inputs (default) A/D Slave Select Line –Set Port A Data Bit 7 to 1 to disable SS line –Set Port A Data Direction Bit 7 as an output Warning lamps –Write $00 to Port B Data register to deactivate warning lamps –Set all Port B Data Direction bits to outputs

Appendix B: System Development Example MTT48 V2.1 B - 11 SPI MODULE INITIALIZATION Configure SPI module Select Master mode, polarity, phase and baud rate –SPMSTR bit = 1 –CPOL,CPHA = 01 Idle low, Read data on 2nd clock edge –SPR1:SPR0 = 10 Baud rate of 250 KHz (8 MHz bus) Turn on SPI –Set SPE bit in SPI Control register Interrupts –Enable interrupts as required by application SPIE bit for transmission complete interrupt (SPIF) TDIE bit for transmit register empty interrupt (TDRE)

Appendix B: System Development Example MTT48 V2.1 B - 12 SCI MODULE INITIALIZATION Configure SCI module to communicate with Powertrain Control Module Select number of data bits, parity, and baud rate –M = 0 8 data bits –PEN,PTY = 0X Parity disabled, Parity Type is don’t care –SCP1:SCP0 = 01 Prescaling of 3 –SCR2:SCR1:SCR0 = 001 Divisor of 2 ­ 9600 baud from 4 MHz external crystal frequency Turn on SCI –Set ENSCI bit in SCI Control Register 1 Interrupts –Enable interrupts as required by application TCIE bit for transmission complete interrupt (TC) TIE bit for transmit register empty interrupt (TDRE) RIE bit for data received interrupt (RDRF) Error interrupts (OR, NF, FE, PE)

Appendix B: System Development Example MTT48 V2.1 B - 13 TIM INITIALIZATION Initialize TIM module for measuring wheel speed reference pulse frequency Configure prescaler value smallest resolution –PS2:PS1:PS0 = 000 System clock ÷ 1 (default) Resolution = 125 ns at 8 MHz bus clock Configure channel 1 for input capture on rising edge –MS1A = 0Input capture –ELS1B:ELS1A = 01 Rising edge detection Interrupt as needed by application –Set CH1E bit for interrupt generation on capture Enable Timer –Clear TSTOP bit in Timer Control Register

Appendix B: System Development Example MTT48 V2.1 B - 14 ADDITIONAL INITIALIZATION Initialize any RAM locations as required by application Begin Program execution

Appendix B: System Development Example MTT48 V2.1 B - 15 OPTIONAL INITIALIZATION Configure DMA module as needed by application Could use DMA to service SCI or SPI interrupts Set channel source and destination register addresses Set-up register Set-up Source/Destination address calculation –Interrupt source –Byte/Word Count Enable channel in DMA Control Register 1 (DC1) –Set Channel enable bit Interrupt on complete of transfer –Set Channel interrupt enable bit in DC1

Appendix B: System Development Example MTT48 V2.1 B - 16 OPTIONAL INITIALIZATION Enable COP module Clear COPD bit MOR register –Must be done at EPROM programming time Enable LVI module Set LVIPWR bit in LVI Status and Control register Enable Reset Generation if desired –Set LVIRST bit Lock LVI –Set LVILCK bit to write protect register –Think low power modes

Appendix B: System Development Example MTT48 V2.1 B - 17 ADDITIONAL SYSTEM CONFIGURATION Before executing WAIT or STOP configure XIRQ module Enable IRQ2 interrupt Clear IMASK2 in IRQ Status and Control register

Appendix B: System Development Example MTT48 V2.1 B - 18 SYSTEM CONFIGURATION EXAMPLE Questions and Answers