Motorola CML12S-DP256 Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Convertisseurs vidéo Motorola CML12S-DP256. Chapter 7 [en] Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 46
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
H. Huang Transparency No.7-1
The 68HC12 Microcontroller
Chapter 7
Parallel Input/Output
Vue de la page 0
1 2 3 4 5 6 ... 45 46

Résumé du contenu

Page 1 - Chapter 7

H. Huang Transparency No.7-1The 68HC12 MicrocontrollerChapter 7Parallel Input/Output

Page 2 - Basic Concepts of I/O

H. Huang Transparency No.7-10The 68HC12 MicrocontrollerSynchronizing Interface Chip and I/O DevicesHandshake method - used when timing is crucial- Two

Page 3 - CPU pins

H. Huang Transparency No.7-11The 68HC12 MicrocontrollerOverview of 68HC12 Parallel Ports (Figure 1-1 Manual)EEPROMRAMEEPROMCPU12A/D ConverterTimer &am

Page 4 - H. Huang Transparency No.7-4

H. Huang Transparency No.7-12The 68HC12 MicrocontrollerNotice : Most of the ports have two registersData Register Address by which data is exchanged w

Page 5 - (0x200-0x3FF)

H. Huang Transparency No.7-13The 68HC12 MicrocontrollerHC12 can operate in one of 8 Operation ModesNormal OperationModes: Some registers protected aga

Page 6 - I/O Transfer Synchronization

H. Huang Transparency No.7-14The 68HC12 MicrocontrollerHC12 Port Overview Port A and Port B (PORTA, DDRA and PORTB, DDRB)- Single chip mode: General p

Page 7 - H. Huang Transparency No.7-7

H. Huang Transparency No.7-15The 68HC12 MicrocontrollerHC12 Port Overview Port E (PEAR and DDRE)- General purpose I/O; or …- Expanded mode: bus contro

Page 8 - H. Huang Transparency No.7-8

H. Huang Transparency No.7-16The 68HC12 MicrocontrollerPort T (PORTT and DDRT)- Timer functions: input capture, output compare, pulse accumulator (PT7

Page 9 - Extracted from Figure 13.43

H. Huang Transparency No.7-17The 68HC12 MicrocontrollerExample from the Axiom Project Board: There are four LEDs(LED1 … LED4) connected via Port K.74H

Page 10 - The 68HC12 Microcontroller

H. Huang Transparency No.7-18The 68HC12 Microcontrollerorg $4000DDRK equ $33 ; Port K’s Data Direction RegisterPORTK equ $32 ; Port K’s Data Register;

Page 11 - H. Huang Transparency No.7-11

H. Huang Transparency No.7-19The 68HC12 MicrocontrollerWhere do we find out what the Port Addresses are ?Manufacturer assigns the register block.•Exam

Page 12 - H. Huang Transparency No.7-12

H. Huang Transparency No.7-2The 68HC12 MicrocontrollerBasic Concepts of I/O- I/O devices (peripheral devices): equipment that exchange data with compu

Page 13 - H. Huang Transparency No.7-13

H. Huang Transparency No.7-20The 68HC12 MicrocontrollerAxiom CML12S MCU with the Axiom Project BoardAxiom CML12S-DP256Development BoardMCUAxiom Projec

Page 14 - HC12 Port Overview

H. Huang Transparency No.7-21The 68HC12 MicrocontrollerPort Expansion on the Axiom Project Board•Port K dedicated: LEDs, buzzer and relay• Port P and

Page 15

H. Huang Transparency No.7-22The 68HC12 MicrocontrollerAxiom CML12S-DP256Development BoardPort Expansion on the Axiom Project Board• A high level view

Page 16 - H. Huang Transparency No.7-16

H. Huang Transparency No.7-23The 68HC12 MicrocontrollerDriving the Single Seven-Segment Display- The segment patterns for 0 to 9 are shown in Table 7.

Page 17

H. Huang Transparency No.7-24The 68HC12 Microcontroller#include “DP256reg.asm”org $4000bset PTM,#$08 ; Load data into U7 set U7_EN high (PM3) movb

Page 18 - H. Huang Transparency No.7-18

H. Huang Transparency No.7-25The 68HC12 MicrocontrollerInterfacing the 68HC12 to a Keypad- 16-key (4 rows * 4 columns) keypad interfaced to two 4-bit

Page 19 - • #include “dp256reg.asm”:

H. Huang Transparency No.7-26The 68HC12 MicrocontrollerKeypad on the Axiom Project Board7-segmentdisplayLEOE74HC573Q3-Q0D7-D0Axiom CML12S-DP256Develop

Page 20 - H. Huang Transparency No.7-20

H. Huang Transparency No.7-27The 68HC12 MicrocontrollerExample Write an assembly subroutine that waits for the ‘1’ key to be hit.Solution1. Disable SP

Page 21 - H. Huang Transparency No.7-21

H. Huang Transparency No.7-28The 68HC12 Microcontroller#include "DP256reg.asm"org $4000clr SPI1CR1 ; Turn off SPIbset DDRP,#$0F ; set P0-3

Page 22 - Pin 22 Pins 51..54

H. Huang Transparency No.7-33The 68HC12 MicrocontrollerInterfacing to a Keyboard- Switches can be mechanical, membrane, capacitors, or Hall-effect.-Me

Page 23 - H. Huang Transparency No.7-23

H. Huang Transparency No.7-3The 68HC12 MicrocontrollerInterface (peripheral) chipsFunction: synchronize data transfer between CPU & I/O devicesInt

Page 24 - H. Huang Transparency No.7-24

H. Huang Transparency No.7-34The 68HC12 MicrocontrollerSoftware Debouncing Technique• Program must debounce !• When polling, program must filter oscil

Page 25

H. Huang Transparency No.7-35The 68HC12 MicrocontrollerSoftware Debouncing Technique : The Adaptive Approachpoll switch until first change is seenloop

Page 26

H. Huang Transparency No.7-36The 68HC12 MicrocontrollerLiquid Crystal Displays (LCDs)- Most common type: allows light to pass through when activated.

Page 27 - E 0 F D

H. Huang Transparency No.7-37The 68HC12 MicrocontrollerThe Axiom Project Board’s LCD- Display capability: 2 lines x 16 characters.- DMC series LCD dis

Page 28 - H. Huang Transparency No.7-28

H. Huang Transparency No.7-38The 68HC12 MicrocontrollerLCD Ports on the Axiom Project Board LCDRWRSEND0D1…D7LEOE74HC573Q4-Q7D7-D0Axiom CML12S-DP256Dev

Page 29 - Interfacing to a Keyboard

H. Huang Transparency No.7-39The 68HC12 MicrocontrollerLCD Control Signals (Programmer’s Model)(We already know how to enable the appropriate latch )1

Page 30 - Software Debouncing Technique

H. Huang Transparency No.7-40The 68HC12 MicrocontrollerLCD Control Signals : What about the EN line ? The Timing Diagram for a LCD Write OperationLCD

Page 31 - H. Huang Transparency No.7-35

H. Huang Transparency No.7-41The 68HC12 MicrocontrollerLCD Instructions- Major instructions are summarized below. Full details are in Table 7.5 in te

Page 32 - H. Huang Transparency No.7-36

H. Huang Transparency No.7-42The 68HC12 MicrocontrollerOutput Data on the Axiom LCD Kit- We can display two rows of data. Each row: 16 characters.- Po

Page 33 - The Axiom Project Board’s LCD

H. Huang Transparency No.7-43The 68HC12 MicrocontrollerExample : Program to Output Characters to the LCD (LCDeg.asm)- Output a character to the upper-

Page 34

H. Huang Transparency No.7-4The 68HC12 MicrocontrollerProgrammer’s Model of Interface (peripheral) chips- Interface consist of: control registers, sta

Page 35

H. Huang Transparency No.7-44The 68HC12 MicrocontrollerLCD Setup (Initialization) Reference : LCD_spec.pdf1. Function Set : To Set interface to be 4

Page 36

H. Huang Transparency No.7-45The 68HC12 MicrocontrollerExample : LCD Program (basicLCD.asm)LCD_RW equ $02 ; LCD RW select (PT1)LCD_RS

Page 37 - LCD Instructions

H. Huang Transparency No.7-46The 68HC12 MicrocontrollerExample : LCD Program (basicLCD.asm)Lcd2PP_Init:bclr PTT,LCD_RW+LCD_RS+LCD_EN ; RW=0, RS=0 (In

Page 38 - H. Huang Transparency No.7-42

H. Huang Transparency No.7-47The 68HC12 MicrocontrollerExample : LCD Program (basicLCD.asm – Lcd2PP_Init continued )ldaa #$01 ; 4. Clear displayjsr LD

Page 39 - H. Huang Transparency No.7-43

H. Huang Transparency No.7-48The 68HC12 MicrocontrollerLCD2PP_4: ; Writes a nibble to LCD. Destroys a and bbset PTS,#U21_EN ; Set U21_EN high (latch b

Page 40

H. Huang Transparency No.7-49The 68HC12 MicrocontrollerExample : LCD Program (basicLCD.asm); Write a byte to the LCD Data RegisterLCD2PP_Data:bset PTT

Page 41 - H. Huang Transparency No.7-45

H. Huang Transparency No.7-50The 68HC12 MicrocontrollerExample : LCD Program (basicLCD.asm); Write a byte (in Acc A ) to the LCD, upper 4 bits first

Page 42

H. Huang Transparency No.7-5The 68HC12 MicrocontrollerI/O Address : Uniquely identifies each port of an interface chip • Motorola HC12: Memory-Mapped

Page 43 - Lcd2PP_Init continued )

H. Huang Transparency No.7-6The 68HC12 MicrocontrollerI/O Transfer SynchronizationThe role of an interface chip1.Synchronizing data transfer between C

Page 44

H. Huang Transparency No.7-7The 68HC12 MicrocontrollerSynchronizing Microprocessor and Interface ChipPollingMicroprocessor checks a status bit (interf

Page 45 - H. Huang Transparency No.7-49

H. Huang Transparency No.7-8The 68HC12 MicrocontrollerSynchronizing Interface Chip and the I/O DevicesBrute-force method -- useful when the data timin

Page 46 - H. Huang Transparency No.7-50

H. Huang Transparency No.7-9The 68HC12 MicrocontrollerSynchronizing the Interface Chip and the I/O DevicesStrobe method - strobe signal indicates data

Commentaires sur ces manuels

Pas de commentaire