Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP -- An Extensible Language Chapter 4.

Slides:



Advertisements
Similar presentations
Lecture 5: MIPS Instruction Set
Advertisements

The 8051 Microcontroller and Embedded Systems
MIPS Calling Convention Chapter 2.7 Appendix A.6.
Assembly Code Example Selection Sort.
SPARC Architecture & Assembly Language
SPIM and MIPS programming
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 4 Assembly Language Programming 2.
1 Computer Architecture MIPS Simulator and Assembly language.
The University of Adelaide, School of Computer Science
Assembly Language Working with the CPU.
Program Control and Data Structures Chapter 13. Program Control and Data Structures CREATE…DOES> Program Control –A Simple Jump Table –A Jump Table With.
Forth Lecture L7.1. A Brief History of Programming Languages
Strings and Number Conversions Chapter 12. Strings and Number Conversions WHYP Strings ASCII Number String to Binary Conversion Binary Number to ASCII.
The Serial Communication Interface (SCI) Chapter 11.
Programming Languages From FORTRAN to WHYP. A Brief History of Programming Languages
Interrupts Chapter 6. Interrupts 68HC12 Interrupts 68HC11 Interrupts Interrupt Vector Jump Tables Writing WHYP Interrupt Service Routines Real-Time Interrupts.
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide.
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Introducing the 68HC12 Chapter 1.
A Programming Language for the FC16 Forth Core
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Chapter 3.
The Serial Communication Interface (SCI) MC9S12-DP256 Chapter 11.
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Subroutine and Stacks Chapter 2.
1 Memory Model of A Program, Methods Overview l Memory Model of JVM »Method Area »Heap »Stack.
CS2422 Assembly Language & System Programming September 26, 2006.
Atmega32 Architectural Overview
Forth A stack language.
Module 10 Adapted By and Prepared James Tan © 2001.
Universal Concepts of Programming Creating and Initializing local variables on the stack Variable Scope and Lifetime Stack Parameters Stack Frames Passing.
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Chapter 3 Elements of Assembly Language. 3.1 Assembly Language Statements.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
November SSI Small Scale Integration Up to 12 equivalent gate circuits on a single chip Includes basic gates and flip-flops.
Runtime Program Structure Command.com program supplied with MS- DOS and Windows (CMD.EXE for 2000 and XP)is called the command processor. It interprets.
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
ECE 265 – LECTURE 3 68HC11 Address Space, Memory, Registers, and data transfers 3/29/ ECE265.
Powers and roots. Square each number a) 7 b) 12 c) 20 d) 9 e) 40 a) 49 b) 144 c) 400 d) 81 e) 1600.
1 Introduction to Microcontroller Microcontroller Fundamentals & Programming.
ARM Assembly Language Programming and Architecture by Mazidi et al
4-1 Embedded Systems C Programming Language Review and Dissection II Lecture 4.
© 2010 Kettering University, All rights reserved..
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Subroutines and Stacks. Stack The stack is a special area in memory used by the CPU to store register information or general data information during program.
Assembly Language Lecture 2. Lecture Outline Program Structure Memory models Data Segment Stack Segment Code Segment Input and Output Instructions INT.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
EE345 Chapter 2 Lecture 3 April 4. Quiz every Wednesday 1 quiz = 1% extra credit five quizzes before midterm  5% for midterm. five quizzes before final.
Revised: Aug 1, EE4390 Microprocessors Lessons 11, 12 Advanced Assembly Programming.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
“Atmega32 Architectural Overview” SIGMA INSTITUTE OF ENGINEERING Prepared By: SR.NO NAME OF STUDENT ENROLLMENT 1 Parihar Shipra A Guided By:-
Lecture 3 Translation.
INTRODUCTION TO AVRASSEMBLY PROGRAMMING
Atmega32 Architectural Overview
The University of Adelaide, School of Computer Science
Fuzzy Control Design of Embedded Systems
Debugging with gdb gdb is the GNU debugger on our CS machines.
Computer Organization & Assembly Language Chapter 3
Process Realization In OS
Lecture 4: MIPS Instruction Set
Computer Programming Machine and Assembly.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Forth A stack language.
Symbolic Instruction and Addressing
MARIE: An Introduction to a Simple Computer
Subroutines … passing data
Microprocessor and Assembly Language
Copyright © 2013 Elsevier Inc. All rights reserved.
Some Assembly
CS 111 – Sept. 16 Machine language examples Instruction execution
Presentation transcript:

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP -- An Extensible Language Chapter 4

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP--An Extensible Language A Closer Look at WHYP Defining New WHYP Words Variables Constants EEPROM

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell A Closer Look at WHYP

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP--An Extensible Language A Closer Look at WHYP Defining New WHYP Words Variables Constants EEPROM

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Colon Definitions : ; : squared ( n -- n 2 ) DUP * ; JSR DUP JSR * 3D RTS

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

