PLC Relay Ladder Logic, Intel 8051 Assembly Language, Raspberry Pi ARM Assembly Language

Similar documents
6 GPIO 84. Date: 29/09/2016 Name: ID: This laboratory session discusses about writing program to interact with GPIO of Reapberry Pi.

COS 116 The Computational Universe Laboratory 7: Digital Logic I

Lab #2: Building the System

A B A+B

Lab 16: Data Busses, Tri-State Outputs and Memory

discrete logic do not

EECE 2411/2211-Introduction to Electrical and Computer Engineering Lab. Lab 3

EE 1315: DIGITAL LOGIC LAB EE Dept, UMD

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS 150 Spring 2000

Finite State Machine Lab

CSCE 312 Lab 3: Sequential Logic Design ([Vahid] Ch. 3) Instructor: Dr. Hyunyoung Lee Spring 2013

Scheme I. Sample Question Paper

CSCE 312 Lab manual. Lab 4 - Computer Organization and Data Path Design. Instructor: Dr. Yum. Fall 2016

Standard Logic Chips and National Instruments ELVIS Breadboarding for Combinational Logic Circuits

Problem Score 1 / 27 2 / 19 3 / 16 4 / 14 code check off 5 / 22 /2 Total /100

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

ARDUINO MINI 05 Code: A000087

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2011

NAND/NOR Logic Gate Equivalent Training Tool Design Document. Team 34 TA: Xinrui Zhu ECE Fall Jeremy Diamond and Matthew LaGreca

Measuring Light with a BeagleBone Black

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

Course Syllabus of Microprocessor I (Fall 2006)

Digital Circuits. Page 1 of 5. I. Before coming to lab. II. Learning Objectives. III. Materials

VLSI Test Technology and Reliability (ET4076)

TECH 3821 Lab #2 Relay Driver with Computer Control

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

Drexel University Electrical and Computer Engineering Department ECE 200 Intelligent Systems Spring Lab 1. Pencilbox Logic Designer

Lab 4: Digital Electronics BMEn 2151 Introductory Medical Device Prototyping Prof. Steven S. Saliterman

Contents. Please read and remember the following warnings before using the RELAYplate:

Lab 4: Digital Electronics Innovation Fellows Program Boot Camp Prof. Steven S. Saliterman

CSE 141L Computer Architecture Lab Fall Lecture 3

Homework 5: Theory of Operation and Hardware Design Narrative

CMPSCI 201 Fall 2006 Midterm #2 November 20, 2006 SOLUTION KEY

Physics E-1bxl and PS3 Lab 4: Neuron Model 2016

ECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session

To practice combinational logic on Logisim and Xilinx ISE tools. ...

12v Power Controller Project Board

Lecture 1: Introduction Course arrangements Recap of basic digital design concepts EDA tool demonstration

Boise State University Digital Systems Laboratory

ECE251: Thursday September 13

Digital Electronics & Computer Engineering (E85)

LDR_Light_Switch5 -- Overview

Laboratory Learning Objectives

Outline for Today. Lab Equipment & Procedures. Teaching Assistants. Announcements

09/05/2014. Engaging electronics for the new D&T curriculum. Geoff Hampson Managing Director of Kitronik. Presentation overview

If I wanted to connect an LED and little light bulb and have them switch on and off with one switch, my schematic would look like the one below.

ECE 270 Lab Verification / Evaluation Form. Experiment 1

Addendum # 2 Guidelines to the Design Project

Programmable Logic Design I

ECE2029: Introduction to Digital Circuit Design. Lab 2 Implementing Combinational Functional Blocks

TA0139 USER MANUAL ARDUINO 2 WHEEL DRIVE WIRELESS BLUETOOTH ROBOT KIT

Raspberry Pi RTC Expansion Module User Manual

LAB1. Get familiar with Tools and Environment

Touch Control Switch + - R6 R4 R8 R7 CAT# Grading. Assembly Instructions by Earl D. Gates SUNY Oswego Fall Conference 2007.

The Microprocessor as a Microcosm:

CSCE 312 Lab manual. Instructor: Dr. Rabi Mahapatra TA: Ying Fung Yiu. Prepared by. Dr. Rabi N Mahapatra. Suneil Mohan & Amitava Biswas.

