C:\Users\Jacob Christ\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx

Similar documents
C:\Users\jacob\Documents\MtSAC\ELEC74 Mt SAC - chipkit\homework Sheets.docx

Exam 1. EE319K Spring 2013 Exam 1 (Practice 1) Page 1. Date: February 21, 2013; 9:30-10:45am. Printed Name:

Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables

LCD03 - I2C/Serial LCD Technical Documentation

LCD03 - I2C/Serial LCD Technical Documentation

Lab 2 - Powering the Fubarino. Fubarino,, Intro to Serial, Functions and Variables

SC1602LC 16x2 Large Characters RS232 LCD Module. User s Manual. Large Viewing Area 99mm x 24mm. Large Character Size. 4.84mm x 9.66mm.

Time: 8:30-10:00 pm (Arrive at 8:15 pm) Location What to bring:

LCD05 datasheet 1.0

Review Topics. Midterm Exam Review Slides

CSCI 2212: Intermediate Programming / C Chapter 15

Review Topics. Midterm Exam Review Slides

UNIVERSITY OF LIMERICK OLLSCOIL LUIMNIGH COLLEGE OF INFORMATICS & ELECTRONICS DEPARTMENT OF ELECTRONIC & COMPUTER ENGINEERING

Do not start the test until instructed to do so!

Midterm Exam Review Slides

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

Which LED(s) turn on? May 12, 2017 ENGR 40M Spring 2017 C.Z. Lee, J. Plummer, R. Howe 1

SC1602LCPro-YG ( Yellow Green Backlight ) SC1602LCPro-B ( Blue Backlight ) Large Character Size ( 4.88x9.66 mm )

211: Computer Architecture Summer 2016

University of Texas at Austin Electrical and Computer Engineering Department. EE319K, Embedded Systems, Spring 2013 Final Exam

EE251: Thursday September 20

Basics of UART Communication

Physical Computing Self-Quiz

MICROPROCESSORS A (17.383) Fall Lecture Outline

RS232-ADC16/24 Manual

Signature: 1. (10 points) Basic Microcontroller Concepts

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

Octal & Hexadecimal Number Systems. Digital Electronics

CprE 288 Introduction to Embedded Systems Exam 1 Review. 1

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Laboratory 1 Introduction to the Arduino boards

Microcomputers. Outline. Number Systems and Digital Logic Review

SAINT2. System Analysis Interface Tool 2. Emulation User Guide. Version 2.5. May 27, Copyright Delphi Automotive Systems Corporation 2009, 2010

Few reminders and demos

GARDEN CITY UNIVERSITY. Bachelor of Computer Applications SEMESTER- I. Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04

231 Spring Final Exam Name:

Bachelor of Engineering in Computer and Electronic Engineering

UART (Universal Asynchronous Receiver-Transmitter)

SLCD1-IC Serial LCD Processor

EHB Serial Bluetooth

Hands-on Lab. Lego Communications I2C Basics

EECS 373 Midterm 2 Fall 2018

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Advanced C Programming Topics

Sample Problem Set #1

Binary Values. CSE 410 Lecture 02

Manual. Specifications. Contents. Options

Embedded Systems - FS 2018

Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

EXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART)

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

Adafruit 1-Wire GPIO Breakout - DS2413

Final Exam. 11 May 2018, 120 minutes, 26 questions, 100 points

OBJECTIVES After reading this chapter, the student should be able to:

Hardware: Logical View

COMP2121: Microprocessors and Interfacing. Number Systems

Introduction 1. Liquid crystal display (16 characters by 2 rows) Contrast dial: turn the dial to adjust the contrast of the display (see page 5)

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory

IF96017 MODBUS COMMUNICATION PROTOCOL

CSE 30 Fall 2013 Final Exam

Time now to look at how main causes the three LaunchPad LEDs to flash in sequence.

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

Lab 4 - Asynchronous Serial Communications

F28HS2 Hardware-Software Interface. Lecture 3 - Programming in C 3

