/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */
|
|
- Tiffany Floyd
- 5 years ago
- Views:
Transcription
1 /*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */ /*the speed the cell which are less dense can float and the cell that are denser can sink*/ /*the user has five option of speed 1)100 RPM 2)200 RPM 3)300 RPM 4)500RPM 5)above 500RPM error */ /*In progress:temprature shouldn't exceed 50C if temprature exceeds it will stop it will be measured with a termostat */ /*In Progress: There is an on and off button which will allow the user to turn on and off the centrifuge*/ /*In Progress: There is an auto turn off like power saving mechanism if the user didn't use it for a certain period of time */ #include <stdlib.h> //standard include files #include <pic.h>//library files for microcontroller #include <htc.h>//detrmine which complier should be run #include<time.h>//add a time function library CONFIG(DUNPROT & PWRTDIS & XT & WDTDIS & BORDIS & LVPDIS); #ifndef_rcal_freq // Unless already defined assume 4MHz system frequency // Used to calibrate delay_us() and delay_ms() #define_rcal_freq #endif #define PRESS_BUTTON RE2//Sets PRESS_BUTTON to the value of pin RE2 to turn on the Centrifuge #define PRESS_bUTTON RE1//Sets PRESS_BUTTON to the value of pin RE1 to leave the Centrifuge at auto control
2 #define TEMPERATURE RB1 //Sets TEMPERATURE to the value of RB1 to display the temprature #define BUTTON1 RB2 //Sets the BUTTON1 to the value of RB2 to set the speed #define BUTTON2 RB3 //Sets the BUTTON2 to the value of RB3 to set the speed #define BUTTON3 RB4 //Sets the BUTTON3 to the value of RB4 to set the speed #define BUTTON4 RB5 //Sets the BUTTON4 to the value of RB5 to set the speed #define BUTTON5 RB6 //Sets the BUTTON5 to the value of RB6 to set the speed void InitLCD(void); void DisplayC(unsigned char position, const char *str); void clear_display(void); int ChangeState, DispMode, resetlcd, advalue; //Declare the variablea //;;;;;;; LoopTime subroutine ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; //; //; This subroutine waits for Timer2 to complete its ten millisecond count //; sequence. void LoopTime(void) for (;;)
3 if ( TMR2IF ) // Check whether ten milliseconds are up TMR2IF=0; // Clear flag //;;;;;;; Initial subroutine ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; //; //; This subroutine performs all initializations of variables and registers. //; It is important to refer to the PIC datasheet to understand what is happening. void Initial(void) ADCON1 = 0b ; // Setup A/D converter and enable PORTE as digital I/O ADCS0 = 1; // Use A/D FOSC/8 TRISA = 0b ; // Set I/O for PORTA TRISB = 0b ; // Set I/O for PORTB TRISC = 0b ; // Set I/O for PORTC TRISD = 0b ; // Set I/O for PORTD TRISE = 0b ; // Set I/O for PORTE PR2 = 95; // Set up Timer2 for a looptime of 10 ms PORTD = 0; // Turn off LEDs T2CON = 0b ; // Finish set up of Timer2 DispMode = 0;
4 ChangeState = 0; resetlcd = 1; OPTION = 0b ;// Timer 0 prescale set 32:1 InitLCD(); // normally call just before setting up INTCON INTCON = 0b ; // Enable interrupts //;;;;;;; Mainline program ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; void LCD() //This function uses the DisplayC function to write text to the LCD screen if(resetlcd) resetlcd = 0; clear_display(); //This function clears the LCD display //so it can accomodate new characters if(!dispmode) (0x80) DisplayC(0x80, "BLINK"); //This function writes "BLINK" starting at the top left of the screen DisplayC(0xC0, "PRESS ENTER"); //This writes "PRESS ENTER" starting at the bottom left of the screen (0xC0) PORTD = 0b ; //This line resets the LEDs for Blink
5 else if(dispmode==1) DisplayC(0x80, "A/D CONVERT"); DisplayC(0xC0, "TURN RP1"); void Blink() //This function blinks the 8 LEDs at half second intervals int i; PORTD ^= 0b ; //Toggles LEDs of PORTD on/off for(i=50;i>0;i--) //For loop calls the 10 ms LoopTime routine 50 times //this takes 500 ms to complete LoopTime(); void ShowAD() //This function displays the result of the A/D converter //by incrementing LEDs as the A/D number increases if(advalue<128) //It checks the value against a series of IF statements //chooses the appropriate level and sets the correct PORTD = 0b ; //number of pins high else if(advalue<128*2)
6 PORTD = 0b ; else if(advalue<128*3) PORTD = 0b ; else if(advalue<128*4) PORTD = 0b ; else if(advalue<128*5) PORTD = 0b ; else if(advalue<128*6) PORTD = 0b ; else if(advalue<128*7) PORTD = 0b ; else
7 PORTD = 0b ; int BUTTON1() //Choose BUTTON1 for the first speed ChangeState = 1 //ChangeStates remember that the button was pressed scanf("%d", &BUTTON1); switch case BUTTON1: DisplayC(0x80"RUNNING:SPEED 100RPM");//Displays "RUNNING SPEED 100RPM in top left corner for(i=100,i,i--) // runs the centrifuge for 100 loop LoopTime(); clear_display(); //clears the display once complete DisplayC(0x80, "Completed!!"); //inform the user the cycle is completed
8 if(changstate == 1) // resets the ChangeState for next Button to be Pressed ChangeState = 0; resetlcd = 1; if(dispmode == 1) //If the final state is currently in use the counter is reset to 0 DispMode = 0; else DispMode = DispMode++; break; int BUTTON2() //Choose BUTTON2 for the first speed ChangeState = 1 //ChangeStates remember that the button was pressed scanf("%d", &BUTTON2);
9 switch case BUTTON2: DisplayC(0x80"RUNNING:SPEED 200RPM");//Displays "RUNNING SPEED 200RPM in top left corner for(i=200,i,i--) // runs the centrifuge for 200 loop LoopTime(); clear_display(); //clears the display once complete DisplayC(0x80, "Completed!!"); //inform the user the cycle is completed if(changstate == 1) // resets the ChangeState for next Button to be Pressed ChangeState = 0; resetlcd = 1; if(dispmode == 1) //If the final state is currently in use the counter is reset to 0 DispMode = 0; else
10 DispMode = DispMode++; break; int BUTTON3() //Choose BUTTON3 for the first speed ChangeState = 1 //ChangeStates remember that the button was pressed scanf("%d", &BUTTON3); switch case BUTTON3: DisplayC(0x80"RUNNING:SPEED 300RPM");//Displays "RUNNING SPEED 300RPM" in top left corner for(i=300,i,i--) // runs the centrifuge for 300 loop LoopTime(); clear_display(); //clears the display once complete DisplayC(0x80, "Completed!!"); //inform the user the cycle is completed
11 if(changstate == 1) // resets the ChangeState for next Button to be Pressed ChangeState = 0; resetlcd = 1; if(dispmode == 1) //If the final state is currently in use the counter is reset to 0 DispMode = 0; else DispMode = DispMode++; break; int BUTTON4() //Choose BUTTON4 for the first speed ChangeState = 1 //ChangeStates remember that the button was pressed
12 scanf("%d", &BUTTON4); switch case BUTTON4: DisplayC(0x80"RUNNING:SPEED 500RPM");//Displays "RUNNING SPEED 500RPM" in top left corner for(i=500,i,i--) // runs the centrifuge for 500 loop LoopTime(); clear_display(); //clears the display once complete DisplayC(0x80, "COMPLETED!!"); //display "COMPLETED" and inform the user the cycle is completed if(changstate == 1) // resets the ChangeState for next Button to be Pressed ChangeState = 0; resetlcd = 1; if(dispmode == 1) //If the final state is currently in use the counter is reset to 0 DispMode = 0;
13 else DispMode = DispMode++; break; default: corner DisplayC(0X80"NUMBER EXCEEDS ERROR")//Displays"NUMBER EXCEEDS ERROR" in top left break; int main(void) //This is the main body of the program //All functions of the program start here and are called either by the endless FOR loop or a subsidiary. for(;;) Initial(); //This function initializes necessary registers TEMPURATURE(); //Calls a function to check the TEMPURATURE BUTTON1(); //Calls a function of BUTTON1
14 BUTTON2(); //Calls a function of BUTTON2 BUTTON3(); //Calls a function of BUTTON3 BUTTON4(); //Calls a function of BUTTON4 BUTTON5(); //Calls a function of BUTTON5 if(!dispmode) //If the Enter Button was in State 0 the functions //LCD and Blink will be called LCD(); Blink(); else //If the Enter Button was not in State 0 the LCD //ADConvert and ShowAD functions will be called LCD(); ADConvert(); ShowAD();
Team 8: Robert Blake Craig Goliber Alanna Ocampo
Team 8: Robert Blake Craig Goliber Alanna Ocampo Objective of the design CAD Presentation Microcontroller Implementation PCB Design Design Limitations Conclusion Problem: Design a centrifuge which was
More informationBME 4900 Page 1 of 2. Meeting 2: Personal Progress Report 12/2/09 Team 12 with Drew Seils. Semester One Week Two
BME 4900 Page 1 of 2 Semester One Week Two These past two saw a lot of progress with the Revo stationary bike project. During Thanksgiving break Shane spent most of his time doing research for the power
More informationSpeed Control of a DC Motor using Digital Control
Speed Control of a DC Motor using Digital Control The scope of this project is threefold. The first part of the project is to control an LCD display and use it as part of a digital tachometer. Secondly,
More informationTimer0..Timer3. Interrupt Description Input Conditions Enable Flag
Timer0..Timer3 Timers are pretty useful: likewise, Microchip provides four different timers for you to use. Like all interrupts, you have to Enable the interrupt, Set the conditions of the interrupt, and
More informationTimer2 Interrupts. NDSU Timer2 Interrupts September 20, Background:
Background: Timer2 Interrupts The execution time for routines sometimes needs to be set. This chapter loops at several ways to set the sampling rate. Example: Write a routine which increments an 8-bit
More informationUniversity of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory
University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory 0907334 6 Experiment 6:Timers Objectives To become familiar with hardware timing
More informationLCD. Configuration and Programming
LCD Configuration and Programming Interfacing and Programming with Input/Output Device: LCD LCD (liquid crystal display) is specifically manufactured to be used with microcontrollers, which means that
More informationInterrupts on PIC18F252 Part 2. Interrupts Programming in C Language
Interrupts on PIC18F252 Part 2 Interrupts Programming in C Language Programming interrupts in C language using XC8 compiler is significantly simplified compared to C18 compiler. This note explains the
More informationAnalog Output with a Digital to Analog Converter
Analog Output with a Digital to Analog Converter Matthew Beckler beck0778@umn.edu EE2361 Lab 007 April 5, 2006 Abstract Without help, microcontrollers can have great trouble creating analog signals. Approximations
More informationBinary Outputs and Timing
Binary Outputs and Timing Each of the I/O pins on a PIC can be inputs or ourputs As an input, the pin is high impedance (meaning it is passive and draws very little current). If you apply 0V to that pin,
More informationECE Homework #10
Timer 0/1/2/3 ECE 376 - Homework #10 Timer 0/1/2/3, INT Interrupts. Due Wednesday, November 14th, 2018 1) Write a program which uses INT and Timer 0/1/2/3 interrupts to play the cord C#major for 1.000
More informationFlow Charts and Assembler Programs
Flow Charts and Assembler Programs Flow Charts: A flow chart is a graphical way to display how a program works (i.e. the algorithm). The purpose of a flow chart is to make the program easier to understand.
More informationInterrupts on PIC18F252 Part 2
Interrupts on PIC18F252 Part 2 Following pages list Special Function Registers (SFRs) involved in interrupt configuration and operation on PIC18F252 microcontroller. (Copied from Microchip s PIC18Fxx2
More informationTimer1 Capture Mode:
Timer1 Capture Mode: Interrupt Description Input Conditions Enable Flag Timer 1 Trigger after N events N = 1.. 2 19 100ns to 0.52 sec RC0 TMR1CS = 1 TMR1IF Timer 1 Capture Mode 1 Timer 1 Capture Mode 2
More informationEmbedded System Design
ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ Embedded System Design : Microcontroller 1. Introduction to PIC microcontroller 2. PIC16F84 3. PIC16F877
More informationMore Fun with Timer Interrupts
More Fun with Timer Interrupts Chords Objective: Play a musical chord each time you press a button: Button RC0 RC1 RC2 Timer Timer0 Timer1 Timer3 RB0 A3 C4 E4 RB1 B3 D4 F4 RB2 C4 E4 G4 Calculations: Assume
More informationDept. of Computer Engineering Final Exam, First Semester: 2016/2017
Philadelphia University Faculty of Engineering Course Title: Embedded Systems (630414) Instructor: Eng. Anis Nazer Dept. of Computer Engineering Final Exam, First Semester: 2016/2017 Student Name: Student
More informationUNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017
TW30 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017 MICROPROCESSOR BASED SYSTEMS MODULE NO: EEM7016 Date: Wednesday 17 May
More informationQ1 Q2 Q3 Q4 Q5 Q6 Total /7.5 /5 /10 /5 /7.5 /5 /40
Course name: Practical App. CS II Exam number: Final model answer Course Code: CSC20X Exam Date: 03/06/2014 Lecturer: Dr. Ahmed ElShafee Time Allowed: 120 minutes Q1 Q2 Q3 Q4 Q5 Q6 Total /7.5 /5 /10 /5
More informationHuman Response Timer
Human Response Timer Matthew Beckler beck0778@umn.edu EE2361 Lab Section 007 March 29, 2006 Abstract In this lab, we create a very useful application, a human response timer. The user s reaction time is
More informationAN587. Interfacing to an LCD Module. Interfacing to an LCD Module INTRODUCTION OPERATION CONTROL SIGNAL FUNCTIONS TABLE 2: CONDITIONAL ASSEMBLY FLAGS
Interfacing to an LCD Module AN587 INTRODUCTION TABLE 1: CONTROL SIGNAL FUNCTIONS This application note interfaces a PIC16CXX device to the Hitachi LM02L LCD character display module. This module is a
More informationEmbedded Systems Programming and Architectures
Embedded Systems Programming and Architectures Lecture No 10 : Data acquisition and data transfer Dr John Kalomiros Assis. Professor Department of Post Graduate studies in Communications and Informatics
More informationNH-67, TRICHY MAIN ROAD, PULIYUR, C.F , KARUR DT. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING COURSE MATERIAL
NH-67, TRICHY MAIN ROAD, PULIYUR, C.F. 639 114, KARUR DT. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING COURSE MATERIAL Subject Name : Embedded System Class/Sem : BE (ECE) / VII Subject Code
More informationLecture (09) PIC16F84A LCD interface LCD. Dr. Ahmed M. ElShafee
Lecture (09) PIC16F84A LCD interface PIC16F84A LCD interface Assignment 01, 4 Zones fire controller board Assignment 02, automatic water tank controller Dr. Ahmed M. ElShafee ١ ٢ LCD LCD (Liquid Crystal
More informationLecture (04) PIC 16F84A programming I
Lecture (04) PIC 16F84A programming I Dr. Ahmed M. ElShafee ١ Agenda Introduction to PIC16F84A programming using C language Preprocessors and, Compiler directives Constants Variables and data types Pointers
More informationUNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017
TW34 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017 INTERMEDIATE EMBEDDED SYSTEMS MODULE NO: EEE5004 Date: Thursday 12 January
More informationunsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE;
/*********************************************************************************************/ /* BME 361 Biomeasurement Lab - PIC18F4525BT Demo */ /* Laboratories 1-8: A/D, D/A, LCD display, ECG simulation,
More informationMicrocontroller Overview
Microcontroller Overview Microprocessors/Microcontrollers/DSP Microcontroller components Bus Memory CPU Peripherals Programming Microcontrollers vs. µproc. and DSP Microprocessors High-speed information
More informationLCDs. Embedded Systems Interfacing. 20 September 2011
20 September 2011 How Polarizers Work How work How Color Work Other Technologies Reflective Nematic (no back light) Cholesteric Liquid Crystal Organic LED/Polymer LED Vacuum Florescent Display Display
More informationEE6008-Microcontroller Based System Design Department Of EEE/ DCE
UNIT- II INTERRUPTS AND TIMERS PART A 1. What are the interrupts available in PIC? (Jan 14) Interrupt Source Enabled by Completion Status External interrupt from INT INTE = 1 INTF = 1 TMR0 interrupt T0IE
More informationEE 361L Digital Systems and Computer Design Laboratory
EE 361L Digital Systems and Computer Design Laboratory University of Hawaii Department of Electrical Engineering by Galen Sasaki and Ashok Balusubramaniam Quick Overview of PIC16F8X Version 1.0 Date: 9/4/01
More informationInput/Output Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning Basic I/O Concepts Peripherals such as LEDs and keypads are essential
More informationNOTICE: 1, the timing for Start, Stop, ACK, NACK, write and read is same as I2C
DPS01 USER GUIDE DPS01 is a module which integrated digital atmospheric pressure altitude Temperature Compass weather forecast. No external components required It is a complete sensing system with on-chip
More informationAccurate Time and Interrupts
Accurate Time and Interrupts Matthew Beckler beck0778@umn.edu EE2361 Lab Section 007 March 7, 2006 Abstract In this lab, we create a very accurate digital clock using one of the microcontroller s timers.
More informationunsigned char ReadADC() { /************* start A/D, read from an A/D channel *****************/ unsigned char ADC_VALUE;
/*********************************************************************************************/ /* BME 361 Biomeasurement Lab - PIC18F4525BT Demo */ /* Laboratories 1-8: A/D, D/A, LCD display, ECG simulation,
More informationLaboratory 10. Programming a PIC Microcontroller - Part II
Laboratory 10 Programming a PIC Microcontroller - Part II Required Components: 1 PIC16F88 18P-DIP microcontroller 1 0.1 F capacitor 3 SPST microswitches or NO buttons 4 1k resistors 1 MAN 6910 or LTD-482EC
More informationChapter 11: Interrupt On Change
Chapter 11: Interrupt On Change The last two chapters included examples that used the external interrupt on Port C, pin 1 to determine when a button had been pressed. This approach works very well on most
More informationELCT 912: Advanced Embedded Systems
ELCT 912: Advanced Embedded Systems Lecture 10: Applications for Programming PIC18 in C Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering Programming the PIC18 to transfer
More informationInterrupts. Embedded Systems Interfacing. 08 September 2011
08 September 2011 An iterrupt is an internal or external event that forces a hardware call to a specified function called an interrupt service routine Interrupt enable must be set (initialization) The
More informationChapter 13. PIC Family Microcontroller
Chapter 13 PIC Family Microcontroller Lesson 06 Special Function Registers for Control and status registers for the peripherals, input/output and Interrupt SFRs SFRs at the addresses of internal RAM/register
More informationUsing Timers of Microchip PIC18F Microcontrollers
Using Timers of Microchip PIC18F Microcontrollers ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.A.P.
More informationHardware Interfacing. EE25M Introduction to microprocessors. Part V. 15 Interfacing methods. original author: Feisal Mohammed
EE25M Introduction to microprocessors original author: Feisal Mohammed updated: 18th February 2002 CLR Part V Hardware Interfacing There are several features of computers/microcontrollers which have not
More informationCapture Mode of Pic18F252
Capture Mode of Pic18F252 PIC18F253 has two Capture/Compare/Pulse Width Modulation modules. Some devices such as ADCs, Sensors (position, velocity, accelearstion, temperature [MAX6577 converts the ambient
More informationLecture (03) PIC16F84 (2)
Lecture (03) PIC16F84 (2) By: Dr. Ahmed ElShafee ١ PIC16F84 has a RISC architecture, or Harvard architecture in another word ٢ PIC16F84 belongs to a class of 8 bit microcontrollers of RISC architecture.
More informationRemote Controlled KitchenAid Mixer for the Clients at ADEC. Appendices. Arnaud Bacye Karina Dubé Justin Erman Matthew Martin
Mix Masters Remote Controlled KitchenAid Mixer for the Clients at ADEC Appendices Arnaud Bacye Karina Dubé Justin Erman Matthew Martin Table of Contents A Hardware Schematics and Boards 2 A.1 Current Schematics
More informationOutlines. PIC Programming in C and Assembly. Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University
PIC ming in C and Assembly Outlines Microprocessor vs. MicroController PIC in depth PIC ming Assembly ming Krerk Piromsopa, Ph.D. Department of Computer Engineering Chulalongkorn University Embedded C
More informationSection 13. Timer0 HIGHLIGHTS. Timer0. This section of the manual contains the following major topics:
Section 13. Timer0 HIGHLIGHTS This section of the manual contains the following major topics: 13.1 Introduction... 13-2 13.2 Control Register... 13-3 13.3 Operation... 13-4 13.4 Timer0 Interrupt... 13-5
More informationExample of Asyncronous Serial Comms on a PIC16F877
/***************************************************************************************/ /* Example of Asyncronous Serial Comms on a PIC16F877 */ /* Target: PIC16F877 */ /* Baud: 9600 */ /* Bits: 8 */
More informationEET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing
EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing Objectives Explain serial communication protocol Describe data transfer rate and bps rate Describe the main registers used by serial communication
More informationUNCA CSCI 255 Exam 3 Fall 2011
UNCA CSCI 255 Exam 3 Fall 2011 This is a closed book and closed notes exam. Laptops, cell phones, and any other electronic storage or communication devices may not be used during this exam. Name: KEY If
More informationSquareWear Programming Reference 1.0 Oct 10, 2012
Content: 1. Overview 2. Basic Data Types 3. Pin Functions 4. main() and initsquarewear() 5. Digital Input/Output 6. Analog Input/PWM Output 7. Timing, Delay, Reset, and Sleep 8. USB Serial Functions 9.
More informationInterrupt vectors for the 68HC912B32. The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF.
Interrupts The Real Time Interrupt Interrupt vectors for the 68HC912B32 The interrupt vectors for the MC9S12DP256 are located in memory from 0xFF80 to 0xFFFF. These vectors are programmed into Flash EEPROM
More informationThe MCU s Pulse. Internal clock or oscillator to synchronize operation. One clock cycle = 1 TOSC = 1/fOSC. t TOSC
The MCU s Pulse Internal clock or oscillator to synchronize operation V 0 t TOSC One clock cycle = 1 TOSC = 1/fOSC Clock Cycle The minimum time to perform any operation is one instruction cycle TCY 1 TCY
More informationEXPERIMENT NO. 01 CALCULATOR USING PIC16F877
EXPERIMENT NO. 01 CALCULATOR USING PIC16F877 DOP: DOS: Project Members: 1) Prasad Pawaskar 58 2) Vishal Thakur 72 Page No.- 1 AIM: To implement basic calculator functionality using PIC microcontroller
More informationHong Kong Institute of Vocational Education Digital Electronics & Microcontroller. 8. Microcontroller
8. Microcontroller Textbook Programming Robot Controllers, Myke Predko, McGraw Hill. Reference PIC Robotics: A Beginner's Guide to Robotics Projects Using the PIC Micro, John Iovine, McGraw Hill. Embedded
More information1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet Example Application...
Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 19, 2011 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F684A processor,
More informationCREATING FIRST PROJECT in mikropascal PRO for PIC32
CREATING FIRST PROJECT in mikropascal PRO for PIC32 Project mikropascal PRO for PIC32 organizes applications into projects consisting of a single project file (file with the.mpp32 extension) and one or
More informationTel: Fax:
/****************************************************************************** Title: RFM22 transmitter demo program Current version: V1.2 Function: Package send Demo Processor PIC16F690 DIP-20 Clock:
More informationME 6405 Introduction to Mechatronics
ME 6405 Introduction to Mechatronics Fall 2006 Instructor: Professor Charles Ume Microchip PIC Manufacturer Information: Company: Website: http://www.microchip.com Reasons for success: Became the hobbyist's
More informationLab Report for Sensor Calibration using a PIC16F84 GROUP MEMBERS ALFRED MAZHINDU SIMBARASHE CHIWESHE
CY-0205M Sensor and Actuators Lab Report for Sensor Calibration using a PIC16F84 GROUP MEMBERS ALFRED MAZHINDU - 09022270 SIMBARASHE CHIWESHE - 09016352 Alfred Mazhindu & Simbarashe Chiweshe Page 1 CONTENTS
More informationPIC Discussion By Eng. Tamar Jomaa
PIC Discussion By Eng. Tamar Jomaa 1 Write assembly language instructions to clear the general purpose registers of PIC16F84A microcontroller (don t write the whole program) 2 Islamic university Electrical
More informationLaboratory Exercise 5 - Analog to Digital Conversion
Laboratory Exercise 5 - Analog to Digital Conversion The purpose of this lab is to control the blinking speed of an LED through the Analog to Digital Conversion (ADC) module on PIC16 by varying the input
More informationEmbedded systems. Exercise session 3. Microcontroller Programming Lab Preparation
Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the
More informationAppendix A: Rack Specification Sheet
Appendices Appendix A: Rack Specification Sheet A-1 Appendix B: Pinion Specification Sheet B-1 Appendix C: Specification Sheets for Motors One and Two Motor One Specification Sheet C-1 C-2 Motor Two Specification
More informationDigital and Analogue Project Report
EITF 040 Digital and Analogue Project Report Group 6 Fida Saidani Qinghua Liu March, 2013 1 Abstract The aim of this project is to build an electronic device that makes use of the law of light reflection,
More informationIntroduction. Embedded system functionality aspects. Processing. Storage. Communication. Transformation of data Implemented using processors
Input/Output 1 Introduction Embedded system functionality aspects Processing Transformation of data Implemented using processors Storage Retention of data Implemented using memory Communication Transfer
More informationwhich means that writing to a port implies that the port pins are first read, then this value is modified and then written to the port data latch.
Introduction to microprocessors Feisal Mohammed 3rd January 2001 Additional features 1 Input/Output Ports One of the features that differentiates a microcontroller from a microprocessor is the presence
More information5. You project should be equipped with indicator (led) indicating the operating status (as possible)
Example 01: automatic water tank controller 1. Search for suitable sensors that can detect water level inside a 1000L water tank. At least we need to detect two levels one for full tank alarm,and another
More informationSimon. Final Project Report December 11, 2009 E155. Julia Karl and Kirsten McAfee
Simon FinalProjectReport December11,2009 E155 JuliaKarlandKirstenMcAfee Abstract: SimonisagameforchildristributedbyMiltonBradley.Toplaythegame Simon,theplayerwatchesthebuttonslightupandthenrepeatsthesamepattern
More informationInverted Pendulum Microprocessor and FPGA Manual Sheldon Logan July 3, 2006
Inverted Pendulum Microprocessor and FPGA Manual Sheldon Logan July 3, 2006 1 1 Table of Contents 1 Table of Contents... 2 2 Table of Figures... 3 3 Introduction... 4 4 PIC Programming Instructions...
More informationMCU: Interrupts and Timers. Ganesh Pitchiah
MCU: Interrupts and Timers Ganesh Pitchiah What s an MCU? Frequency = 8 MHz Time Period = 1/f = 0.125 us Code for Switching LED int a; voltage while(1) { a = PINA.0; input) If (a==1) PORTA.1=1; else PORTA.1=0;
More informationEmbedded Systems Design (630470) Lecture 4. Memory Organization. Prof. Kasim M. Al-Aubidy Computer Eng. Dept.
Embedded Systems Design (630470) Lecture 4 Memory Organization Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Memory Organization: PIC16F84 has two separate memory blocks, for data and for program. EEPROM
More informationExperiment 9: Using HI-TECH C Compiler in MPLAB
University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory 0907334 9 Experiment 9: Using HI-TECH C Compiler in MPLAB Objectives The main objectives
More informationEEE394 Microprocessor and Microcontroller Laboratory Lab #6
Exp. No #6 Date: INTERRUPTS AND ADC IN PIC MICROCONTROLLER OBJECTIVE The purpose of the experiment is to configure external interrupt and the ADC in PIC microcontrollers. (i) To flip the LED connected
More informationEmbedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw
Embedded Systems Module. 6EJ505 C Tutorial 3: using the ICD3 rev. 27.9.16 tjw Images are reproduced from Reference 1. Microchip permits the use of its images for educational purposes. Main Learning Points
More informationCHAPTER 1 - World of microcontrollers
CHAPTER 1 - World of microcontrollers One Time Programmable ROM (OTP ROM) One time programmable ROM enables you to download a program into it, but, as its name states, one time only. If an error is detected
More informationBME 361 Biomeasurement Laboratory Demonstration Biomedical Engineering Program University of Rhode Island June 10, 2015
BME 361 Biomeasurement Laboratory Demonstration Biomedical Engineering Program University of Rhode Island June 10, 2015 The functional units on this demonstration bread board include a PIC18F4525 processor,
More informationThe modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca.
LCD Modules A common output display device used with low cost embedded systems is a character LCD display. The displays are available as complete modules with a standard microprocessor parallel interface.
More informationUNIVERSITY OF BOLTON SCHOOL OF ENGINEERING B.ENG (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATION SEMESTER /2016
UNIVERSITY OF BOLTON TW59 SCHOOL OF ENGINEERING B.ENG (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATION SEMESTER 1-2015/2016 INTERMEDIATE EMBEDDED SYSTEMS MODULE NO: EEE5004 Date: Thursday 14 January
More informationThe University of Texas at Arlington Lecture 21_Review
The University of Texas at Arlington Lecture 21_Review CSE 5442/3442 Agenda Tuesday December 1st Hand back Homework 7,8 and 9. Go over questions and answers Exam 3 Review Note: There will be a take home
More information1 Introduction to Computers and Computer Terminology Programs Memory Processor Data Sheet... 4
Overview of the PIC 16F648A Processor: Part 1 EE 361L Lab 2.1 Last update: August 1, 2016 Abstract: This report is the first of a three part series that discusses the features of the PIC 16F648A processor,
More informationBasic Embedded Software C Review Using MPLAB SIM. Loops. Embedded Systems Interfacing. 25 August 2011
25 August 2011 Basic Embedded Software Structure No Operating System to Return to Could Let Program Execute and Reset, But That s Not Efficient Main Function Initialization Code Endless Loop The while
More informationMPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine
MPLAB SIM MPLAB IDE Software Simulation Engine 2004 Microchip Technology Incorporated MPLAB SIM Software Simulation Engine Slide 1 Welcome to this web seminar on MPLAB SIM, the software simulator that
More informationC and Embedded Systems. So Why Learn Assembly Language? C Compilation. PICC Lite C Compiler. PICC Lite C Optimization Results (Lab #13)
C and Embedded Systems A µp-based system used in a device (i.e, a car engine) performing control and monitoring functions is referred to as an embedded system. The embedded system is invisible to the user
More informationdspic Interrupts The Interrupt Control and Staus Registers are :- ENG721-S2 Mixed Signal Processing : Hassan Parchizadeh Page 1
dspic Interrupts The dspic30f4012 has 30 interrupt sources which 3 are external interrupts and 4 processor exception traps. There are 8 user selectable priority levels for each interrupt source. These
More informationSuper Awesome Multitasking Microcontroller Interface for Electromechanical Systems (S.A.M.M.I.E.S.) Pinball Table
Super Awesome Multitasking Microcontroller Interface for Electromechanical Systems (S.A.M.M.I.E.S.) Pinball Table Group 13 April 29 th, 2008 Faculty Advisor: Professor Haibo He Group Members: William McGuire
More informationC:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c
C:\Users\cunningh\StaysOnPC\ME430 Downloads & Projects\exam2_problem1\problem1Cunningham.c / FileName: problem1cunningham.c Processor: PIC18F4520 Compiler: MPLAB C18 v.3.06 This file does the following...
More informationContents. PIC Mini Data Sheets
Contents PIC16C5x... 5 PIC16C5x Pin-Outs... 5 PIC16C5x Microcontrollers... 6 Peripheral Features... 6 Internal Architecture... 9 PIC16C5x Registers... 9 PIC16C64... 18 PIC16C64 Pin-Out...18 New and Modified
More informationThe University of Texas at Arlington Lecture 5
The University of Texas at Arlington Lecture 5 CSE 3442/5442 LCD Discussed in Chapter 12 RS, R/W, E Signals Are Used to Send/Receive Data on D0-D7 2 PIC PROGRAMMING IN C CHAPTER 7 Chapter 7 discusses the
More informationBy the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab
By the end of Class Pseudo-code for Lab 1-2 due as part of prelab Homework #5 on website due before next class Outline Introduce Lab 1-2 Counting Timers on C8051 Interrupts Laboratory Worksheet #05 Copy
More information/* PROGRAM FOR BLINKING LEDs CONEECTED TO PORT-D */
/* PROGRAM FOR BLINKING LEDs CONEECTED TO PORT-D */ CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _HS_OSC & _WRT_OFF & _LVP_OFF & _CPD_OFF ;***** VARIABLE DEFINITIONS COUNT_L EQU 0x01 ;**********************************************************************
More informationECE Homework #3
ECE 376 - Homework #3 Flow Charts, Binary Inputs, Binary Outputs (LEDs). Due Monday, January 29th The temperature sensor in your lab kits has the temperature-resistance relationship of R = 1000 exp 3965
More informationUNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Lab Test III
Department of Electrical and Computing Engineering UNIVERSITY OF CONNECTICUT ECE 3411 Microprocessor Application Lab: Fall 2015 Lab Test III There are 2 longer programming problems in this test. There
More informationLaboratory Exercise 7 - Extended I/O & Parallel Processing
Laboratory Exercise 7 - Extended I/O & Parallel Processing The purpose of this lab is to make an LED blink first by using the extended I/O function of the Microcontroller, and then by parallel processing
More informationmovwf prevcod ; a new button is pressed - rcnt=3 movwf (mtx_buffer+1) movlw 3 movwf rcnt
movlw 0x20 #endif call scan movlw 0xfd tris PORTB ; select colb (RB1) #ifdef MODE_CH8 movlw 0x04 #endif #ifdef MODE_CH4 movlw 0x30 #endif call scan movf cod, W bz loop2 ; if no buton is pressed, skip subwf
More informationEmbedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester
Embedded Systems PIC16F84A Internal Architecture Eng. Anis Nazer First Semester 2017-2018 Review Computer system basic components? CPU? Memory? I/O? buses? Instruction? Program? Instruction set? CISC,
More informationDRPIC166X IP Core. High Performance 8-bit RISC Microcontroller v. 2.17
2017 DRPIC166X IP Core High Performance 8-bit RISC Microcontroller v. 2.17 C O M P A N Y O V E R V I E W Digital Core Design is a leading IP Core provider and a System-on-Chip design house. The company
More informationIntroduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.
Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project
More information8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers
8051 Peripherals On-Chip Memory Timers Serial Port Interrupts Computer Engineering 2 2-1 8051 Timers 8051 Timers The 8051 has 2 internal 16-bit timers named Timer 0 and Timer 1 Each timer is a 16-bit counter
More informationUNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Lab Test III
Department of Electrical and Computing Engineering UNIVERSITY OF CONNECTICUT ECE 3411 Microprocessor Application Lab: Fall 2015 Lab Test III There are 2 longer programming problems in this test. There
More information