Programmable Logic Design I

Final Examination (Open Katz, asynchronous & test notes only, Calculators OK, 3 hours)

Addition of Unsigned Binary Numbers Using FPGA

Programmable Logic Design Techniques I

Touch Sense Controller

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

Bilkent University. CS 319 Object-Oriented Software Engineering. Fall Logic Design and Breadboard Simulator. Final Report 21 November 2009

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

CS-3410 Systems Programming Spring 2013

Breadboard Voltage. Convenient 5V Supply for Breadboard

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

CMPSCI 201 Fall 2004 Midterm #1 Answers

TWO PLAYER REACTION GAME

Introduction to Computer Systems

The Alarm System: The alarm system to be designed has the following inputs.

CSCE 312 Lab manual. Instructor: Dr. Ki HwanYum. Prepared by. Dr. Rabi Mahapatra. Suneil Mohan & Amitava Biswas. Fall 2016

EEC 116 Fall 2011 Lab #3: Digital Simulation Tutorial

Cpr E 281 FINAL PROJECT ELECTRICAL AND COMPUTER ENGINEERING IOWA STATE UNIVERSITY. FINAL Project. Objectives. Project Selection

HW #5: Digital Logic and Flip Flops

Cambridge TECHNICALS CAMBRIDGE TECHNICALS IN ENGINEERING LEVEL 3 UNIT 5 ELECTRICAL AND ELECTRONIC DESIGN. RESOURCES LINK April 2015

ECE 3210 Lab 4: Calculator

E85: Digital Design and Computer Engineering Lab 1: Electrical Characteristics of Logic Gates

Module 3B: Arduino as Power Supply

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

ELEC 204 Digital System Design LABORATORY MANUAL

ECE 3210 Laboratory 1: Develop an Assembly Program

Digital Design and Computer Architecture

E40M. An Introduction to Making: What is EE?

Tutorial for Altera DE1 and Quartus II

EMBEDDED SYSTEMS COURSE CURRICULUM

ESET 369 Embedded Systems Software, Spring 2018

Step 1: Downloading the source files

Scheme G. Sample Test Paper-I

Educational Smart Breadboard

PART 1. Simplification Using Boolean Algebra

!There are two kit models. The ZCTK-120 is designed to operate with.!the pulse output is isolated from the mains line voltage. A pull-up resistor

Experiment Fall Experiment 1: PLD ALU R&D and V&V

Project Planning. Module 4: Practice Exercises. Academic Services Unit PREPARED BY. August 2012

Digital Systems Design with PLDs and FPGAs Kuruvilla Varghese Department of Electronic Systems Engineering Indian Institute of Science Bangalore

Microprocessor Systems

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

Transcription:

