Model Answer to PartA of Examination Paper EEE305J1: Microcontroller Systems 2001/2 General Observations
|
|
- Eileen Waters
- 7 years ago
- Views:
Transcription
1 Model Answer to PartA of Examination Paper EEE305J1: Microcontroller Systems 2001/2 General Observations Design questions like the mock question below are extremely difficult to mark, not least because there are literally an infinity of answers and the required information may pop up in several places in your script. The student should be careful to maximise his/her marks by clearly setting out all required information and assumptions, and by using aids to clarification, such as task lists, flowcharts and program comments. Time is of the essence with a question like this. Taking the primary mark (ex. bonus) of 70% gives us a total of 125 minutes (two hours). Thus a 6 mark section should be completed in around ten minutes, or 1.8 minutes per mark! Do not write a two-page essay for six marks; it isn t cost effective. The Question A certain vending machine accepts 1p, 2p, 5p, 10p, 20p and 50p coins. The coin mechanism channels the coins past the appropriate six microswitches and generates a short pulse whenever any microswitch closes. A 2-digit common-cathode 7-segment display is to indicate the total up to 99p. The intelligence of this machine is to be implemented using a PIC16F87X-based system which is to read the six coin sensing switches each time it is interrupted and to manage the 2-digit multiplexed 7-segment display. Pertinent hardware details are: A coin passing by in the chute is to close the normally-open microswitch which taken as a group will give a one of six code output (only one switch closed at a time). When any switch is closed, a single high-going pulse on a separate line is generated to alert the PIC that a coin has been inserted. The two common-cathode 7-segment displays are multiplexed to the one port with each digit being enabled by a single NPN transistor. When enabled, each segment requires a nominal 20 ma current. The output signalling a passing coin is to be active-high at normal logic levels. The PIC is clocked using a 4 MHz crystal and powered at +5 V and Ground. You are asked to design both input and output interface and software for the system to implement the following scheme. Questions (1), (2) and (3) should be illustrated by diagrams and any software port configuration software should be shown. 1. The input interface for the six coil microswitches, including the necessary resistor. 9 minutes...[5 marks] 1
2 2. The single input line indicating activity in the money chute interrupting the PIC. Show how the interrupt is enabled in software. 4 minutes...[2 marks] 3. The output interface to the two common-cathode 7-segment displays and two NPN transistors. You may assume that the minimum current gain of these enabling transistors is 40. Determine the value of the segment resistors and base resistors. 22 minutes...[12 marks] 4. An algorithm and assembly-level listing as follows, assuming that file registers 20 2Fh are free: (a) An Interrupt Service Routine entered whenever a coin falls down the chute, that accumulates the input money microswitch state as a grand total of pence in a file register. 30 minutes...[16 marks] (b) A subroutine giving a nominal 1 ms delay. 9 minutes...[5 marks] (c) A subroutine converting from a binary byte in the Working register to binary-coded decimal, with two bytes giving Tens and Units. 14 minutes...[8 marks] (d) A subroutine converting a 4-bit code binary 0000 through 1001 to active-high 7- segment code. 10 minutes...[6 marks] (e) A main endless background loop to: Initialise the system and variables. Call up subroutine?? above to convert the total of money in?? to binary-coded decimal. Call up subroutine?? two times to convert each digit to 7-segment code. To activate each 7-segment digit in turn with the appropriate data using the delay subroutine of??. 30 minutes...[16 marks] For Bonus marks: 5. What additional hardware would be required if a PIC16F84 were to be used as the microcontroller? 10 minutes...[6 marks] 6. What additional software and hardware resources would be needed to extend your system to cope with money values up to 2.55? 7 minutes... [4 marks] 2
3 Overall Specifications Be sure to understand the question! There are six switches to be interfaced to the PIC, and the most convenient way to do this is to use Port B inputs for this purpose. The pulse / \ from the coin mechanism can be connected to RB0/INT and the two 7-segment displays connected to, say, Port D with two Port A lines being used to drive the two transistors which enable the displays. Basically when the processor is interrupted each switch is tested for 0 in turn and the appropriate amount is added to the total. In the background the contents of this moneybox is continually converted to two BCD digits and displayed, with alternate digits being displayed each millisecond. Worked Solution A possible overall circuit is shown in Fig.??. PIC16F87X +5V Logic 0/1 from PIC 0V/+5V RD7 RB7 1p RD6 RB6 2p RA? RD5 RB5 5p LED RD4 RB4 10p to other six segments Common cathode RD3 RB3 20p RB? Logic 0/1 from PIC 0V/+5V RD2 RB2 50p RD1 RB1 Typical segment RD0 RB0/INT Coin passing down chute MSD Common cathode LSD Common cathode TR1 RB1 RA1 RA0 TR2 RB2 Figure 1: Block diagram of system covering solutions 1.1, 1.2 and 1.3 3
4 1. Key points are: Connection of the switches to a Port B lines, RB[7:2], with one end of switches grounded 1 mark. The need for a pull-up resistor to give a logic 1 when the switch is open. This is typically around 10 kω. Alternatively (only one student got this) use the internal Port B weak pull-up resistors by clearing bit 7 of the Option register. This needs the instruction bsf OPTION_REG,7 whilst in Bank 1 2 marks. Setting up of Port B: (also shown are the settings of Port A and Port D) 2 marks. bsf STATUS,RP0 ; Change to Bank 1 movlw 0FFh ; PortB all inputs movwf TRISB ; Make PortB all inputs movlw b ; PortA, pins 0 & 1 are out put movwf TRISA ; connected to transistors clrf TRISD ; Port D all outputs to common displays bcf STATUS,RP0 ; Back to Bank 0 For Port B it would be sufficient to state that all ports are automatically set to input on reset. 2. Key points are: Line shown connected to RB0/INT 1 2 mark. Setting up of INTCON to enable the hardware interrupt mark. bsf INTCON,INTE ; Setthe INTerruptEnable flag bsf INTCON,GIE ; Set the General Interrupt Enable flag 3. Diagram showing two 7-segment digits with series anode resistors for each segment to limit current from the seven Port D lines and a NPN transistor connecting the common cathodes to ground or off (see Fig.??) 6 marks. To calculate the segment resistors we know that a LED drops around 2 V when conducting and that the PIC outputs are 5 V (actually it drops a little when it supplies 20 ma) when logic 1. Thus V = IR; R = Ω 2 marks To calculate the base transistor resistor, we know to know what collector current the transistor will carry. Each on segment will need 20 ma, and if all segments are lit (i.e. ) that makes 140 ma. If the current gain of the transistor is 40 (rather low) then the base current is 1.3 kω 2 marks. Code above setting Port D and Port A[1:0] to outputs 2 marks. 4. It is possible to get 2 of the paper s marks from the software just in this question. Thus 3 you ignore software at your peril! Although marks are not specifically allocated for task lists, flowcharts etc. it is strongly recommended that you spend some time putting your thoughts down on paper before 4
5 doing any coding. Not only does this help clarify your thoughts but it makes it easier for us to follow your program and give marks. (a) A possible Interrupt Service routine follows the task list: i. Save the Status and Working registers. ii. Get the total, labelled MONEY, in the main routine and then test each switch in turn adding the appropriate amount if a 0 is found. When completed restore the new value back in MONEY. iii. Restore the registers saved above. ; * Interrupt Service Routine entered on rising edge on pin RB0 * ; * Interrogates 6 switches and adds appropriate amount to MONEY * ISR movwf _work ; Save working register in file called _work swapf STATUS,w ; Get Status register without changing flags movwf _status ; and save in file register called _status ; bcf INTCON,INTF ; Clear interrupt flag movf MONEY,w ; Getcurrenttotal money btfss PORTB,7 ; Check for 1p switch (== 0?) addlw 1 ; IF closed THEN add one p ; and so on btfss PORTB,6 ; Check for 2p switch (== 0?) addlw 2 ; IF closed THEN add two p btfss PORTB,5 ; Check for 5p switch (== 0?) addlw 5 ; IF closed THEN add five p btfss PORTB,4 ; Check for 10p switch (== 0?) addlw d 10 ; IF closed THEN add decimal ten p ; NOTE DECIMAL 10 not10 hex! btfss PORTB,3 ; Check for 20p switch (== 0?) addlw d 20 ; IF closed THEN add decimal twenty p btfss PORTB,2 ; Check for 50p switch (== 0?) addlw d 50 ; IF closed THEN add decimal fifty p movwf MONEY ; Putyour money away ; swapf _status,w ; Get original Status register put away above movwf STATUS ; Does notaffectstatus flags swapf _work,f ; Swapping the saved Working reg twice swapf _work,w ; into W is a way of not affecting Status flags retfie ; Exit 5
6 Marks for: Saving entry/exit (standard for most ISRs) 5 marks. Clearing INTF before leaving 2 marks. Checking each bit RB[7:2] and adding the appropriate constant 8 marks. Return from interrupt retfie 1 mark. Notes: i. A few students added the BCD amounts; e.g. 50h for 50p remember that 50h is the same as 50 BCD ( ). They then corrected at the end, before exit by adding 6 to the low digit if it was over 9 and the same for the upper nybble. That meant that an additional 8 marks was allocated in place of section (4)(c). ii. One student checked for a Carry after an addition and if so cleared the total to show overflow (i.e. over 99p). (b) A nominal 1 ms delay at 4 MHz can be got by decrementing the Working register down from FFh (decimal 255) to zero. ; FUNCTION: Provides a nominal 1ms delay with a 4MHz crystal * ; ENTRY : None * ; EXIT : Working register zero * DELAY_1_S movlw d 255 ; : 1 DLOOP addlw -1 ; Decrementdown from 255 to 0: 255 * 1 btfss STATUS,Z ; Exit loop if zero : (254*1) + 2 goto DLOOP ; Repeat until skipped over : 254*2 return ; : 2 Total time in cycles ( ) is 2 (for the call) =1023. With a 4 MHz crystal one cycle equals 1 µs so 1023 µs is just over 1 ms. Marks for: Algorithm 2 marks Calculation 2 marks Use of return for subroutine 1 mark NOTE: Could have been done as a macro. (c) To convert from a naturally ( ) coded binary number which you know will never be greater than 99 to tens and units, simply subtract ten repeatedly until the outcome underflows (i.e. generates a Borrow). The number of successful subtractions it the number of tens and the residue after the last successful subtraction is the units. A suitable task list is: i. Zero the Tens count. ii. Subtract ten from the binary number. iii. IF did not generate a borrow then increment TENS and repeat. iv. The residue is UNITS. 6
7 * ; * FUNCTION: Determines the number of tens and units in a byte < 100 * ; * ENTRY : Natural binary byte in Working register * ; * EXIT : TENS, UNITS updated. W changed * ; * EXAMPLE : W = > TENS = (06), UNITS = (05) * * BIN_2_BCD clrf TENS ; Zero the Tens count ; LOOP_10 addlw -d 10 ; Take away ten ( ) ; btfss STATUS,C ; IF no Borrow (C = 1) THEN skip goto COMPLETE ; ELSE a borrow signals completion incf TENS,f ; IncrementTens count goto LOOP_10 ; and repeat ; COMPLETE addlw d 10 ; When complete then add on the last ten too many! movwf UNITS ; and this is the Units count return ; End of subroutine Marks for: Algorithm 2 marks. Loop structure 2 marks. Coding 4 marks. NOTE: See remark in ISR above. (d) This again is a standard classroom exercise: t ; * FUNCTION: Converts a binary nybble 0-9 o act ive-high 7-seg code * ; * ENTRY : Binary value (0-9) in W * ; * EXIT : 7-segmentcode in W * ; * EXAMPLE : n = 06, ret urn in W = * SVN_SEG addwf PCL,f ; Add n to PC to return with a code for n ; gfedcba retlw b ; Code for 0 retlw b ; Code for 1 retlw b ; Code for 2 retlw b ; Code for 3 retlw b ; Code for 4 retlw b ; Code for 5 retlw b ; Code for 6 retlw b ; Code for 7 retlw b ; Code for 8 retlw b ; Code for 9 7
8 Marks for: Code patterns 2 marks addition/retlw structure 4 marks Bonus marks were given if it was pointed out that it is possible for the addition to overflow the PC, aspcl is only eight bits. Also mention that for robustness the value sent out to this subroutine should be ANDed to remove upper four bits and dummy entries in the table for 1010b 1111b. (e) The examination paper question is essentially a task list. Depending on whether MONEY is kept as BCD or a subroutine used to convert on display, the listing may vary somewhat. Here is a typical listing. include "p16f87x.inc" org 0 ; The Resetvector goto MAIN ; Goto the main background program org 4 ; The Interrupt vector goto ISR ; Goto the Interrupt handler ; MONEY equ 20h ; The money box MAIN ; Port initialisation as given in response for (1), (2) \& (3) above. clrf MONEY ; Startoff on Resetwith zero money! ; M_LOOP movwf MONEY,w ; Get money total call BIN_2_BCD ; Convertto BCD for display ; movf UNITS,w ; The Units from BIN_2_BCD call SVN_SEG ; Convertto 7-segmentcode movwf PORTC ; Send to display bsf PORTA,0 ; Turn on the LSD display bcf PORTA,1 ; and off the MSD call DELAY_1_MS ; for one ms ; movf TENS,w ; The Tens from BIN_2_BCD call SVN_SEG ; Convertto 7-segmentcode movwf PORTC ; Send to display bcf PORTA,0 ; Turn off the LSD display bsf PORTA,1 ; and the MSD display on call DELAY_1_MS ; for one ms ; goto M_LOOP ; Repeat forever Marks for: 8
9 Reset/interrupt vectors 2 marks Correct sequencing of calls with data passing 8 marks Multiplexing of the two digits 6 marks Bonus marks 5. A serial scheme, such as in Fig of your book, could replace Port C by RA2 & RA3 (say) and an external serial-in/parallel-out shift register driving both displays in nonmultiplexed mode. All other hardware would remain the same 6 marks. 6. Initially subtract a hundred in the BIN_2_BCD subroutine incrementing a HUNDS location. A third 7-segment display would be needed with RA2 and another transistor used to enable this additional display. Additional 1 and 2 switches would be an advantage, but not essential 4 marks. eee305j1_first_a1_solution_01.tex L A T E X February 7,
PIC 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 informationUsing The PIC I/O Ports
EE2801 -- Lecture 22 Using The PIC I/O Ports EE2801-L22P01 The Variety Of Available IO Ports The PIC 16F874 microcontroller has five different IO ports, accounting for thirty three of the processors forty
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 informationHi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan
PIC18 Timer Programming g Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu Functions of PIC18 timer Functions of the timer Generate a time delay As
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 informationSection 29. Instruction Set
M Section 29. Instruction Set HIGHLIGHTS This section of the manual contains the following major topics: 29. Introduction...29-2 29.2 Instruction Formats...29-4 29.3 Special Function Registers as Source/Destination...29-6
More information10-bit Σ ADC from a PIC16F84
1-bit Σ ADC from a PIC16F84 Jesús Arias 22nd November 23 1 The circuit +5V 1 + 1uF 1nF 1nF 33 4.7 V DTR U1 Analog Input ( 5 Volt) R3 68K R1 1K R2 1K C1 33nF PIC16F84 RB7 RA2 RA3 ad2.asm OSC1 OSC2 X1 R4
More informationHow To Program A Microcontroller With Memory On A Microchip Microcontroller
Getting Started with On-chip Memory 2001 Microchip Technology Incorporated. All Rights Reserved. S0001A RAM/ROM(x14) 1 In this Getting Started tutorial you will learn about the various memory types found
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 informationAUTOMATIC 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 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 informationFour-Channel Digital Voltmeter with Display and Keyboard. 8 x 220W RB0 RB1 RB2 RB3 RB4 RB5 RB6 RB7 RA0 RA1 RA2 RA3 PIC16C71
Four-Channel Digital Voltmeter with Display and Keyboard Author: Stan D Souza Microchip Technology Inc. MULTIPLEXING FOUR 7-SEGMENT LED DISPLAYS INTRODUCTION The PIC16C71 is a member of the mid-range family
More informationSection 14. Compare/Capture/PWM (CCP)
M Section 14. Compare/Capture/PWM (CCP) HIGHLIGHTS This section of the manual contains the following major topics: 14.1 Introduction...14-2 14.2 Control Register...14-3 14.3 Capture Mode...14-4 14.4 Compare
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 informationSection 8. Interrupts
Interrupts M Section 8. Interrupts HIGHLIGHTS This section of the manual contains the following major topics: 8.1 Introduction...8-2 8.2 Control Registers...8-5 8.3 Interrupt Latency...8-10 8.4 INT and
More informationPIC in Practice. A Project-Based Approach. D. W. Smith
PIC in Practice PIC in Practice A Project-Based Approach D. W. Smith AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Newnes is an imprint of Elsevier
More informationReal-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold
REAL-TIME CLOCK Real-Time Clock The device is not a clock! It does not tell time! It has nothing to do with actual or real-time! The Real-Time Clock is no more than an interval timer connected to the computer
More informationSection 9. I/O Ports
I/O Ports M Section 9. I/O Ports HIGHLIGHTS This section of the manual contains the following major topics: 9.1 Introduction...9-2 9.2 PORTA and the TRISA Register...9-4 9.3 PORTB and the TRISB Register...9-6
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 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 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 informationEmbedded C Programming
Microprocessors and Microcontrollers Embedded C Programming EE3954 by Maarten Uijt de Haag, Tim Bambeck EmbeddedC.1 References MPLAB XC8 C Compiler User s Guide EmbeddedC.2 Assembly versus C C Code High-level
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 information8051 hardware summary
8051 hardware summary 8051 block diagram 8051 pinouts + 5V ports port 0 port 1 port 2 port 3 : dual-purpose (general-purpose, external memory address and data) : dedicated (interfacing to external devices)
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 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 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 informationAN585. A Real-Time Operating System for PICmicro Microcontrollers INTRODUCTION. Why do I Need a Real-Time Kernel? What is Multitasking Anyway?
A Real-Time Operating System for PICmicro Microcontrollers Author: INTRODUCTION Jerry Farmer Myriad Development Company Ever dream of having a Real-Time Kernel for the PIC16CXXX family of microcontrollers?
More informationAN727. Credit Card Reader Using a PIC12C509 DATA ENCODING INTRODUCTION FIGURE 1: POSITION OF ISO TRACKS 1, 2 AND 3. Andrew M Errington
Credit Using a PIC12C509 AN727 Author: INTRODUCTION Andrew M Errington Many people carry one or more magnetically encoded cards with them for accessing a range of services. Perhaps the most common example
More informationMemory organization. Memory blocks: Program memory (flash-type) 16 kword (32 kbyte) (instruction 16 bit wide) Data RAM 1536 byte (1.
TNE019 Mikrodatorer F2 1 Memory organization Memory blocks: Program memory (flash-type) 16 kword (32 kbyte) (instruction 16 bit wide) PC Reset Data RAM 1536 byte (1.5 kbyte) Data EEPROM 256 byte TNE019
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 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 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 informationARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction
Software ISO 7816 I/O Line Implementation Features ISO 7816-3 compliant (direct convention) Byte reception and transmission with parity check Retransmission on error detection Automatic reception at the
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 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 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 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 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 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 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 informationAN857. Brushless DC Motor Control Made Easy INTRODUCTION S 001 B. Anatomy of a BLDC SIMPLIFIED BLDC MOTOR DIAGRAMS
Brushless DC Motor Control Made Easy AN857 Author: INTRODUCTION Ward Brown Microchip Technology Inc. This application note discusses the steps of developing several controllers for brushless motors. We
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.
More informationPIC16F84A. 18-pin Enhanced Flash/EEPROM 8-Bit Microcontroller. Devices Included in this Data Sheet: Pin Diagrams. High Performance RISC CPU Features:
M PIC6F84A 8-pin Enhanced Flash/EEPROM 8-Bit Microcontroller Devices Included in this Data Sheet: PIC6F84A Extended voltage range device available (PIC6LF84A) High Performance RISC CPU Features: Only 35
More informationSerial Communications
Serial Communications 1 Serial Communication Introduction Serial communication buses Asynchronous and synchronous communication UART block diagram UART clock requirements Programming the UARTs Operation
More informationChapter 13. PIC Family Microcontroller
Chapter 13 PIC Family Microcontroller Lesson 01 PIC Characteristics and Examples PIC microcontroller characteristics Power-on reset Brown out reset Simplified instruction set High speed execution Up to
More informationAccurate Measurement of the Mains Electricity Frequency
Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC dogan@neu.edu.tr Abstract The frequency of the mains electricity supply
More informationSmall Hardware Development and Prototyping Board for the SX28
Project Report: Small Hardware Development and Prototyping Board for the SX28 Project Number: PR57 1. Project Description 2. Schematic Diagram 3. Physical Diagram 4. Component Layout Diagram 5. Bill of
More informationFlow Charts & Assembly Language
Microprocessors and Microcontrollers Flow Charts & Assembly Language EE3954 by Maarten Uijt de Haag, Tim Bambeck, Harsha Chenji Flowcharts.1 Flow Chart Diagram of the sequence of operations in a computer
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 informationSection 19. Voltage Reference
M Section 19. Voltage Reference HIGHLIGHTS This section of the manual contains the following major topics: 19.1 Introduction...19-2 19.2 Control Register...19-3 19.3 Configuring the Voltage Reference...19-4
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 informationSection 28. In-Circuit Serial Programming (ICSP )
M Section 28. In-Circuit Serial Programming (ICSP ) HIGHLIGHTS This section of the manual contains the following major topics: 28. Introduction...28-2 28.2 Entering In-Circuit Serial Programming Mode...28-3
More informationPIC16F8X. 18-pin Flash/EEPROM 8-Bit Microcontrollers. Devices Included in this Data Sheet: Pin Diagrams. High Performance RISC CPU Features:
18-pin Flash/EEPROM 8-Bit Microcontrollers Devices Included in this Data Sheet: PIC16F83 PIC16F84 PIC16CR83 PIC16CR84 Extended voltage range devices available (PIC16LF8X, PIC16LCR8X) High Performance RISC
More informationMeasuring Resistance Using Digital I/O
Measuring Resistance Using Digital I/O Using a Microcontroller for Measuring Resistance Without using an ADC. Copyright 2011 John Main http://www.best-microcontroller-projects.com Page 1 of 10 Table of
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 informationPrograming the Microprocessor in C Microprocessor System Design and Interfacing ECE 362
PURDUE UNIVERSITY Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 Course Staff 1/31/2012 1 Introduction This tutorial is made to help the student use C language
More informationAN108 IMPLEMENTING A REALTIME CLOCK. Relevant Devices. Introduction. Key Points. Overview
IMPLEMENTING A REALTIME CLOCK Relevant Devices This application note applies to the following devices: C8051F000, C8051F001, C8051F002, C8051F005, C8051F006, C8051F007, C8051F010, C8051F011, and C8051F012.
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 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 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 informationPICmicro tm Development Board
PICmicro tm Development Board Crownhill Associates smart electronic solutions Disclaimer In order to comply with EMC directive 89/336/EEC, this product should not be used outside of a classroom or laboratory
More informationAN1229. Class B Safety Software Library for PIC MCUs and dspic DSCs OVERVIEW OF THE IEC 60730 STANDARD INTRODUCTION
Class B Safety Software Library for PIC MCUs and dspic DSCs AN1229 Authors: Veena Kudva & Adrian Aur Microchip Technology Inc. OVERVIEW OF THE IEC 60730 STANDARD INTRODUCTION This application note describes
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 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 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 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 informationSimple Alarm System WIRELESS AND REMOTE CONTROLLED PERSONAL APPLIANCE CODE WORD ORGANIZATION TRANSMISSION FORMAT
Simple Alarm System WIRELESS AND REMOTE CONTROLLED PERSONAL APPLIANCE Author: Kirill Yelizarov V. Moscow Power Engineering Institute Moscow, Russia email: tihonov@srv-vmss.mpei.ac.ru The alarm system discussed
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 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 informationBASIC COMPUTER ORGANIZATION AND DESIGN
1 BASIC COMPUTER ORGANIZATION AND DESIGN Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions Input-Output and Interrupt Complete
More informationEMBEDDED SYSTEMS PROGRAMMING WITH THE PIC16F877
EMBEDDED SYSTEMS PROGRAMMING WITH THE PIC16F877 Second Edition By Timothy D. Green Copyright 2008 by Timothy D. Green All Rights Reserved. Table of Contents Preface. 5 List of Figures. 6 Abbreviations
More information8085 INSTRUCTION SET
DATA TRANSFER INSTRUCTIONS Opcode Operand Description 8085 INSTRUCTION SET INSTRUCTION DETAILS Copy from source to destination OV Rd, Rs This instruction copies the contents of the source, Rs register
More informationTimer A (0 and 1) and PWM EE3376
Timer A (0 and 1) and PWM EE3376 General Peripheral Programming Model Each peripheral has a range of addresses in the memory map peripheral has base address (i.e. 0x00A0) each register used in the peripheral
More informationHANDLING SUSPEND MODE ON A USB MOUSE
APPLICATION NOTE HANDLING SUSPEND MODE ON A USB MOUSE by Microcontroller Division Application Team INTRODUCTION All USB devices must support Suspend mode. Suspend mode enables the devices to enter low-power
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 informationTraditional IBM Mainframe Operating Principles
C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain
More informationKey Words Student Paper, School of Professional Studies
Motor Speed Sensing with PIC Microcontroller Brandon Upchurch, Olivet Nazarene University Faculty Advisor: Dr. Rodney Korthals, Olivet Nazarene University Student Paper Abstract A system was designed and
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 informationController for AD9850 DDS Modules Andy Talbot G4JNT 2012-12-06
Controller for AD9850 DDS Modules Andy Talbot G4JNT 2012-12-06 Latest Comments. Construction notes and feedback from builders at the end The low cost ( 3) Chinese made modules available via Ebay contain
More informationHaving read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.
Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage
More informationHD44780-Based LCD Modules. Introduction to the LM018L
HD44780-Based LCD Modules Hitachi LM018L 40 character x 2 lines Built-in LSI HD44780 controller +5volt single power supply Display Colour: Grey LM018L: Introduction Interfacing Display Pattern and Character
More informationInterrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4. What Happens When You Reset the HCS12?
Interrupts and the Timer Overflow Interrupts Huang Sections 6.1-6.4 o Using the Timer Overflow Flag to interrupt a delay o Introduction to Interrupts o How to generate an interrupt when the timer overflows
More informationUsing Arduino Microcontrollers to Sense DC Motor Speed and Position
ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------
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 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 information- 35mA Standby, 60-100mA Speaking. - 30 pre-defined phrases with up to 1925 total characters.
Contents: 1) SPE030 speech synthesizer module 2) Programming adapter kit (pcb, 2 connectors, battery clip) Also required (for programming) : 4.5V battery pack AXE026 PICAXE download cable Specification:
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 informationImplementing SPI Master and Slave Functionality Using the Z8 Encore! F083A
Application Note Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A AN026701-0308 Abstract This application note demonstrates a method of implementing the Serial Peripheral Interface
More informationRS232 Board datasheet
RS232 Board datasheet Contents 1. About this document 2. General information 3. Board Layout 4. Getting Started 5. Circuit Description Appendix 1 Circuit Diagram Copyright 2004 Matrix Multimedia Limited
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 informationThe 104 Duke_ACC Machine
The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components
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 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 informationSoftware Manual RS232 Laser Merge Module. Document # SU-256521-09 Rev A
Laser Merge Module Document # SU-256521-09 Rev A The information presented in this document is proprietary to Spectral Applied Research Inc. and cannot be used for any purpose other than that for which
More informationFEATURES DESCRIPTION. PT6321 Fluorescent Display Tube Controller Driver
Fluorescent Display Tube Controller Driver DESCRIPTION The PT6321 is a dot matrix fluorescent display tube controller driver IC which displays characters, numerics and symbols. Dot matrix fluorescent display
More informationHD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)
HD4478U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver) Description The HD4478U dot-matrix liquid crystal display controller and driver LSI displays alphanumerics, Japanese kana characters,
More informationDS1821 Programmable Digital Thermostat and Thermometer
ma www.maxim-ic.com FEATURES Requires no external components Unique 1-Wire interface requires only one port pin for communication Operates over a -55 C to +125 C (67 F to +257 F) temperature range Functions
More information8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA
Features Compatible with MCS-51 products On-chip Flash Program Memory Endurance: 1,000 Write/Erase Cycles On-chip EEPROM Data Memory Endurance: 100,000 Write/Erase Cycles 512 x 8-bit RAM ISO 7816 I/O Port
More informationVoltage boost and buck circuits using Atmel AVR Tiny13V for driving a white LED.
Voltage boost and buck circuits using Atmel AVR Tiny13V for driving a white LED. By Steven Weber, KD1JV 1/26/09 The PWM feature of the Tiny13 processor can be used to make a simple voltage boost or buck
More information