EE 331 DESIGN PROJECT - BASIC CALCULATOR
|
|
- Henry Gibbs
- 7 years ago
- Views:
Transcription
1 EE 331 DESIGN PROJECT - BASIC CALCULATOR Submitted by: Alex MacKay & Alex Meng Department of Electrical Engineering, University of Saskatchewan December 1, 2009 Design Description The design project chosen is a basic calculator capable of performing addition, subtraction and multiplication operations with robust handling. The calculator takes input from a user in real-time via a keypad and displays output on a 4-digit, 7- segment LED display module. The control and arithmetic algorithm is performed using a Microchip PIC16F887 microcontroller. A high level block diagram of the hardware implementation is shown below. Fig. 1: Block Diagram of the Calculator Hardware We chose a 4 4 keypad made by Grayhill Inc. for our input source[1]. Using a keypad, we were able to achieve real-time data input using much fewer MCU input pins than that required using individual switching methods for each 'key'. As indicated in Fig. 1, the 16 keys represent: the ten decimal digits from 0 to 9, three arithmetic operators, evaluation ('='), clear data ('C'), and a project message key ('M'). The PIC16F887 was chosen as the MCU for our project for a number of reasons. Most prominently, it meets the design constraint which requires that we use a midrange PIC16F MCU. It also has many I/O pins which makes it suitable for our project as we need quite a few pins to interface with a seven segment display and keypad. The MCU chosen also has a wide operating voltage range (2V - 5.5V) which allowed flexibility for powering the circuit in testing and implementation. Lastly, the MCU has an ALU so that we can implement basic binary addition and subtraction (which are of course required to implement any larger addition, subtraction or multiplication
2 2 operations) and a sufficient amount of registers for setting up and storing values. We used a 4-digit 7-segment LED module made by Lite-On Inc. to display our input values as well as results [2]. We chose a 4-digit display as it seemed enough to showcase basic mathematical operators extending to numbers beyond 255 (8-bit which our MCU is capable of). Basic High-level Hardware Operation: Through the input bus, the information from the keypad is sent to the microcontroller where it is decoded. Once the information has been processed, the microcontroller will send the relevant data through output data bus to the display. Conceptual Design - Hardware 1. Keypad The keypad is implemented by a scanning matrix in which each pin of each row of the keypad is connected to an output pin on the MCU which is changing (dynamic) very quickly. Each column pin of the keypad is connected to an input pin on the MCU which uses pull-up resistors to keep the value as HIGH until changed by a keypad input. Since the input pins (MCU) require pull-up resistors to avoid floating values, we chose PORTB [3:0] to implement these connections since it has internal pull-up resistors. We chose PORTA[3:0] as our output pins (MCU) to go to the rows on the keypad. Although the choice of scanning pins (PORTA pins) is not necessarily significant, we did purposely choose pins that were all in the same nibble so that we could easily implement a rotate function on the register to create 'scanning' (ie: or rotating) 2. Common Anode 7-segment LED Display Module We chose PORTD[6:0] as output pins to control which segments of each digit were on at any given time; these are connected to the common anodes of the LED's. We connected PORTC[7:4] to each 'digit control cathodes' and configured them as output. Using these digit control cathodes, we were able to display multidigit values by having only one digit on at a time and switching them very quickly. 3. MCU and Power Supply The microcontroller was programmed by a Microchip PICkit 3 programmer using the standard programming pin connections provided by Microchip [3]. Since the calculator is simply a prototype, we decided to just use the programmer as a power supply since adding an external battery supply to a prototype bread-board seemed unnecessary. The detailed schematic of the designed calculator is shown on the following page in Fig. 2.
3 3 Fig. 2: Designed/Implemented Calculator Schematic Major Challenges Before delving into explanations of some of the main software implementations and some challenges faced, it is important to point out a couple of major barriers faced during the project (due to the project itself). Since we decided to implement all of our operations using BCD rather than binary (explained further on the following page), we were unable to utilize all the features of the binary operations and had to write all exception handling (ex. setting flags) for decimal operations ourselves. By doing this, we ended up writing all of our operations in original code (no external references with the exception of the keypad). As well, due to the nature of our project (arithmetic logic which depends on user input), we had to consider a lot of different error cases which needed to be dealt with individually that would not impede on the ability to do calculations. For these reasons, our project could not be implemented as a simple procedural device such as something which does a predicted event upon input (example: control output pins to external devices with delays - LED's etc.) but rather has to consider many different variables as well as [the basic level of] interfacing arithmetic logic internally with real-time user input and display externally.
4 4 Conceptual Design - Software 1. Keypad Scanning Using a similar approach to the 4 3 keypad scanning process shown in our course textbook, we were able to obtain correct key identification from our input [4]. However, when the scanning algorithm was actually implemented, we encountered two major problems. The first occurred when a key was accidently lightly touched (for example as one key is pressed, one's finger grazes an adjacent key); the MCU may unintentionally read the value. The reason this occurs is because we did not originally have a method of debouncing. In order to fix this problem, we added a debounce routine, which makes it so that values can only be read if the key is pressed for a certain amount of time. The second problem is caused by the scanning speed. The program can scan the keypad many times while the button is pressed which sometimes causes the key-press (by user) to be read multiple times. To solve this problem we added a 0.5 second delay after each scan cycle to slow down the scanning speed. 2. Data Storage We found that our PIC16F887 had far more memory than required for the design. With this in mind, we decided to take advantage of some of this memory and store our individual BCD digits into registers as we needed them (with one digit per register in the lower nibble and bits 7-4 cleared). From this we decided that we would implement our arithmetic operations using BCD operations rather than binary. By doing this, we were able to think about all calculations and storage as single decimal digit operations. In hind-sight, it seems that it may have been easier to use a combination of BCD and binary operations since the multiplication operation becomes particularly complicated when using only BCD values. Our main calculation storage registers are for two numbers N1_X and N2_Y which are the operands, and a result register, RESULT_Z where values are stored after operations. The variables X, Y and Z indicate which digit is being looked at (3 = MSB/thousands', 2 = hundreds', 1 = tens', 0 = LSB/ones'). In order to implement all the arithmetic operations in a robust manner, we also used a fair number of temporary storage locations as well as flag and indicator registers. One design challenge faced in this project was the implementation of a multiplication algorithm in which we called both the addition and subtraction subroutines. After any arithmetic operation is called, it stores the final results in our RESULT_Z registers. We were therefore forced to use several temporary storage registers when implementing the multiplication algorithm so that we would not have overwrites of our original number inputs or our results when we used the addition and subtraction algorithms embedded in the multiplication subroutine. Another design challenge occurred when we had to implement digit shifting upon multi-digit input. For example, if a user wishes to enter the number '7682', it is expected that the digits would be entered in sequence from MSB to LSB. To do
5 5 this we had to develop an algorithm which puts the first number inputted into the LSB and will shift digits towards the MSB as more digits are entered. The algorithm also stores the number of digits currently inputted. One important challenge met which has yet to be discussed was overflowing the stack which is only eight levels deep. After the design was near completion, we encountered several stack overflow situations which meant we had to reduce the number of embedded subroutine calls so that we would not overflow the stack. 3. Dynamic Display 1) Project Message Display When the calculator is turned on for the first time or if the project message button (M) is pressed, the following strings will be shown on the display to advertise the course and the creators of the designed project: "EE 331 ALEX." 2) Error Message Display If a numerical calculation/entered value leads to digit overflow (i.e. a value greater than '9999') or a negative value is encountered (i.e. subtraction of a larger number from a smaller number) an error message string: "Err," appears on the display for about two seconds before resetting the calculator. 3) Numeric Display The values which are desired to have displayed are converted into required HEX numbers corresponding to each digit via a 7-segment LUT. These values are stored in single-digit BCD registers labeled SEV_SEG_NUM_X (following same conventions as other BCD registers with X). As mentioned previously, we are able to display multi-digit values by only displaying a single character at any instant in time (on one digit) and then turning it off and turning on another digit. We displayed each value for about 2ms so that the minimum frequency of display was around 125Hz which is far beyond the human eyes capability to track (making the displayed string appear smooth). 4. Exception Handling 1) Digit Overflow As mentioned previously, there are two types of overflow which both occur when the number required for display exceeds 4 digits. One of which happens if the user tries to enter a number more than 4 digits long and the other occurs if the calculated value is more than 4 digits long. In both cases, the calculator detects the problem and displays the error message: "Err" and resets all values. 2) Multi-Operation Calculation The calculator has been designed for basic mathematical operation such that it can compute multi-operation calculations as long as an overflow or negative numbers do not occur (in which case error message is displayed as per usual). It should be mentioned that this calculator has basic order of operations rather than scientific order of operations, meaning that if the user enters "1+5*2", it will compute "1+5"; store this value in N1, then compute "6*2" and display a result of 12.
6 6 3) Negative values As mentioned previously, the calculator is not designed to handle negative numbers and will produce and error message if the result is negative. The reason we did not design this calculator to handle negative numbers is because we thought it would be unnecessary for such small values since we only have four digits, although it should be relatively easy to implement for future work. 5. Clear Button If the clear button (C) is pushed, the calculator will be reset to default. All register values are cleared and it will display zero as if it were in the initial status. 6. Arithmetic Operations As mentioned earlier, all arithmetic operations were implemented using BCD arithmetic rather than binary operations. The logic of each task is therefore quite intuitive since most people are able to think of doing this basic math with decimal numbers. Although using BCD operations may make the logic more intuitive, it does however, make the implementation much more complicated than simply using binary operations. When using BCD operations, it was required that all event handling (i.e. digit carry/borrows/overflows) were implemented without the help of binary operations, since these would only occur on carry/borrow/overflows of values of ten (not two, and not at 255). Therefore a number of helper subroutines were required to handle all exceptions. All operations required extensive error checking since there are many different ways in which overflows can occur. It should be mentioned that tracking all possible errors (mainly by overflow) was the most difficult and time consuming part of the operations to implement. Since they are so vast and unique, they will not be discussed in detail but can be viewed in the code or understood at a [very] basic logic level (code will give a better appreciation) from the flow charts in Appendix A (starting at page 13). Besides error handling, there were other major difficulties encountered when implementing the arithmetic operations as discussed below. In the subtraction subroutine, we needed to implement event handling that could not only do single borrows, but cascade borrows if the digit above (attempting to be borrowed from) was zero. This was implemented by checking for zeroes in a simple binary subtraction initially, but then we needed to perform a 10's compliment routine and a series of flag checks to monitor and ensure proper functionality of cascading borrows. To understand how this works, refer to "Subtraction correction subroutines" in the full source code. In the multiplication subroutine we faced several major challenges. We needed to implement an operator to do multiplication of two single digits and store the result. This was done by storing one of the operands in a decrementing counter while adding the other number to itself the amount of times that was equal to the counter operand (also this had to call addition since it could obviously become a two digit number; a flag was set so that we wouldn't waste time doing a full
7 7 add;). Once this was complete, we had to adjust values based on previous carry's (from previous multiplication/additions). A basic flow chart of how the remaining components of multiplication (and all other operations) were carried out can be found in Appendix A. As mentioned before, the error handling should be viewed in the code since this was the most intensive task but the cases are too different to warrant listing them in these paragraphs. Conclusion/Recommendations When designing our calculator, we did not consider a few things which may be considered for later work. We realized it to be extremely unlikely for any realistic design of a commercial calculator to use a PIC16FXXX MCU (especially in assembly) or a 7-segment LED display similar to the module we chose and therefore looked at the project as a method of practice more than implementing a "product" so to speak. With this in mind, we focused our efforts on successful algorithm implementation and robustness so that it could properly handle all the cases we thought of. For this reason, we did not put a lot of effort into power reduction (since the 7-segment display alone draws an unnecessary amount of current) and so if someone were to continue on the project, that may be an area which should be considered. Particularly using an interrupt routine waiting for input so the device does not scan in an infinite loop waiting for input (could be in power saving mode) would help the overall power efficiency. Another area which we did consider but could have more work put into is calculation and memory efficiency. The device was fairly efficient considering we used BCD operations, but could become more efficient (and use less temporary space) if the operations were implemented as more basic binary operations using the binary operation instructions which are given. Our design was also lacking in a number of areas which are more easily implementable that should be considered for possible future work. Before anything else is done, it is recommended that the code would be broken down into separate assembly files in relevant blocks which could be linked together so that the code does not seem convoluted. As a basic calculator, it is recommended that a division operation be implemented. This should be a relatively simple operation to do since it could use the subtraction subroutine already available; the only large problem faced would occur with truncation since our display only has 4-digits and may not provide adequate accuracy; for this reason, decimal values less than one should also be implemented (that is X.X). This leads to the next recommendation, which is to replace the LED-display with an LCD module so that more digits could be displayed and require less I/O ports (per displayable digit) on the MCU. Also, as mentioned previously, we should be able to implement negative number handling quite easily which should be done if there is a sufficient number of space for display (as on an LCD). Lastly it may be desirable to change the functionality of the calculator from "basic" to "scientific" so that it follows the common precedence order of operations sequence.
8 8 Task Breakdown Throughout the design process, both partners performed different tasks on the project in separated blocks so that the overall load on each group member would be lessened. Due to many design challenges faced well as hours debugging code and finding new exceptions, each group member worked on the project for around 48 hours. The basic tasks (simplified to exclude debugging which was the majority of time spent) performed by each member are outlined below: Alex Meng Assembly implementation of hardware control (keypad, display module) Interfacing arithmetic operations with hardware (bringing code together) Draft of design report Alex MacKay Algorithm and assembly implementation of BCD arithmetic operations Schematic design Draft report editing and final design report
9 9 REFERENCES [1] Data sheet for Grayhill 4 4 keypad: dard%20keypads.pdf [2] Data sheet for Lite-on 4-digit, 7-segment display module: [3] Data sheet for Microchip PIC16F887: [4] Katzen, S. (2005). The Quintessential PIC Microcontroller (2nd ed.). New York: Springer.
10 10 Appendix A - Program Flow Charts Cont'd A.1: Main Logic
11 11 Appendix A - Program Flow Charts Cont'd A.2 - Operator Storage Logic
12 12 Appendix A - Program Flow Charts Cont'd A.3 - Data storage Logic
13 13 Appendix A - Program Flow Charts A.4: Addition logic (High Level)
14 14 Appendix A - Program Flow Charts Cont'd A.5: Subtraction logic (High Level)
15 15 Appendix A - Program Flow Charts Cont'd *NOTE: A single multiplication (two single digits) is performed by adding one digit to itself the amount of times of the value of the other digit being multiplied. A.6:Multiplication logic (High Level)
16 16 Appendix A - Program Flow Charts Cont'd A.7 - Calculation Logic
AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR
AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR INTRODUCTION This Project "Automatic Night Lamp with Morning Alarm" was developed using Microprocessor. It is the Heart of the system. The sensors
More informationPROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1
UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 This work covers part of outcome 2 of the Edexcel standard module. The material is
More information150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
More information2011, The McGraw-Hill Companies, Inc. Chapter 3
Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through
More informationPART B QUESTIONS AND ANSWERS UNIT I
PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional
More informationMicrocontroller Code Example Explanation and Words of Wisdom For Senior Design
Microcontroller Code Example Explanation and Words of Wisdom For Senior Design For use with the following equipment: PIC16F877 QikStart Development Board ICD2 Debugger MPLAB Environment examplemain.c and
More informationSwitch board datasheet EB007-00-1
Switch board datasheet EB007-00-1 Contents 1. About this document... 2 2. General information... 3 3. Board layout... 4 4. Testing this product... 5 5. Circuit description... 6 Appendix 1 Circuit diagram
More informationMonitoring of Intravenous Drip Rate
Monitoring of Intravenous Drip Rate Vidyadhar V. Kamble, Prem C. Pandey, Chandrashekar P. Gadgil, and Dinesh S. Choudhary Abstract A drip rate meter, for monitoring intravenous infusion, is developed using
More informationSTEPPER MOTOR SPEED AND POSITION CONTROL
STEPPER MOTOR SPEED AND POSITION CONTROL Group 8: Subash Anigandla Hemanth Rachakonda Bala Subramanyam Yannam Sri Divya Krovvidi Instructor: Dr. Jens - Peter Kaps ECE 511 Microprocessors Fall Semester
More informationEXERCISE 3: String Variables and ASCII Code
EXERCISE 3: String Variables and ASCII Code EXERCISE OBJECTIVE When you have completed this exercise, you will be able to describe the use of string variable and ASCII code. You will use Flowcode and the
More informationProgramming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II
Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II Administration: o Prayer PicBasic Pro Programs Used in This Lesson: o General PicBasic Pro Program
More informationDecimal Number (base 10) Binary Number (base 2)
LECTURE 5. BINARY COUNTER Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be
More informationEE 261 Introduction to Logic Circuits. Module #2 Number Systems
EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook
More informationDEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers
More informationIntroduction to Microcontrollers
Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers
More informationAdvanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2
Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of
More informationControlling a Dot Matrix LED Display with a Microcontroller
Controlling a Dot Matrix LED Display with a Microcontroller By Matt Stabile and programming will be explained in general terms as well to allow for adaptation to any comparable microcontroller or LED matrix.
More informationData Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide
Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Sensors LCD Real Time Clock/ Calendar DC Motors Buzzer LED dimming Relay control I2C-FLEXEL PS2 Keyboards Servo Motors IR Remote Control
More informationLab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)
Dr. Greg Tumbush, gtumbush@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement
More informationMICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1
MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable
More informationAn Introduction to MPLAB Integrated Development Environment
An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to
More informationDIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION
DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION Introduction The outputs from sensors and communications receivers are analogue signals that have continuously varying amplitudes. In many systems
More informationScan a Keypad with the BS2 For Pushbutton User Input
Stamp Applications no. 22 (December 96): Scan a Keypad with the BS2 For Pushbutton User Input 16-key matrix keypad software plus beginner s race-timer project by Scott Edwards THE BUTTON instruction offered
More information(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
More informationBinary Numbers. Binary Octal Hexadecimal
Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how
More informationc0003 A Simple PIC Application CHAPTER 3
c0003 CHAPTER 3 A Simple PIC Application Chapter Outline 3.1. Hardware Design 46 3.1.1. PIC 16F84A Pin-Out 46 3.1.2. BIN Hardware Block Diagram 47 3.1.3. BIN Circuit Operation 48 3.2. Program Execution
More informationHow To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (
dspic / PIC24 Multiprogrammer datasheet EB064-00 00-1 Contents 1. About this document... 2 2. General information... 3 3. Board layout... 4 4. Testing this product... 5 5. Circuit description... 6 Appendix
More informationDigital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture
More informationNumbering Systems. InThisAppendix...
G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal
More informationDigital Electronics Detailed Outline
Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept
More informationA Digital Timer Implementation using 7 Segment Displays
A Digital Timer Implementation using 7 Segment Displays Group Members: Tiffany Sham u2548168 Michael Couchman u4111670 Simon Oseineks u2566139 Caitlyn Young u4233209 Subject: ENGN3227 - Analogue Electronics
More informationMICROPROCESSOR AND MICROCOMPUTER BASICS
Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit
More informationETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation
ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation Program Definition: Write a program to control the speed of a dc motor using pulse width modulation. Discussion: The speed of a dc motor is
More informationAVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE
Atmel AVR 8-bit Microcontroller AVR151: Setup and Use of the SPI APPLICATION NOTE Introduction This application note describes how to set up and use the on-chip Serial Peripheral Interface (SPI) of the
More informationLecture N -1- PHYS 3330. Microcontrollers
Lecture N -1- PHYS 3330 Microcontrollers If you need more than a handful of logic gates to accomplish the task at hand, you likely should use a microcontroller instead of discrete logic gates 1. Microcontrollers
More informationThe components. E3: Digital electronics. Goals:
E3: Digital electronics Goals: Basic understanding of logic circuits. Become familiar with the most common digital components and their use. Equipment: 1 st. LED bridge 1 st. 7-segment display. 2 st. IC
More informationPICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description
Features PICNet 1 PIC18 Network & SD/MMC Development Board IC Sockets for 28 or 40-pin Microchip PIC18F Microcontrollers IC Socket for 8-pin serial EEPROM Multiple MCU Oscillator sources Full 10BaseT IEEE
More informationMicrocontroller Based Low Cost Portable PC Mouse and Keyboard Tester
Leonardo Journal of Sciences ISSN 1583-0233 Issue 20, January-June 2012 p. 31-36 Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Ganesh Sunil NHIVEKAR *, and Ravidra Ramchandra MUDHOLKAR
More informationplc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationDesigning VM2 Application Boards
Designing VM2 Application Boards This document lists some things to consider when designing a custom application board for the VM2 embedded controller. It is intended to complement the VM2 Datasheet. A
More informationHow To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player
Watt Saver for a Cell Phone AC Adapter Reference Design Document Number: DRM130 Rev 1, 10/2013 2 Freescale Semiconductor, Inc. Contents Section number Title Page Chapter 1 Introduction 1.1 Overview...5
More informationENGI E1112 Departmental Project Report: Computer Science/Computer Engineering
ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering Daniel Estrada Taylor, Dev Harrington, Sekou Harris December 2012 Abstract This document is the final report for ENGI E1112,
More informationInterfacing Analog to Digital Data Converters
Converters In most of the cases, the PIO 8255 is used for interfacing the analog to digital converters with microprocessor. We have already studied 8255 interfacing with 8086 as an I/O port, in previous
More informationThe stack and the stack pointer
The stack and the stack pointer If you google the word stack, one of the definitions you will get is: A reserved area of memory used to keep track of a program's internal operations, including functions,
More informationAdvanced LED Controller (LED Chaser)
Advanced LED Controller (LED Chaser) Introduction. Advanced LED controller (also known as LED Chaser) is microcontroller based circuit designed to produce various visual LED light effects by controlling
More informationDisplay Board Pulse Width Modulation (PWM) Power/Speed Controller Module
Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module RS0 Microcontroller LEDs Motor Control Pushbuttons Purpose: To demonstrate an easy way of using a Freescale RS0K2 microcontroller
More informationMACHINE ARCHITECTURE & LANGUAGE
in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based
More information8051 MICROCONTROLLER COURSE
8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:
More informationChapter 2 Logic Gates and Introduction to Computer Architecture
Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are
More informationCHAPTER 11: Flip Flops
CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach
More informationwhat operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?
Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the
More informationProgramming Logic controllers
Programming Logic controllers Programmable Logic Controller (PLC) is a microprocessor based system that uses programmable memory to store instructions and implement functions such as logic, sequencing,
More informationPIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm)
PIC Programming in Assembly (http://www.mstracey.btinternet.co.uk/index.htm) Tutorial 1 Good Programming Techniques. Before we get to the nitty gritty of programming the PIC, I think now is a good time
More informationEasyPIC4 User s Manual
SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD MikroElektronika - Books - Compilers User s Manual PIC MICROCHIP DEVELOPMENT BOARD 3in1 mikro IN-CIRCUIT DEBUGGER USB 2.0 IN-CIRCUIT PROGRAMMER With
More information4 Character 5x7 LED Matrix Display
Mini project report on 4 Character 5x7 LED Matrix Display Submitted by Agarwal Vikas, MTech II, CEDT K.Sreenivasulu M.E (Micro) II, CEDT CENTRE FOR ELECTRONICS DESIGN AND TECHNOLOGY INDIAN INSTITUTE OF
More informationETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies
ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation
More informationFigure 8-1 Four Possible Results of Adding Two Bits
CHPTER EIGHT Combinational Logic pplications Thus far, our discussion has focused on the theoretical design issues of computer systems. We have not yet addressed any of the actual hardware you might find
More informationPROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1
UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1 This work covers part of outcome 3 of the Edexcel standard module: Outcome 3 is the most demanding
More informationUpon completion of unit 1.1, students will be able to
Upon completion of unit 1.1, students will be able to 1. Demonstrate safety of the individual, class, and overall environment of the classroom/laboratory, and understand that electricity, even at the nominal
More informationUser Manual. AS-Interface Programmer
AS-Interface Programmer Notice: RESTRICTIONS THE ZMD AS-INTERFACE PROGRAMMER HARDWARE AND ZMD AS-INTERFACE PROGRAMMER SOFTWARE IS DESIGNED FOR IC EVALUATION, LABORATORY SETUP AND MODULE DEVELOPMENT ONLY.
More informationLED board datasheet EB004-00-2
LED board datasheet EB004-00-2 Contents 1 About this document... 2 2 General information... 3 3 Board layout... 4 4 Testing this product... 5 5 Circuit description... 6 Appendix 1 Circuit Diagram Copyright
More informationLADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES
page 1/10 This document is designed as a quick-start primer to assist industrial automation programmers who are familiar with PLCs and Relay Ladder Logic programming to better understand the corresponding
More informationCounters and Decoders
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter
More informationLSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology
LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3
More informationPLL frequency synthesizer
ANALOG & TELECOMMUNICATION ELECTRONICS LABORATORY EXERCISE 4 Lab 4: PLL frequency synthesizer 1.1 Goal The goals of this lab exercise are: - Verify the behavior of a and of a complete PLL - Find capture
More informationLab 17: Building a 4-Digit 7-Segment LED Decoder
Phys2303 L.A. Bumm [Nexys 1.1.2] Lab 17 (p1) Lab 17: Building a 4-Digit 7-Segment LED Decoder In this lab your will make 4 test circuits, the 4-digit 7-segment decoder, and demonstration circuit using
More informationDevelopment of Low Cost Private Office Access Control System(OACS)
Development of Low Cost Private Office Access Control System(OACS) Sadeque Reza Khan Prime University, Department of Electrical and Electronic Engineering, Dhaka-1216, Bangladesh sadeque_008@yahoo.com
More informationDEPARTMENT OF INFORMATION TECHNLOGY
DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453
More informationPROBLEMS (Cap. 4 - Istruzioni macchina)
98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary
More informationAVR Butterfly Training. Atmel Norway, AVR Applications Group
AVR Butterfly Training Atmel Norway, AVR Applications Group 1 Table of Contents INTRODUCTION...3 GETTING STARTED...4 REQUIRED SOFTWARE AND HARDWARE...4 SETTING UP THE HARDWARE...4 SETTING UP THE SOFTWARE...5
More informationApplication Note AN-1187
Application Note AN-1187 IR3230 Sensorless BLDC Motor Drive By Alex Lollio Table of Contents Application Note AN-1234... 1 Introduction... 2 Basic Working Principle... 3 Motor Control... 4 Motor Control
More informationModbus RTU Communications RX/WX and MRX/MWX
15 Modbus RTU Communications RX/WX and MRX/MWX In This Chapter.... Network Slave Operation Network Master Operation: RX / WX Network Master Operation: DL06 MRX / MWX 5 2 D0 Modbus Network Slave Operation
More informationAnalog-to-Digital Converters
Analog-to-Digital Converters In this presentation we will look at the Analog-to-Digital Converter Peripherals with Microchip s midrange PICmicro Microcontrollers series. 1 Analog-to-Digital Converters
More informationDevelop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs
Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,
More informationIntroduction to Embedded Systems. Software Update Problem
Introduction to Embedded Systems CS/ECE 6780/5780 Al Davis logistics minor Today s topics: more software development issues 1 CS 5780 Software Update Problem Lab machines work let us know if they don t
More information2.0 Command and Data Handling Subsystem
2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation
More informationKeil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
More informationComputer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
More informationBasic Use of the TI-84 Plus
Basic Use of the TI-84 Plus Topics: Key Board Sections Key Functions Screen Contrast Numerical Calculations Order of Operations Built-In Templates MATH menu Scientific Notation The key VS the (-) Key Navigation
More informationXC83x AP08130. Application Note. Microcontrollers. intouch Application Kit - LED Matrix Display V1.0, 2012-02
XC83x AP08130 Application te V1.0, 2012-02 Microcontrollers Edition 2012-02 Published by Infineon Technologies AG 81726 Munich, Germany 2012 Infineon Technologies AG All Rights Reserved. LEGAL DISCLAIMER
More informationABB i-bus EIB Logic Module LM/S 1.1
Product Manual ABB i-bus EIB Logic Module LM/S 1.1 Intelligent Installation System Contents page 1 General... 3 1.1 About this manual... 3 1.2 Product and functional overview... 3 2 Device technology...
More informationInterfacing To Alphanumeric Displays
Interfacing To Alphanumeric Displays To give directions or data values to users, many microprocessor-controlled instruments and machines need to display letters of the alphabet and numbers. In systems
More informationIntroduction to LogixPro - Lab
Programmable Logic and Automation Controllers Industrial Control Systems I Introduction to LogixPro - Lab Purpose This is a self-paced lab that will introduce the student to the LogixPro PLC Simulator
More informationCOMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/combinational_circuits.htm Copyright tutorialspoint.com Combinational circuit is a circuit in which we combine the different
More informationHow to design and implement firmware for embedded systems
How to design and implement firmware for embedded systems Last changes: 17.06.2010 Author: Rico Möckel The very beginning: What should I avoid when implementing firmware for embedded systems? Writing code
More informationSeven-Segment LED Displays
Seven-Segment LED Displays Nicholas Neumann 11/19/2010 Abstract Seven-segment displays are electronic display devices used as an easy way to display decimal numerals and an alterative to the more complex
More informationezsystem elab16m Project 1F: Alarm System (Full Project description)
ezsystem elab16m Project 1F: Alarm System (Full Project description) ezsystem The aim of ezsystem is to enable Creativity and Innovation at an early age in a Problem Based Learning (PBL) approach. ezsystem
More informationEmbedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
More informationPACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section
PRELIMINARY DS2434 Battery Identification Chip FEATURES Provides unique ID number to battery packs PACKAGE OUTLINE Eliminates thermistors by sensing battery temperature on chip DALLAS DS2434 1 2 3 256
More informationMODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3
MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence : 0660-3 CMPS03 Magnetic Compass. Voltage : 5v only required Current : 20mA Typ. Resolution : 0.1 Degree Accuracy : 3-4 degrees approx. after calibration Output
More informationGetting Started with PIC24F/PIC24H Programming and Interfacing in C
Getting Started with PIC24F/PIC24H Programming and Interfacing in C This series of short articles covers the basics of programming a PIC24FJ32GA002/PIC24H 16-bit microcontroller, using Microchip s free
More informationDsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB
DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB Contents at a Glance 1. Introduction of MPLAB... 4 2. Development Tools... 5 3. Getting Started... 6 3.1. Create a Project... 8 3.2. Start MPLAB...
More informationMaking Basic Measurements. Publication Number 16700-97020 August 2001. Training Kit for the Agilent Technologies 16700-Series Logic Analysis System
Making Basic Measurements Publication Number 16700-97020 August 2001 Training Kit for the Agilent Technologies 16700-Series Logic Analysis System Making Basic Measurements: a self-paced training guide
More informationTechnical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students
Session: 2220 Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students Adam S. El-Mansouri, Herbert L. Hess, Kevin M. Buck, Timothy Ewers Microelectronics
More informationLABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB
LABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING FACULTY OF ENGINEERING & TECHNOLOGY SRM UNIVERSITY, Kattankulathur 603 203 1 LIST OF EXEPRIMENTS
More informationThe goal is to program the PLC and HMI to count with the following behaviors:
PLC and HMI Counting Lab The goal is to program the PLC and HMI to count with the following behaviors: 1. The counting should be started and stopped from buttons on the HMI 2. The direction of the count
More informationAn Overview of Stack Architecture and the PSC 1000 Microprocessor
An Overview of Stack Architecture and the PSC 1000 Microprocessor Introduction A stack is an important data handling structure used in computing. Specifically, a stack is a dynamic set of elements in which
More informationSPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI
SPI Overview and Use of the PICmicro Serial Peripheral Interface In this presentation, we will look at what the Serial Peripheral Interface, otherwise known as the SPI, is, and how it is used to communicate
More informationI 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM
I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM v 0.40 Welcome to the Microchip Technology Presentation on using the MSSP module in Master I 2 C mode. In this
More informationC Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands
C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is
More information