Assignment: LAB #7 and #8 PLC Relay Ladder Logic, Intel 8051 Assembly Language, Raspberry Pi ARM Assembly Language COURSE: EGR/CS333 DIGITAL DESIGN & INTERFACING (Digital Design II, Assembly Language, and Interfacing) SYLLABUS: http://users.etown.edu/w/wunderjt/syllabi/cs333%20wunderlich,joseph.htm INSTRUCTOR: J. Wunderlich PhD LATE PENALTY: Minus 33.3% per class period for each late item LAST REVISED: - PRE-LAB: 1. Read our Etown NanoLC PLC customized Simulator and Real-Time Device Control Manual: http://users.etown.edu/w/wunderjt/info%20on%20phoenix%20contact%20nanolc%20plc.pdf including video on how to program NanoLC with Relay Ladder Logic: https://www.youtube.com/watch?v=i4wjfxcs9ou 2. Read our Etown Intel 80x51 customized Simulator and Real-Time Device Control Manual(s): a. 8051 Intel Microcontroller Development Board & Software, plus simulator (8051 Jumps & Calls) b. OPTIONAL: 2014 8051 Microcontroller Simulator and intro to Development Board and Software c. OPTIONAL: Pre-2013 Intel 80251 Microcontroller Board and Software (80251 Jumps & Calls) 3. Read our Etown Raspberry Pi customized Real-Time Device Control Manual(s): http://users.etown.edu/w/wunderjt/raspberry%20pi%20manual%20and%20labs.pdf DURING LAB: 1. AS A GROUP, convert your most complex working NanoLC program to-date into Relay Ladder Logic, and in your report compare and contrast it to your original program; along with demonstrating it fully functioning 2. AS A GROUP, simulate the two Intel 8051 Microcontroller Assembly Language programs shown in Dr Wunderlich s publication below. Take screen shots of the memory map to show memory, registers, the stack, and PSW contents changing and put these in your report along with narrative explaining what s happening, and arrows pointing to changing parts of the memory map. You don t need a screen shot for every step above, but several screen shots at select steps should suffice. 3. AS A GROUP, do Raspberry Pi Lab 3 ARM Microcontroller programming as shown below 4. AS A GROUP, after demonstrating all the above, demonstrate for the class TA all functioning and non-functioning parts of all equipment and all parts used in all class Lab Projects. Create a spreadsheet inventory of everything, and list whether or not it is functioning. Make two copies of the list; one for the TA and one for your report. GRADING: For both demonstrations and reports, a 92 is for everything done very well and professional. To get up to 100 or more, enhance things in creative ways GRADE PERCENTAGES and DUE DATES: Demonstrate PAD-234 Circuit Trainer circuits [primarily for 5 volt TTL chips] Demonstrate Old Circuit Trainer circuits [primarily for 5 volt TTL chips]: Demonstrate RadioShack Circuit Trainer circuits [primarily for ~3 volt CMOS chips]: Demonstrate Logisim Circuit simulations Demonstrate Phoenix Contact NanoLC PLC simulations (10%) FRIDAY 5/5/17 AT 3:30PM Demonstrate Phoenix Contact NanoLC PLC real-time systems (10%) FRIDAY 5/5/17 AT 3:30PM Demonstrate Phoenix Contact IEC-61131 PLC simulations: Demonstrate Phoenix Contact IEC-61131 PLC real-time systems: Demonstrate Field Programmable Gate Array (FPGA) simulations: Demonstrate Field Programmable Gate Array (FPGA) real-time systems: Demonstrate INTEL 8051/80251 microcontroller simulations: (20%) FRIDAY 5/5/17 AT 3:30PM Demonstrate INTEL 8051/80251 microcontroller real-time systems: Demonstrate Raspberry Pi real-time systems (ARM Assembly Language) (20%) FRIDAY 5/5/17 AT 3:30PM Demonstrate Arduino real-time systems: Demonstrate Basic-Stamp real-time systems: Demonstrate Direct PC-port real-time systems: Demonstrate Remote mobile-device real-time systems: Demonstrate LabView real-time systems: Demonstrate Isolated high-voltage bench-test (with low Voltage electronics disconnected) Written Group Report (including all individual Raspberry Pi work): (20%) FRIDAY 5/5/17 AT 3:30PM PowerPoint, Video, or Poster Demonstrate for the class TA all functioning and non-functioning parts (20%) FRIDAY 5/5/17 AT 3:30PM of all equipment and all parts used in all class Lab Projects.

Elizabethtown College CS333 Spring 2017 Raspberry Pi Lab #3 ARM Assembly Code By Daniel Esteves & Joseph Wunderlich PhD 1- Introduction This lab is intended to introduce you to the ARM Architecture/Assembly Code. ARM has become the main processor for gadgets like Smart Phones, Tablets and the best one: Raspberry Pi. Lets go over some examples. 2- Examples This is the code for the Hello World file.data string:.asciz "\nhello World!\n".text.global main.extern printf main: push {ip, lr} ldr r0, =string bl printf pop {ip, pc} To assemble, link and run files on ARM assembly code we need Terminal. 3- Terminal Lets start typing the traditional sudo apt-get update sudo apt-get upgrade OBS:You can use your favorite text editor in Terminal, but for this tutorial I will use nano. Create the assembly1.s file by typing sudo nano assembly1.s With nano opened you can type the Hello World example from above. Close the file by Pressing Control+X and when prompted if you would like to save the changes, press Y and save the file with the same name (assembly1.s). Now that we have the file done, lets assemble it.

