Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "1-1 Ramesh Yerraballi EE 319K Introduction to Microcontrollers Lecture 1: Introduction, Embedded Sys, Product Life- Cycle, 9S12 Programming."— Presentation transcript:

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

2 1-2 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? Ramesh Yerraballi

3 1-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 1-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 1-5 Ramesh Yerraballi Microcontroller  Memory  Non-Volatile oROM oEPROM, EEPROM, Flash  Volatile oRAM (DRAM, SRAM)  Interfaces  H/W: Ports  S/W: Device Driver  Parallel, Serial, Analog, Time

6 1-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 1-7 Ramesh Yerraballi Structured Programming Common Constructs (as Flowcharts)

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

9 1-9 Ramesh Yerraballi Data Flow Graph Position Measurement System

10 1-10 Ramesh Yerraballi Call Flow Graph Position Measurement System

11 1-11 Ramesh Yerraballi 9S12 Assembly Programming 9S12DP512 9S12DG128 9S12DP512 Memory Map AddressSizeDeviceContents $0000 to $03FF 1024I/O Ports for DevicesAccess external devices $0400 to $07FF 1024EEPROM: Elec. ErasableFixed Constants ($2000)$0800 to $3FFF (8192) 14336 RAM: Random AccessVariables and Stack $4000 to $FFFF 48152EEPROM: Elec. ErasablePrograms and fixed constants

12 1-12 Ramesh Yerraballi Registers 9S12 has 6 registers

13 1-13 Ramesh Yerraballi 9S12 Programming Simple Program org $3800 count rmb 1 org $4000 main ldaa #10 ;loop counter staa count loop dec count ; 9,8,… 0 bne loop stop org $FFFE fdb main 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


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

Similar presentations


Ads by Google