WHYP12.CFG

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell SEE and SHOW see squared squared DUP * ; ok show squared squared D ok see cubed cubed DUP squared * ; ok show cubed cubed D ok

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Single Stepping ok 5 step squared squared DUP * ; S:[1] 5 R:[0] DUP S:[2] 5 5 R:[0] * S:[1] 19 R:[0] Exit single step ok. 25 ok

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Single Stepping ok 5 step cubed cubed DUP squared * ; S:[1] 5 R:[0] DUP S:[2] 5 5 R:[0] squared S:[2] 5 19 R:[0] * S:[1] 7D R:[0] Exit single step ok. 125 ok

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Loading WHYP words from a file square.whp

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Loading WHYP words from a file

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell CR and." : bar( -- )\ print a bar CR." ******" ; : post( -- )\ print a post CR." *" CR." *" ;

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell CR and." : C( -- )\ print a C bar post bar cr ; : E( -- )\ print an E bar post bar cr;

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP--An Extensible Language A Closer Look at WHYP Defining New WHYP Words Variables Constants EEPROM

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Variables VARIABLEmy.name my.name. 800 ok EJSR (LIT)0800 3DRTS Stores the following code at tdp. my.name executes this code.

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Variables Variables are stored in memory at address vdp. The value of vdp can be changed by pressing F8. VHERE puts the current value of vdp on the data stack.

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Fetch and Store

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples and ! C:\WHYP\WHYP12>whyp12 Using WHYP12.HED Communicating with COM1 68HC12 WHYP12 - Version 4.6 Press or type BYE to exit ok VARIABLEmy.name ok hex ok my.name. 800 ok 7my.name ! ok dump A B C D E F R. (.. ok 7 ok 12 my.name c! ok 34 my.name 1+ c! ok dump A B C D E F R. (.. ok my.name 12 ok my.name ok

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 code for C!, and

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Plus-store 1 my.name +!

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 code for 2!, and

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell System Variables: SP0, RP0

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Arrays VARIABLE my.array 8 VALLOT my.array 3 2* will print the value of my.array[3]

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Arrays VARIABLE my.array 8 VALLOT my.array 3 2* will print the value of my.array[3] : ( ix addr -- n ) SWAP 2* ; 3 my.array Chap 13: my.array !

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP--An Extensible Language A Closer Look at WHYP Defining New WHYP Words Variables Constants EEPROM

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Constants 25 CONSTANT quarter EJSR (LIT)0019 3DRTS Stores the following code at tdp. quarter executes this code. quarter. will print the value 25 on the screen.

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using CONSTANTs

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Tables CREATE table

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell HEX CREATE table 5, 8, 23,

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Example of creating a table

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell HEX CREATE table 5 C, 8 C, 23 C,

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM MC68HC812A4 –4 Kbytes of EEPROM –$ FFF MC68HC912B32 –768 bytes of EEPROM –$0D00 - $0FFF

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM Initial Position Register

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell MC68HC812A4 EEPROM Block Protect Register

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell MC68HC912B32 EEPROM Block Protect Register In WHYP12: CLR EEPROT

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell The EEPROM Control Register

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Erasing an EEPROM Byte

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Delay 10 Milliseconds

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Erase Entire EEPROM

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Program an EEPROM Byte

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

Examples of using EEPROM memory access words

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

square.hed

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell whyp12.cfg

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell