1 / 13

EE 319K Introduction to Microcontrollers

Lecture 1: Introduction, Embedded Sys, Product Life-Cycle, 9S12 Programming. EE 319K Introduction to Microcontrollers. My Shpeel.

davida
Download Presentation

EE 319K Introduction to Microcontrollers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ramesh Yerraballi Lecture 1: Introduction, Embedded Sys, Product Life-Cycle, 9S12 Programming EE 319KIntroduction to Microcontrollers

  2. Ramesh Yerraballi My Shpeel • “It is important that students bring a certain ragamuffin barefoot irreverence to their studies, they are here not to worship the known but to question it” – Jacob Bronowski • How much do you pay for a Burger? • Per lecture?

  3. Ramesh Yerraballi Agenda • Course Description • Book, Labs, Equipment • Grading Criteria • TAs • Expectations/Responsibilities • Embedded Systems • Product Life Cycle • Analysis, Design, Implementation, Testing • Flowcharts, Data-Flow and Call Graphs • 9S12 Programming

  4. Ramesh Yerraballi Embedded System • Embedded Systems are everywhere but mostly hidden • MicroProcessor • Intel: 4004, ..8080,.. x86 • Motorola: 6800, .. 6812,.. PowerPC • ARM, DEC,SPARC, Natl Semi.,… • MicroController • Processor+Memory+I/O Ports (Interfaces)

  5. Ramesh Yerraballi Microcontroller • Memory • Non-Volatile • ROM • EPROM, EEPROM, Flash • Volatile • RAM (DRAM, SRAM) • Interfaces • H/W: Ports • S/W: Device Driver • Parallel, Serial, Analog, Time

  6. Ramesh Yerraballi Flowchart • Example 1.1: Design a flowchart for a system that performs two independent tasks. The first task is to output a pulse on PTT every 1.024 ms in real time. The second task is to find all the prime numbers, and there are no particular time constraints on when or how fast one finds the prime numbers.

  7. Ramesh Yerraballi Structured Programming • Common Constructs (as Flowcharts)

  8. Ramesh Yerraballi Implementation(Real) Hardware, Software Testing (Works?) Validation:Correctness Performance: Efficiency Maintenance (Improve) Product Life Cycle • Analysis (What?) • Requirements -> Specifications • Design (How?) • High-Level: Block Diagrams • Engineering: Algorithms, Data Structures, Interfacing

  9. Ramesh Yerraballi Data Flow Graph • Position Measurement System

  10. Ramesh Yerraballi Call Flow Graph • Position Measurement System

  11. Ramesh Yerraballi 9S12 Assembly Programming • 9S12DP512 • 9S12DG128

  12. Ramesh Yerraballi Registers 9S12 has 6 registers

  13. Ramesh Yerraballi Some Basic Instructions ldaa #10 ;make A=10 ldaa $3800 ;A=contents of memory staa $3800 ;Store contents of A ;into mem deca ;A=A-1 lsra ;A=A/2 (shift right) lsla ;A=A*2 (shift left) adda #10 ;A=A+10 anda #$02 ;A=A&2 (logic and) eora #$08 ;A=A^8 (exclusive or) oraa #$03 ;A=A|3 (logic or) bra loop ;always jump to loop bne loop ;jump to loop if ; not zero beq loop ;jump to loop if zero stop 9S12 Programming • Simple Program • org $3800 • count rmb 1 • org $4000 • mainldaa #10 ;loop counter • staa count • loopdec count ; 9,8,… 0 • bne loop • stop • org $FFFE • fdb main

More Related