as g o assembly1.o assembly1.s Now, link it. gcc o assembly1 assembly1.o The file is now assembled and linked. You can now run it by entering./assembly1 Your screen should look like this. 5- Now you! 1- By doing the example you now know how to assemble an ARM assembly code program. Write a program that does the following: 1. Move the integer 13 to the Register R1 2. Move the integer 25 to the Register R2 3. Put the sum of Register R1 and R2 to Register R3 4. Move the value of R3 to R0 ATTENTION!! You will need to add the lines in the end of the file. This is called a system call and is needed to return the right value. MOV R7, #1 SVC 0 If you did everything right, in terminal you can enter echo $?

Giving the answer to the sum. RULES FOR ALL LABS (always include this too in each lab report) IF LABS ARE BUILT (AND POSSIBLY REBUILT), BUT DON'T FULLY FUNCTION: For demonstrations and reports, deduct depends on how adequately you identify problems. For example, make test set-ups to verify functionality of isolated chips, circuit trainer elements, software, relays, other electronics, motors or other higher-voltage circuits and devices. PROVE THAT NO EASY FIX OR SUBSTITUTION WAS POSSIBLE or EASILY IDENTIFIABLE AT THE TIME. Discuss (1) How you identified problems, and (2) How you tried to fix them. Include evidence that you fully understand and have properly connected all pins on a given chip (including considering floating-pins, powering the chip, needed pull-up resistors, proper voltage levels, etc.), and that you have exhausted much time attempted to solve all problems). INCLUDE PHOTO S OF ALL CIRCUITS (AND TEST-SET-UP S) BUILT REPORTS must include: Title Page with lab number, name of lab, your names, Majors, Year (e.g., Junior), who is demonstrating, and who is the designated TEAM LEADER Sections numbered and tilted as follows (always list all of these, and simply put NA if not applicable): 1. Assignment (An exact copy of everything in this document -- exactly how it looks here) 2. Equipment Used (A list of hardware and software) INCLUDE PHOTO S OF ALL EQUIPMENT 3. Methodology (including all design steps, analysis, DECISIONS MADE, etc.) INCLUDE PHOTO S OF ALL CIRCUITS BUILT 4. Options (if applicable, a comparison of each method used) 5. Problems Encountered (including any debugging methodology) INCLUDE PHOTO S OF ANY TEST-CIRCUITS BUILT 6. Testing Methodology (including timing traces, test-vectors, and RATIONALE FOR HOW YOUR METHODOLOGY ASSURES QUALITY COVERAGE including estimated probability of satisfactory coverage by chosen test vectors 7. References (in standard IEEE format) 8. Appendices (for spec sheets, etc.) ALL DESIGN PROCESS STEPS MUST BE INCLUDED for Digital Logic designs (NUMBERED as in EGR/CS 332). If design step not done, list as N.A. For Combinational Digital Logic Design: Step 1: Define problem, Step 2: Encode variables, Step 3: Create truth table, Step 4: Find simplified function(s), Step 5: Draw logic circuit, Step 6: Convert to NAND s, Step 7: Check assumptions, Step 8: Chip circuit diagram For Sequential Digital Logic Design::Step 1: Define problem, Step 2: Create state diagram, Step 3: Encode variables, Step 4: Minimize machine, Step 5: Create state table, Step 6: Append flip-flop inputs, Step 7: Find simplified function(s), Step 8: Draw logic circuit, Step 9: Convert to NAND s Step 10: Analyze any unused states, Step 11: Revise state diagram, Step 12: Check Assumptions, Step 13: Chip circuit diagram COLOR-CODED LOGIC DIAGRAMS are required for any digital circuit (Breadboard, FPGA, etc.) COLOR-CODED CIRCUIT SCHEMATICS are required for any circuit implemented (Breadboard, PLC, ladder logic, etc.), color is a must, hand-colored is ok FLOW CHART is required for any program COMMENT EVERY LINE OF CODE TEAM LEADER has responsibility of coordinating all equipment problems with the Teaching Assistant. Try to stick with same person for this role. TEACHING ASSISTANT will guarantee all working hardware and software when needed and will facilitate acquisition of needed parts.