UNIVERSAL SERIAL INTERFACE

Xbee module configuration from a µcontroller

Fall 2017 Project Assignment Speed Trap

SISTEMI EMBEDDED. The C Pre-processor Fixed-size integer types Bit Manipulation. Federico Baronti Last version:

CSE 30 Winter 2014 Final Exam

ECE2049 E17 Lecture 2: Data Representations & C Programming Basics

Spring 2017 Project Assignment Alarm Clock with Indoor/Outdoor Thermometer

ECE251: Thursday November 8

MMC and SD Media Driver for Atmel SAM User Guide

EXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART)

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

Conto D2 COMMUNICATION PROTOCOL CONTENTS 1.0 INTRODUCTION

EE292: Fundamentals of ECE

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23.

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

Analyzing the command string for switch to input #

SISTEMI EMBEDDED. The C Pre-processor Fixed-size integer types Bit Manipulation. Federico Baronti Last version:

Computer Organization & Systems Exam I Example Questions

Programming. Elementary Concepts

HMC1022 Digital Compass

Survey. Motivation 29.5 / 40 class is required

SIGNED AND UNSIGNED SYSTEMS

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

CDN36X Series DeviceNet Gateway User Manual

Number Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers

EE319K Exam 1 Summer 2014 Page 1. Exam 1. Date: July 9, Printed Name:

Announcements Homework #3 due today. Ports. Outline for Today C8051 SFRs & Port I/O Worksheet #4 - simple I/O code. Using Ports

User s Manual Closer to Real, Zigbee Module ZIG-100. Wireless Communication. ROBOTIS CO.,LTD

Physics 364, Fall 2012, Lab #9 (Introduction to microprocessor programming with the Arduino) Lab for Monday, November 5

Page 1. Where Have We Been? Chapter 2 Representing and Manipulating Information. Why Don t Computers Use Base 10?

This podcast will demonstrate a logical approach as to how a computer adds through logical gates.

History of Computing. Ahmed Sallam 11/28/2014 1

Transcription:

ELEC 74 Worksheet 1 Logic Gate Review 1. Draw the truth table and schematic symbol for: a. An AND gate b. An OR gate c. An XOR gate d. A NOT gate

ELEC74 Worksheet 2 (Number Systems) 1. Convert the following binary numbers to octal, hexadecimal and decimal: Binary Octal Hexadecimal Decimal 0000 0001 0000 0010 0000 0100 0000 1000 0001 0000 0010 0000 0100 0000 1000 0000 0010 0011 0101 0110 0111 1001 1011 1100 1101 1110 1010 0101 0101 1010 0000 0000 1111 1111 1111 0000 0000 1111 2. Compute the following: a. 2 4 b. 16 2 c. 2 6 d. 8 2 e. 2 8 f. 16 4 g. 2 10 h. 2 20 3. How many unique values can be represented with an 8 bit, 16 bit and 32 bit binary numbers?

ELEC 74 Worksheet 3 Output Ports 1. Convert the following binary numbers to hex: 0101 1010 = 1101 1011 = 2. Write C code to set pins 10 as input and pin 20 as output. 3. Assuming we have a function called bytetopins (like nibbletopins from the labs but for 8 pins instead of four) that outputs one bit per bit of an input data word. bytetopins(uint8_t in, uint8_t p0, uint8_t p1, uint8_t p2, uint8_t p, uint8_t p, uint8_t p, uint8_t p, uint8_t p, uint8_t p) If pins 0-3 are configured as output and pins 4-7 as input, and pin 0-7 are hooked up to LED s, how many LED s will light up after this command: bytetopins(0x3c, 0,1,2,3,4,5,6,7);? 4. What are the C language reserved or stdint.h library words used to create an 8-bit unsigned variable? 5. In the pictured drawing, which side of the LED is connected to the microcontroller? anode or cathode 6. If the output voltage of the microcontroller is 3.3V and the forward bias voltage of the LED is 1.1V what is what is the required resistor value to have 22mA flowing through the LED?

