PIC Discussion By: Eng. Tamar Jomaa.

Slides:



Advertisements
Similar presentations
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Advertisements

UBI >> Contents Chapter 7 Timers Laboratories MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
C Examples 1.
 2 Minute Demo – 2.5 Mins  Something About me – 1 Min  Customers & Products – 1 Min  How to start on open source design – 5 Mins  Few case studies.
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
EET 2261 Unit 8 Seven-Segment Displays; S19 Records; System Clocks
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
Using PDG with e2studio: Example
Microcontroller Architecture— PIC18F Family
Microcontrollers: Teaching and Simulators Teufik Tokić, Ivan Milentijević Faculty of Electonic Engineering, Niš.
ECE 265 – LECTURE 17 Simulator Project 8/7/ ECE265.
Block Diagram of 4518 Dual BCD Counter The 4518 Dual BCD Counter has two BCD counters. Each counter is similar to the other. Each counter has a master.
Statement of Purpose: To program an incremental counter using the PSoC Designer 5.0, Imagecraft, the programming language C, the PSoCEval USB CY3214 circuit.
Presentation Timer Select a time to count down from the clock above 60 min 45 min 30 min 20 min 15 min 10 min 5 min or less.
Presentation Timer Select a time to count down from the clock above 60 min 45 min 30 min 20 min 15 min 10 min 5 min or less.
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
ENEE 440 Chapter Timer 8254 Register Select The 8254 timer is actually 3 timers in one. It is an upgraded version of the 8253 timer which was.
8253 TIMER. Engr 4862 Microprocessors 8253 / 8254 Timer A.k.a. PIT (programmable Interval Timer), used to bring down the frequency to the desired level.
System Clocks.
ECE 101 An Introduction to Information Technology Digital Logic.
Input/Output Ports and Interfacing
بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems.
A Few Words From Dilbert
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
ELEC4601 Microprocessor systems Lab 3 Tutorial
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
11/10/2015 Iphone APP for VIPA PLC‘s Using the application mobile automation monitor, "mobileAM" available in the iPhone App Store, you can access VIPA.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
PIT Programming Examples Working with the modes of PIT.
8279 KEYBOARD AND DISPLAY INTERFACING
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
University of Tehran 1 Microprocessor System Design Timers Omid Fatemi
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
EEE527 Embedded Systems Lecture 2: Chapter 2: C and Using more MPLAB (X) + XC32 Ian McCrumRoom 5B18, Tel: voice mail on 6 th ring
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Saxion University of Applied Sciences Advanced Microcontrollers A practical approach.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
Timers and Interrupts Mark Neil - Microprocessor Course.
Interrupts Microprocessor and Interfacing
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
8279 KEYBOARD AND DISPLAY INTERFACING
Motor Speed Josh Edwards. Description Circuit will calculate the RPMs of the motor using the NT3100 and output to a 7 segment display Motor will be driven.
July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon.
Embedded Systems Design 1 Lecture Set 8 MCS-51 Interrupts.
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Interrupts Microprocessor and Interfacing
Special Features. Device Configuration bits Revision Device Configuration bits Revision On-chip Power-on Reset (POR) Revision On-chip Power-on Reset (POR)
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
Microprocessors A practical approach..
Introduction to microprocessor (Continued) Unit 1 Lecture 2
Microprocessor Systems Design I
8254 – SOFTWARE PROGRAMMABLE TIMER
Programmable Interval Timer
Programmable Interval Timer
Microprocessors Timers
ATmega103 Timer0 and Interrupts
EMT 348: Microcontroller Timer/counter
Tim Sumner, Imperial College, Rm: 1009, x47552
PIC18 Timer Programming “Explain the assembly language programming for the timer and counter module”
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
Making) Melody timer.
Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the.
Timers Chapter 2.
Presentation transcript:

PIC Discussion By: Eng. Tamar Jomaa

C programming-part2 Outlines: 7-Segment EEPROM Timers Interrupt Lab#9:Application to Interrupt

7-Segment One press on RB0 automatic counter from 0 to 9 (increment by 1) One press on RB1 automatic counter from 0 to 9 (even numbers) One press on RB2 automatic counter from 0 to 9 (odd numbers) Example#1

7-Segment Solution: Example#1

Example#1 EEPROM Write 0x10 in address 0x5. In Micro C: EEPROM_write(address,data) EEPROM_read(address) Write 0x10 in address 0x5. Example#1

EEPROM Solution: Example#1

EEPROM Fill all EEPROM locations with 0x55. Example#2

EEPROM Write 0x07 in address 0x05, then read data from address 0x05 to portB . Example#3

EEPROM Program to take the data existed on PORT A and display it on PORT B: first, the data must be taken from PORT A and stored in the EEPROM address location 0X10, and then be taken again from EEPROM and be displayed on PORT B. Example#4

EEPROM Solution: Example#4

Timers PIC16f84A PIC16f877A

Timers

Timers Display the value of TMR0 in portB. Example#1

Example#1 Timers Solution: External clock source on RA4 PSA=1, so tmr0 will count 1:1

Example#1 Timers another Solution: External clock source on RA4 PSA=0, so tmr0 will count according to prescale 001≡ 1:4 increase by one ever 4 clocks.

Example#1 Timers another Solution: internal clock source as oscillator PSA=0, so tmr0 will count according to prescale 000≡ 1:2 increase by one ever 2 clocks.

Interrupt Connect 4 LEDs to bins (RA0,RA1,RA2 and RA3) of portA, and then toggle these LEDs using the interrupt on(RB4-RB7), so that RB4 controls RA0, RB5 controls RA1 and so on. Example#1

Interrupt Example#1

Interrupt Flasher on RA0 then use the interrupt method to control the flashing speed. Use interrupt on change RB. Example#2

Interrupt Example#2

Example#3 Interrupt If RB4 is pressed the counter will count F,E,D,….0 If RB4 is pressed the counter will count A,9,8,…..0 If RB6 is pressed the counter will count 5,4,3,…..0 The default counting from: 70 Example#3

Interrupt Example#3

Example#4 Interrupt PortB= value of TMR0 PSA=111  TMR0 increase by one every 256 push on RA4 If TMR0 goes from FF to 00 Interrupt occurs and RA0 toggle. Example#4

Interrupt Example#4

Application to Interrupt Lab#9: Application to Interrupt If the crier (muezzen) after doing the athan pushes the button related to that athan, two seven segments will decrease from (25,20,10 or 5 minutes) according to the pray time, and when they reach zero then the iqama time comes. LED will flashing indicating that the crier (muezzen) must do the iqama now. The buttons will be connected on bins (RB4, RB5, Rb6 and RB7) respectively, and will be accessed using interrupt method. Iqama project Iqama project

Application to Interrupt Lab#9: Application to Interrupt Iqama project

Application to Interrupt Lab#9: Application to Interrupt Iqama project

Application to Interrupt Lab#9: Application to Interrupt Modified Iqama project by adding another push button for the Fajer. When the program finish display 25 in the two 7segments as flasher. (5 marks) Iqama project

Application to Interrupt Lab#9: Application to Interrupt Do the modified Iqama project software and hardware. Attach the CD for the MicroC code and simulation and send to me hard copy report. Only 3 students in every group. Iqama project

Be free to ask any question. Eng. Tamar Jomaa 29/07/1438