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

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

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

LCD03 - I2C/Serial LCD Technical Documentation

CSCI 2212: Intermediate Programming / C Chapter 15

LCD03 - I2C/Serial LCD Technical Documentation

Amarjeet Singh. January 30, 2012

Basics of UART Communication

LCD05 datasheet 1.0

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

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

Communication. Chirag Sangani

Universität Dortmund. IO and Peripheral Interfaces

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

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

Environmental Data Acquisition Using (ENC28J60)

Keyboards. The PS/2 Protocol

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

Axiom Manufacturing. Users Manual. for PROJECT DEVELOPMENT BOARD AXM xiom anufacturing

Interfacing Techniques in Embedded Systems

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

Microcontrollers and Interfacing

Part 1 Connecting the Chips In your parser project add a new tab named "LCD.h" Copy this code into that tab //1// #include <QuickTypes.

Getting Started with ESPI Interface Using the Z8 Encore! XP F1680

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

Programming (1.0hour)

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

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date:

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4

Microcomputers. Outline. Number Systems and Digital Logic Review

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

EECS 373 Midterm 2 Fall 2018

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)

Operating Instructions Evaluation Board for dbc Operation with RS232 or SPI Interface

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

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

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

NHD-0216K3Z-NS(RGB)-FBW-V3

Dot Graphic VFD Module GU126x64F-K612A4

PIXI click PID: MIKROE Weight: 28 g

PIC Serial Peripheral Interface (SPI) to Digital Pot

SIGNED AND UNSIGNED SYSTEMS

Review Topics. Midterm Exam Review Slides

COOKING WITH TEAM 279

LCD 64x32 Logic Boards User Manual

SLCD1-IC Serial LCD Processor

Prototyping Module Datasheet

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

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

or between microcontrollers)

LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide. Copyright 2008 IMS

Review Topics. Midterm Exam Review Slides

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

231 Spring Final Exam Name:

Input/Output Ports and Interfacing

Layad Circuits Arduino Basic Kit B. Content Summary

RS232-ADC16/24 Manual

AT89S8252 Development Board V1.0. Manual

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


Fundamental of I.T. (c) Application of computer *************

Hands-on Lab. Lego Communications I2C Basics

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

END-TERM EXAMINATION

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

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

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

211: Computer Architecture Summer 2016

LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display

Lab 5: EBI and ADC: Digital Voltmeter

Generalised User Interface for Embedded Applications using an LCD screen and keypad.

Advanced C Programming Topics

SPI (Serial & Peripheral Interface)

ARM HOW-TO GUIDE Interfacing Switch with LPC2148 ARM

DAQ-1000 Data Acquisition and Control System Application

Embedded Systems and Software

Bachelor of Engineering in Computer and Electronic Engineering

Do not start the test until instructed to do so!

Beginning C Programming for Engineers

EE251: Thursday September 20

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

BV4626 General Purpose I/O. Product specification. Mar 2010 V0.a. ByVac Page 1 of 13

Computer Architecture

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

I also provide a purpose-built ADC/DAC board to support the lab experiment. This analogue I/O board in only needed for Part 3 and 4 of VERI.

COMP2121: Microprocessors and Interfacing. Number Systems

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

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

High Resolution Digital Weigh-Scale Design Using Z8 Encore! Microcontrollers

UART (Universal Asynchronous Receiver-Transmitter)

Pridgen Vermeer Robotics Xmega128 Manual

CDB5529 Evaluation Board and Software

UART TO SPI SPECIFICATION

Why Don t Computers Use Base 10? Lecture 2 Bits and Bytes. Binary Representations. Byte-Oriented Memory Organization. Base 10 Number Representation

Room 3P16 Telephone: extension ~irjohnson/uqc146s1.html

Lecture 03 Bits, Bytes and Data Types

ELEC 3040/3050 Lab Manual Lab 2 Revised 8/20/14. LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller

MOS-AV-162A Technical Manual. Revision: 1.0

Embedded programming, AVR intro

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers

BINARY SYSTEM. Binary system is used in digital systems because it is:

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 00000001 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 1 as input and pin 2 as output. 3. 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 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? us8 i; us8 x; i = 1; while( i & 0x03 ) { i = i + 1; } x = i; 8. What is the 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 us8 parameters a and b and returns a us8 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: us8 foo(us16 bar, us32 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 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?

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 main(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 main(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? 5. When creating your own an library where are function prototypes declared? 6. When creating your own an library where are functions declared? 7. What is the notation for the including a user library called lightshow where the header for the library is called lightshow.h?

ELEC 74 Worksheet 9 ADC 1. ADC is an acronym for? 2. What are the inputs and outputs of an ADC? 3. Using a 10-bit ADC with a Vref of 5V what is reading when 1V is applied? 4. Using a 8-bit ADC with a Vref of 3.3V what voltage is required for a reading of 0x20? 5. What is the voltage resolution of an 8-bit ADC with a 3.3V reference? 6. What is the voltage resolution of a 16-bit ADC with a 3.3V reference?

ELEC 74 Worksheet 10 DAC / SPI 1. DAC is an acronym for? 2. DAC is an input or an output? 3. SPI is an acronym for? 4. The SPI signal MISO is an acronym for? 5. The SPI signal MOSI is an acronym for? 6. The SPI signal SDO is an acronym for? 7. The SPI signal SDI is an acronym for? 8. The SPI signal SCK is an acronym for? 9. Using a 16-bit DAC with a Vref of 5V what is value is required to output 1V? 10. Using an 8-bit DAC with a Vref of 3.3V what is the voltage output when it is set to 0x20?

ELEC 74 Worksheet 11 LCD / SPI Shift Registers 1. What does the acronym LCD stand for? 2. What is meant by bit mapped graphics? 3. What is meant by mono chromatic? 4. What does RGB stand for when referring to display technology? 5. What does pixel mean? 6. To cause a pixel on the LCD we are using in this class to become opaque what should the voltage for the segment be in relation to the backplane needed? 7. The D input to the serial to parallel shift register is hooked up to what output from the microcontroller? 8. The CLK input to the serial to parallel shift register is hooked up to what output from the microcontroller?

ELEC 74 Worksheet 12 C++ Classes 1. Objects and Instances? 2. Attributes? 3. Methods? 4. Public / Private? 5. How to declare an instance of an object? 6. How to call a member function of an object?