ELEC 74 Worksheet 4 Inputs, Loops and Conditions 1. What is the logical AND operator? 2. What is the bitwise OR operator? 3. What is the result of a bitwise and (&) operation: 0 0 1 1 1 1 0 0 & 1 1 1 1 0 0 0 0 ------------------------- 4. What is the result of a bitwise or ( ) operation: 0xC3 0x0F? 5. What truth value does the following C language condition evaluate to? ( ( 0x05 & 0xF0 ) 0x01 ) 6. What value will x be when the following while loop exits? 7. How many times will have the loop been run? uint8_t i; uint8_t x; i = 1; while( i & 0x03 ) { i = i + 1; } x = i; 8. What is the steady state voltage potential at the BUTTON net if the button is not pushed?

ELEC 74 Worksheet 5 Subroutines 1. Write a prototype for a function called add that takes two uint8_t parameters a and b and returns a uint8_t value? 2. Write the function for the above prototype that returns the sum of a and b. 3. If the value 13 is passed to the following subroutine what value does it return? us8 foo(us8 x) { return (x - 3) / 2; } 4. What is the purpose of a subroutine? a. To hide complexity of sophisticated algorithms. b. The make a program easier to read. c. To break up complex problems in to smaller more manageable tasks. d. To hold the place of a non-existent function while developing a program. e. All of the above. Use the following function prototype to answer the next four questions: uint8_t foo(uint16_t bar, uint32_t baz); 5. How many parameters does the function expect to be passed to it? 6. What is the return type of the function? 7. What is the name of the second parameter? 8. What is the type of the first parameter passed to the function?

ELEC 74 Worksheet 6 Asynchronous Serial Comm. 1. How many bits are transmitted per frame with 9600, 8, N, 1 UART communications? 2. What is the width in seconds of a bit transmitted at 115,200bps? 3. What is the width in seconds of an 8-bit frame with one stop bit no parity? 4. If you only needed to transmit in a single direction at a time in both directions what duplex scheme or schemes could you use? 5. Write the line of code that can be used to setup serial communications at 9600 bits per second using the Arduino / Wiring abstractions. 6. What is the command to detect if any characters have been received by the target board? 7. What is the command to read a character out of the serial buffer? 8. If our desired bit rate is 115200 and our actual bit rate is 116312 using the following formula what is the percentage error from our desired bit rate? Error% = (Calculated Baud Rate - Desired Baud Rate)/Desired Baud Rate 100% 9. Will the error rate from the previous question be acceptable for most systems assuming 10 bits per frame?

ELEC 74 Worksheet 7 - Pointers 1. Declare an 8-bit unsigned variable x: 2. Declare a pointer to an 8-bit unsigned variable px: 3. What is the value of x after this program runs? void setup(void) { us8 x = 3; us8 y = 2; us8 *p; p = &y; x = x + *p; } 4. What is the value of c after this program runs? void setup(void) { char c; char string[] = ABCDEF ; char *p = string; p = p + 3; c = *p; } 5. How many bytes are allocated by the following declaration? char string[] = MtSAC ; 6. Data in a queue (circular buffer) is put into and pulled out of in what order? 7. What are the hexadecimal values for the ASCII characters 0 (zero) and A (capital A)? 8. What is the hexadecimal value for the ASCII characters \r?

ELEC 74 Worksheet 8 Strings and Parsing 1. What is difference between an A and an a in the ASCII table? 2. What is the <string.h> library function for getting the length of a string? 3. What is the <string.h> library function for comparing the values of two strings? 4. What is the purpose of implied null (zero) character at the end of a character string in the C programming language?

ELEC 74 Practical Exam Practice Create a program counts from 3 to 30 by 3's with a quarter second delay between each number. The output shall be displayed on the terminal window. When the count sequence if finished, it shall repeat. If a number is divisible by 5 print divisible by 5 next to it. At and above 20 print almost there at 30 print made it and do not print almost there. An example output put might look like this: