SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
FACULTY OF ELECTRICAL AND ELECTRONIC
             ENGINEERING



 COMPUTER ADDED DESIGN LABORATORY



    LABORATORY INSTRUCTION SHEET



                         DAE32203 / DEK3133
 Subject Code and Name
                         MICROCONTROLLER

   Experiment Code       01

                         Introduction to MPLAB, PROTEUS and
    Experiment Title     MikroC

     Course Code         DET/DEE/DEX
Document
                                                   RPP-05              Page Number             1 of 18
                    Reference No.
                                                                       Edition                    1
                    Document Title       LABORATORY                      Revision No.             1
                                         PRACTICUM                      Effective Date        JULY 2010
                                                                       Amendment Date         JULY 2010


                                    MAKLUMAT MATAPELAJARAN

SUBJECT                                  : DAE32203 / DEK 3133 MICROCONTROLLER

TITLE                                     : LAB 1 – Introduction to MPLAB, Proteus and MicroC.

GOAL                                     : To expose student with MPLAB, Proteus and MicroC software


1. OBJECTIVES


At the end of this lab session, students will :

         (i) Understand the operation and the basic use of MPLAB, Micro C and Proteus.

         (ii) Use MPLAB and Micro C to write program and assembly language for PIC Microcontroller.

         (iii) Use MPLAB SIM and Proteus to simulate assembly and C language for PIC Microcontroller.



2. SINOPSYS


MPLAB and Micro C is a software package easy writing process and development of assembly and C
language program for PIC Microcontroller. In this lab, student will have the exposure on MPLAB and
Micro C software and learn how to manage project by using MPLAB starting and Micro C from assembly
and C language program until simulation by Proteus.




Disediakan Oleh:                                              Disahkan Oleh:

Tandatangan         :                                         Tandatangan       :

Nama                : Mohamad Bin Hj. Md. Som                 Nama              : Shamsul Bin Mohamad

Tarikh              : July-2010                               Tarikh            : July-2010
Document
                                                 RPP-05             Page Number            2 of 18
                    Reference No.
                                                                    Edition                   1
                    Document Title   LABORATORY                       Revision No.            1
                                     PRACTICUM                       Effective Date       JULY 2010
                                                                    Amendment Date        JULY 2010


 3. THEORY

A) MPLAB
MPLAB is comprehensive software that has editing, project management and design in it. It used in
development of embedded system application using microcontroller Microchip PICmicro and PIC.
Assembly language is a language that used for programming microcontroller. Before we programmed
these assembly language instructions into microcontroller memory, it has to convert to machine language
so that microcontroller easily understands. This conversion is done by software so called assembler in
MPLAB. This process is described in Figure 1.




                                                 Figure 1


In the MPLAB assembly language programming, numbers usually represent decimal, binary and
hexadecimal. For example, decimal number 240 is written by:
                       240           - decimal
                       0xF0          - hexadecimal
                       b’11110000’ - binary


Basic elements in assembly language are:
      Label
      Instruction
      Operand
      Comment
Document
                                                    RPP-05                Page Number               3 of 18
                      Reference No.
                                                                          Edition                     1
                      Document Title     LABORATORY                         Revision No.              1
                                         PRACTICUM                         Effective Date         JULY 2010
                                                                          Amendment Date          JULY 2010

B) PROTEUS
    ISIS provides the development environment for PROTEUS VSM, our revolutionary interactive system
level simulator. This software combines mixed mode circuit simulation, micro-processor models and
interactive component models to allow the simulation of complete micro-controller based designs.
ISIS provides the means to enter the design in the first place, the architecture for real time interactive
simulation and a system for managing the source and object code associated with each project. In addition,
a number of graph objects can be placed on the schematic to enable conventional time, frequency and
swept variable simulation to be performed.


Major features of PROTEUS VSM include:
·         True Mixed Mode simulation based on Berkeley SPICE3F5 with extensions for digital simulation
and
          true mixed mode operation.
·         Support for both interactive and graph based simulation.
·         CPU Models available for popular microcontrollers such as the PIC and 8051 series.
·         Interactive peripheral models include LED and LCD displays, a universal matrix keypad, an RS232
          terminal and a whole library of switches, pots, lamps, LEDs etc.


MikroC is a powerful, feature rich development tool for PICmicros. It is designed to provide the
programmer with the easiest possible solution for developing applications for embedded systems,
without compromising performance or control.



C) MikroC IDE

PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used in a wide variety
of applications, and C, prized for its efficiency, is the natural choice for developing embedded
systems. mikroC provides a successful match featuring highly advanced IDE, ANSI compliant
compiler, broad set of hardware libraries, comprehensive documentation, and plenty of ready-to-
run examples.

    Features :

    mikroC allows you to quickly develop and deploy complex applications:

      •    Write your C source code using the built-in Code Editor (Code and Parameter Assistants,
           Syntax Highlighting, Auto Correct, Code Templates, and more…)
      •    Use the included mikroC libraries to dramatically speed up the development: data
           acquisition, memory, displays, conversions, communications… Practically all P12, P16,
Document
                                                   RPP-05              Page Number             4 of 18
                        Reference No.
                                                                       Edition                   1
                        Document Title   LABORATORY                      Revision No.            1
                                         PRACTICUM                      Effective Date       JULY 2010
                                                                       Amendment Date        JULY 2010

           and P18 chips are supported.
      •    Monitor your program structure, variables, and functions in the Code Explorer.
      •    Generate commented, human-readable assembly, and standard HEX compatible with all
           programmers.
      •    Inspect program flow and debug executable logic with the integrated Debugger.




4.        EQUIPMENT LIST
          (1)     Personal Computer (PC)
          (2)     MPLAB Software
          (3)     Mikro C Software
          (4)     Proteus Software




5. PROCEDURE


5.1 WRITE ASSEMBLY CODE AND SIMULATE USING MPLAB.


(A)       Starting New Project

1.        Start MPLAB software. Click start > Microchip > MPLAB IDE
2.        MPLAB work area will appear; shows in Figure 1-1.




                                                  Figure 1-1


3.        To start a new project, click Project > new. New windows of New Project will appear; shows in
          Figure 1-2.
Document
                                                      RPP-05                   Page Number        5 of 18
                      Reference No.
                                                                               Edition               1
                      Document Title      LABORATORY                             Revision No.        1
                                          PRACTICUM                             Effective Date   JULY 2010
                                                                               Amendment Date    JULY 2010



4.      Fill in Project Name as Lab1 and Project directory with c:lab1 or use Browse to choose existence
        directory.




                                                    Figure 1-2


5.      To write PIC assembly language program, click File > New. New windows editing will appear.
6.      Write down the program 1.1 below and save it by name as lab1.asm
;**************************************************************************
PORTA         EQU 05h    ;This tells the assembler where the address of PORTA,
PORTB         EQU 06h    ;PORTB, STATUS and ADCON1
TRISA         EQU 85h    ;This Tell the assembler where the address of ports Direction of,
TRISB         EQU 86h    ;TRISA and TRISB.
STATUS        EQU 03h
ADCON1        EQU 9Fh    ;Address of Type of data whether Digital/Analog at PORTA
RP1           EQU 6      ;Bit 6 and 5 for bank selection in STATUS register.
RP0           EQU 5      ;To select bank 0, RP1 = 0 and RP0 = 0 {PORTA and PORTB}
                         ;To select bank 1, RP1 = 0 and RP0 = 1 {TRISA,TRISB & ADCON1}
                         ;To select bank 2, RP1 = 1 and RP0 = 0
                         ;To select bank 3, RP1 = 1 and RP0 = 1
;**************************************************************************
        ORG 00h          ;Assembler is now set to address 0 where the main
                         ;program is placed


;********************PIC SETUP********************************************
        BSF              STATUS,RP0 ;Select bank 1(To use TRISA,B and ADCON1)
        MOVLW            B'00000110'    ;Load literal value=6 into W register


        MOVWF            ADCON1         ;Move the literal value into ADCON1 register.
                                        ;Now PORTA is configured as digital input
        MOVLW            B'00000000'    ;0 is loaded into W register
        MOVWF            TRISB          ;Now all PORTB bits are set as OUTPUT
Document
                                                 RPP-05                  Page Number          6 of 18
                  Reference No.
                                                                         Edition                1
                  Document Title     LABORATORY                            Revision No.         1
                                     PRACTICUM                            Effective Date    JULY 2010
                                                                         Amendment Date     JULY 2010


      MOVLW           B'11111111'   ;move binary value 11111111 to register W
      MOVWF           TRISA         ;Now All PORTA bits are set as INPUT
;*******************START OF MAIN PROGRAM*************************
      BCF             STATUS,RP0        ;Back to bank 0;(To use PORTA and PORTB)
      CLRF            PORTB             ;Set PORTB output is 0
LOOP BTFSS            PORTA,4           ;Bit test PORTA bit 4, if SET skip next line
      GOTO            ON                ;Goto ON if button is pressed
OFF   BCF             PORTB,0           ;LED is OFF when button at PORTA is not pressed.
      GOTO            LOOP              ;Go back and test the button again
ON    BSF             PORTB,0           ;As PORTA input is 0, mean button is pressed so
                                        ;LED at PORTB bit 0 goes ON
      GOTO            LOOP              ;Go back to LOOP and test the button again
      END                               ;End of code.


7.    Insert file programming into this project by clicking right button Source File which shows in Figure
      1-3. Choose lab1.asm file that has written.




                                                Figure 1-3
Document
                                                   RPP-05               Page Number                7 of 18
                    Reference No.
                                                                        Edition                       1
                    Document Title     LABORATORY                         Revision No.                1
                                       PRACTICUM                         Effective Date           JULY 2010
                                                                        Amendment Date            JULY 2010



8.      To assemble the program, firstly we have to choose types of microcontroller by clicking Configure
        > Select Device, choose 16F877A.


9.    Select Configure > Configuration Bits and set as shown in a figure below.




10.     Click Project > Built All to assemble the program. If there is no error, then BUILD SUCCEEDED
        message will appear. If there is an error, then Error message and Location will appear.


(B)     Project Simulation


1.      To start Simulation, click Debugger > Select Tool > MPLAB SIM. Observe the changes at the
        MPLAB interface. List down the changes.


2.      Click View > Watch. Watch windows (Figure 1-4) will appear. First, from pull down menu, choose
        PORTA and click Add SFR button. Then choose PORTB and click Add SFR button again.




                                                 Figure 1-4
Document
                                              RPP-05              Page Number             8 of 18
                Reference No.
                                                                  Edition                   1
                Document Title     LABORATORY                       Revision No.            1
                                   PRACTICUM                       Effective Date       JULY 2010
                                                                  Amendment Date        JULY 2010




3.   Click Debugger > Animate. Observe Watch window and also Lab1.asm program window. Explain
     your observation.


4.   Click Debugger > Halt to stop the simulation process. Click Debugger > Reset > MCLR to reset the
     program.


5.   Click Debugger > Stimulus Controller > New Workbook >Asynch. A window in Figure 1-5 will
     appear. At Pin/SFR column, choose RA4 pin and at Action column choose Set Low. Observe any
     changes at Watch window after Animate button and Fire button is pressed. Observe any changes.




                                            Figure 1-5
Document
                                                    RPP-05                Page Number               9 of 18
                    Reference No.
                                                                          Edition                    1
                    Document Title      LABORATORY                          Revision No.             1
                                        PRACTICUM                          Effective Date        JULY 2010
                                                                          Amendment Date         JULY 2010



5.2 SIMULATION THE HEX FILE USING PROTEUS


1. Open Proteus by clicking START > ALL PROGRAM > PROTEUS 7 PROFESIONAL > ISIS 7
   PROFESIONAL .




                                       Figure 1-6




2. Proteus work area will appear; shows in Figure 1-7. Select button “ P” and follow the next instructions.




                                                Figure 1-7
Document
                                                 RPP-05               Page Number             10 of 18
                   Reference No.
                                                                      Edition                   1
                   Document Title     LABORATORY                        Revision No.            1
                                      PRACTICUM                        Effective Date       JULY 2010
                                                                      Amendment Date        JULY 2010

3. A window in Figure 1-8 will appear.




                                         Figure 1-8

4. Select instruction bellows and doudle click your left mouse to input components inside category
window as shown in figure 1-9.

                   a) MICROPROCESSORS > PIC16F877A
                   b) RESISTORS > 3 WATT1K
                   c) OPTOELECTRONICS > LED-BIBY
                   d) SWITCHES & RELAYS > BUTTON




                                          Figure 1-9
Document
                                                 RPP-05                Page Number             11 of 18
                   Reference No.
                                                                       Edition                    1
                   Document Title     LABORATORY                         Revision No.             1
                                      PRACTICUM                         Effective Date        JULY 2010
                                                                       Amendment Date         JULY 2010

5. Drag and drop components by clicking at “DEVICES” window to working window as shown at
   figure 1-10.




                                                Figure 1-10

6. Right click mouse and select properties for rotate the components to your suitable positions as shown at
   figure 1-11.




                                         Figure 1-11


7. Connect and wiring all components.

8. Click “Terminals Mode” button to input ‘POWER’ and ‘GROUND’ to your working space as shown at
   figure 1-12.




                                              Figure 1-12
Document
                                                 RPP-05               Page Number            12 of 18
                  Reference No.
                                                                      Edition                   1
                  Document Title     LABORATORY                         Revision No.            1
                                     PRACTICUM                         Effective Date       JULY 2010
                                                                      Amendment Date        JULY 2010



9. Arrange your components to suitable position and completed your work with the correct connections as
   figure 1-13.




                                                  Figure 1-12

10.    Save your project at different folder and named it Projek1_circuit as figure 1-14.




                                             Figure 1-13
Document
                                               RPP-05              Page Number             13 of 18
                 Reference No.
                                                                   Edition                    1
                 Document Title     LABORATORY                       Revision No.             1
                                    PRACTICUM                       Effective Date        JULY 2010
                                                                   Amendment Date         JULY 2010




                                              Figure 1-14

11. From your working space, double click your PIC16F877A and follow the instructions number inside
    figure 1-15. Setting your Edit Component window by following the step given. 1st setting frequency
    to 4 MHz, 2nd click at browse button and select the hex file from the project folder created by
    compiler (MPLAB or Micro C ) . 3rd click “OK”.




                                                 Figure 1-15
Document
                                                 RPP-05              Page Number          14 of 18
                  Reference No.
                                                                     Edition                1
                  Document Title      LABORATORY                       Revision No.         1
                                      PRACTICUM                       Effective Date    JULY 2010
                                                                     Amendment Date     JULY 2010



11. Click DEBUG > EXECUTE to simulate your program and click DEBUG > STOP ANIMATION to
    stop the program. From your window project, you can animate your program by clicking suitable
    button as shown in figure 1.16. Explain your observation.


                                              Figure 1-16

12. The complete circuit as shown as Figure 1-17.




                                               Figure 1-17
13. To see detail what happen to PORTA, PORTB and others register, go to Debug>watch window and
      add the register that you want to watch like a figure below.




                                               Figure 1-18
Document
                                             RPP-05               Page Number             15 of 18
                Reference No.
                                                                  Edition                    1
                Document Title   LABORATORY                         Revision No.             1
                                 PRACTICUM                         Effective Date        JULY 2010
                                                                  Amendment Date         JULY 2010



5.3 PROGRAMMING USING C LANGUAGE


  1. Open Mikro C compiler as shown in figure 1-18.




                                     Figure 1-18

  2. Create a new project



                                     • Project wizard dialog will appear – fill the dialog with
                                         appropriate settings for your project
                                     • Enter a name for your new project
                                     • Choose project path,
                                     • Enter short text which describes your project
                                         (this is optional)
                                     •   Choose the microcontroller from drop-down menu
                                     •   Set the device clock by entering the value in edit box
                                          (set to 4Mhz)
                                     •   Set configuration bits (device flags) by clicking default
                                     •   After you have set up your project, click OK to continue.
Document
                                             RPP-05                Page Number             16 of 18
              Reference No.
                                                                   Edition                    1
              Document Title      LABORATORY                         Revision No.             1
                                  PRACTICUM                         Effective Date        JULY 2010
                                                                   Amendment Date         JULY 2010




3. Write the code:

   ‐   Compiler will create the project file and an accompanying source file, named same as your
       project. This source file will be automatically opened in the code editor, so you can write the
       source code. Picture below is the code editor.
Document
                                            RPP-05               Page Number            17 of 18
              Reference No.
                                                                 Edition                   1
              Document Title     LABORATORY                        Revision No.            1
                                 PRACTICUM                        Effective Date       JULY 2010
                                                                 Amendment Date        JULY 2010



4. Type the source code below into the code editor:




5. Save the file by clicking on the save icon. To compile the source code select Project->Build from
   the drop-down menu, or click the Build Icon.

6. Compiler will generate output files in the project folder. There should be 4 new files:
   project1.asm, project1.lst, project1.mcl and project1.hex. The file name with *.hex file will be
   used to burn into PIC flash memory or can be load into simulation software (Proteus) to simulate
   the output.
Document
                                                   RPP-05     Page Number            18 of 18
                     Reference No.
                                                              Edition                   1
                     Document Title     LABORATORY              Revision No.            1
                                        PRACTICUM              Effective Date       JULY 2010
                                                              Amendment Date        JULY 2010



6.      REPORT PREPARATION AND SCHEMA.

(1)     2 persons for 1 report.


(2)     Due date to send report is 1 weeks after lab date.


(3)     Report schema following below requirements:
      • Lab report cover sheet for 1st page.
      • Objective, theory, equipments for the 2nd page. (5)                 ( 5 Mark )
      • Procedure lab sheet . (30)
              1. Program 1.1 by MPLAB.                                      ( 5 Mark )
              2. Proteus - Circuit diagram                                  ( 10 Mark )
              3. Program 1.2 by Micro C.                                        ( 5 Mark )
              4. Flow chart of Mikro C code.                                ( 10 Mark )


      • Observations. (35)
               1. Observations when using MPLAB software.                       ( 15 Mark )
               2. Observations when using Proteus software.                     ( 10 Mark )
               3. Observations when using Micro C software.                     ( 10 Mark )


      • Discussions. (20)
               1. Result by using MPLAB software                                ( 10 Mark )
               2. Result by using Proteus software                              ( 5 Mark )
               3. Result by using Micro C software                              ( 5 Mark )


      • Conclusions. (10)                                                        ( 10 Mark )

Más contenido relacionado

La actualidad más candente

IC 555 timer and its applications
IC 555 timer and its applications IC 555 timer and its applications
IC 555 timer and its applications Jay Baria
 
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...MaryJacob24
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing TechniquesA B Shinde
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architectureAhmad Sidik
 
Solutions manual for cmos digital integrated circuits analysis and design 4th...
Solutions manual for cmos digital integrated circuits analysis and design 4th...Solutions manual for cmos digital integrated circuits analysis and design 4th...
Solutions manual for cmos digital integrated circuits analysis and design 4th...Blitzer567
 
Alu design-project
Alu design-projectAlu design-project
Alu design-projectalphankg1
 
BUilt-In-Self-Test for VLSI Design
BUilt-In-Self-Test for VLSI DesignBUilt-In-Self-Test for VLSI Design
BUilt-In-Self-Test for VLSI DesignUsha Mehta
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETDIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETPraveen Kumar
 
MOS Devices and Modeling (1).pptx
MOS Devices and Modeling (1).pptxMOS Devices and Modeling (1).pptx
MOS Devices and Modeling (1).pptxmohan134666
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Aarav Soni
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE Dr.YNM
 
Voltage and current division rule
Voltage and current division ruleVoltage and current division rule
Voltage and current division ruleWaseemAbbas168
 

La actualidad más candente (20)

IC 555 timer and its applications
IC 555 timer and its applications IC 555 timer and its applications
IC 555 timer and its applications
 
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...
2 bit comparator, 4 1 Multiplexer, 1 4 Demultiplexer, Flip Flops and Register...
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
 
SPI Protocol in LPC2148
SPI  Protocol in LPC2148SPI  Protocol in LPC2148
SPI Protocol in LPC2148
 
VLSI lab report using Cadence tool
VLSI lab report using Cadence toolVLSI lab report using Cadence tool
VLSI lab report using Cadence tool
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing Techniques
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architecture
 
Solutions manual for cmos digital integrated circuits analysis and design 4th...
Solutions manual for cmos digital integrated circuits analysis and design 4th...Solutions manual for cmos digital integrated circuits analysis and design 4th...
Solutions manual for cmos digital integrated circuits analysis and design 4th...
 
Alu design-project
Alu design-projectAlu design-project
Alu design-project
 
Rc delay modelling in vlsi
Rc delay modelling in vlsiRc delay modelling in vlsi
Rc delay modelling in vlsi
 
BUilt-In-Self-Test for VLSI Design
BUilt-In-Self-Test for VLSI DesignBUilt-In-Self-Test for VLSI Design
BUilt-In-Self-Test for VLSI Design
 
Status register
Status registerStatus register
Status register
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETDIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFET
 
MOS Devices and Modeling (1).pptx
MOS Devices and Modeling (1).pptxMOS Devices and Modeling (1).pptx
MOS Devices and Modeling (1).pptx
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
Voltage and current division rule
Voltage and current division ruleVoltage and current division rule
Voltage and current division rule
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 

Destacado

Lab 2 microcontroller
Lab 2 microcontrollerLab 2 microcontroller
Lab 2 microcontrollermkazree
 
Lab 3 microcontroller
Lab 3 microcontrollerLab 3 microcontroller
Lab 3 microcontrollermkazree
 
Lab 4 microcontroller
Lab 4 microcontrollerLab 4 microcontroller
Lab 4 microcontrollermkazree
 
Lab 5 microcontroller
Lab 5 microcontrollerLab 5 microcontroller
Lab 5 microcontrollermkazree
 
Lab 6 microcontroller
Lab 6 microcontrollerLab 6 microcontroller
Lab 6 microcontrollermkazree
 
Tutorial chapter 2 robotic
Tutorial chapter 2 roboticTutorial chapter 2 robotic
Tutorial chapter 2 roboticmkazree
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copymkazree
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part AIkhwan_Fakrudin
 
Coal Fired Power Plant
Coal Fired Power PlantCoal Fired Power Plant
Coal Fired Power Plantmkazree
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
Embedded system (Chapter )
Embedded system (Chapter )Embedded system (Chapter )
Embedded system (Chapter )Ikhwan_Fakrudin
 
Projek rekabentuk1
Projek rekabentuk1Projek rekabentuk1
Projek rekabentuk1mkazree
 
Chapter 4 synchronous machine
Chapter 4 synchronous machineChapter 4 synchronous machine
Chapter 4 synchronous machinemkazree
 
Tutorial chapter 3 robotic
Tutorial chapter 3 roboticTutorial chapter 3 robotic
Tutorial chapter 3 roboticmkazree
 
Tutorial 2 amplitude modulation
Tutorial 2 amplitude  modulationTutorial 2 amplitude  modulation
Tutorial 2 amplitude modulationmkazree
 
120102011
120102011120102011
120102011mkazree
 
Chapter 5 fm receivers
Chapter 5  fm receiversChapter 5  fm receivers
Chapter 5 fm receiversmkazree
 
PIC microcontroller review
PIC microcontroller reviewPIC microcontroller review
PIC microcontroller reviewMohsen Sarakbi
 
Foster-seely and Ratio Detector (Discriminator )
Foster-seely and Ratio Detector (Discriminator )Foster-seely and Ratio Detector (Discriminator )
Foster-seely and Ratio Detector (Discriminator )mkazree
 
Pcb design using proteus
Pcb design using proteusPcb design using proteus
Pcb design using proteusMashood
 

Destacado (20)

Lab 2 microcontroller
Lab 2 microcontrollerLab 2 microcontroller
Lab 2 microcontroller
 
Lab 3 microcontroller
Lab 3 microcontrollerLab 3 microcontroller
Lab 3 microcontroller
 
Lab 4 microcontroller
Lab 4 microcontrollerLab 4 microcontroller
Lab 4 microcontroller
 
Lab 5 microcontroller
Lab 5 microcontrollerLab 5 microcontroller
Lab 5 microcontroller
 
Lab 6 microcontroller
Lab 6 microcontrollerLab 6 microcontroller
Lab 6 microcontroller
 
Tutorial chapter 2 robotic
Tutorial chapter 2 roboticTutorial chapter 2 robotic
Tutorial chapter 2 robotic
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part A
 
Coal Fired Power Plant
Coal Fired Power PlantCoal Fired Power Plant
Coal Fired Power Plant
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
Embedded system (Chapter )
Embedded system (Chapter )Embedded system (Chapter )
Embedded system (Chapter )
 
Projek rekabentuk1
Projek rekabentuk1Projek rekabentuk1
Projek rekabentuk1
 
Chapter 4 synchronous machine
Chapter 4 synchronous machineChapter 4 synchronous machine
Chapter 4 synchronous machine
 
Tutorial chapter 3 robotic
Tutorial chapter 3 roboticTutorial chapter 3 robotic
Tutorial chapter 3 robotic
 
Tutorial 2 amplitude modulation
Tutorial 2 amplitude  modulationTutorial 2 amplitude  modulation
Tutorial 2 amplitude modulation
 
120102011
120102011120102011
120102011
 
Chapter 5 fm receivers
Chapter 5  fm receiversChapter 5  fm receivers
Chapter 5 fm receivers
 
PIC microcontroller review
PIC microcontroller reviewPIC microcontroller review
PIC microcontroller review
 
Foster-seely and Ratio Detector (Discriminator )
Foster-seely and Ratio Detector (Discriminator )Foster-seely and Ratio Detector (Discriminator )
Foster-seely and Ratio Detector (Discriminator )
 
Pcb design using proteus
Pcb design using proteusPcb design using proteus
Pcb design using proteus
 

Similar a Lab 1 microcontroller

report_barc
report_barcreport_barc
report_barcsiontani
 
Pic microcontrollers for_beginners
Pic microcontrollers for_beginnersPic microcontrollers for_beginners
Pic microcontrollers for_beginnersPraveen Chary
 
engineering-edge-vol.-5-iss.-2-LR
engineering-edge-vol.-5-iss.-2-LRengineering-edge-vol.-5-iss.-2-LR
engineering-edge-vol.-5-iss.-2-LRNatasha Antunes
 
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++libpf
 
IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???IRJET Journal
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingNilesh Bhaskarrao Bahadure
 
Uniface delivers 3GL app in less time, using less code
Uniface delivers 3GL app in less time, using less codeUniface delivers 3GL app in less time, using less code
Uniface delivers 3GL app in less time, using less codeHelen Xu
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)inventionjournals
 
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdf
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdfParallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdf
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdfSlide_N
 
Python monorepos what, why and how (shared)
Python monorepos  what, why and how (shared)Python monorepos  what, why and how (shared)
Python monorepos what, why and how (shared)benjyw
 
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)Brian Brazil
 
Python Programmimg language in Gurugram
Python  Programmimg language in GurugramPython  Programmimg language in Gurugram
Python Programmimg language in Gurugramdigitallynikitasharm
 
Reusing FEFEM in form-based model editor generation.
Reusing FEFEM in form-based model editor generation.Reusing FEFEM in form-based model editor generation.
Reusing FEFEM in form-based model editor generation.University of York
 
MikroBasic
MikroBasicMikroBasic
MikroBasicbutest
 

Similar a Lab 1 microcontroller (20)

18CSL48.pdf
18CSL48.pdf18CSL48.pdf
18CSL48.pdf
 
report_barc
report_barcreport_barc
report_barc
 
Pic microcontrollers for_beginners
Pic microcontrollers for_beginnersPic microcontrollers for_beginners
Pic microcontrollers for_beginners
 
01 python introduction
01 python introduction 01 python introduction
01 python introduction
 
engineering-edge-vol.-5-iss.-2-LR
engineering-edge-vol.-5-iss.-2-LRengineering-edge-vol.-5-iss.-2-LR
engineering-edge-vol.-5-iss.-2-LR
 
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++
LIBPF: A LIBRARY FOR PROCESS FLOWSHEETING IN C++
 
IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???IRJET- Why Python Rocks for Research....???
IRJET- Why Python Rocks for Research....???
 
Codesmells for AspectJ
Codesmells for AspectJCodesmells for AspectJ
Codesmells for AspectJ
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
Uniface delivers 3GL app in less time, using less code
Uniface delivers 3GL app in less time, using less codeUniface delivers 3GL app in less time, using less code
Uniface delivers 3GL app in less time, using less code
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
 
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdf
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdfParallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdf
Parallel Vector Tile-Optimized Library (PVTOL) Architecture-v3.pdf
 
Python monorepos what, why and how (shared)
Python monorepos  what, why and how (shared)Python monorepos  what, why and how (shared)
Python monorepos what, why and how (shared)
 
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
OpenMetrics: What Does It Mean for You (PromCon 2019, Munich)
 
1.Basic_Syntax
1.Basic_Syntax1.Basic_Syntax
1.Basic_Syntax
 
Python basic syntax
Python basic syntaxPython basic syntax
Python basic syntax
 
Python Programmimg language in Gurugram
Python  Programmimg language in GurugramPython  Programmimg language in Gurugram
Python Programmimg language in Gurugram
 
Reusing FEFEM in form-based model editor generation.
Reusing FEFEM in form-based model editor generation.Reusing FEFEM in form-based model editor generation.
Reusing FEFEM in form-based model editor generation.
 
MikroBasic
MikroBasicMikroBasic
MikroBasic
 
Arm lab
Arm labArm lab
Arm lab
 

Más de mkazree

Contoh kertas kerja program
Contoh kertas kerja programContoh kertas kerja program
Contoh kertas kerja programmkazree
 
Communication Engineering - Chapter 6 - Noise
Communication Engineering - Chapter 6 - NoiseCommunication Engineering - Chapter 6 - Noise
Communication Engineering - Chapter 6 - Noisemkazree
 
The Electronic Hobby Kit
The Electronic Hobby KitThe Electronic Hobby Kit
The Electronic Hobby Kitmkazree
 
Dek3223 chapter 2 robotic
Dek3223 chapter 2 roboticDek3223 chapter 2 robotic
Dek3223 chapter 2 roboticmkazree
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receiversmkazree
 
Dek3223 chapter 3 industrial robotic
Dek3223 chapter 3 industrial roboticDek3223 chapter 3 industrial robotic
Dek3223 chapter 3 industrial roboticmkazree
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receiversmkazree
 
Comm introduction
Comm introductionComm introduction
Comm introductionmkazree
 
Chapter2 cont
Chapter2 contChapter2 cont
Chapter2 contmkazree
 
Chapter 2 amplitude_modulation
Chapter 2 amplitude_modulationChapter 2 amplitude_modulation
Chapter 2 amplitude_modulationmkazree
 
Chapter5 dek 3143 dae 32303 9 (nota tambahan)
Chapter5 dek 3143 dae 32303 9 (nota tambahan)Chapter5 dek 3143 dae 32303 9 (nota tambahan)
Chapter5 dek 3143 dae 32303 9 (nota tambahan)mkazree
 
Ii20102011
Ii20102011Ii20102011
Ii20102011mkazree
 
Chapter 3 induction machine
Chapter 3 induction machineChapter 3 induction machine
Chapter 3 induction machinemkazree
 
Chapter 2 transformer new
Chapter 2 transformer newChapter 2 transformer new
Chapter 2 transformer newmkazree
 
Chapter 1 dc machines new
Chapter 1 dc machines newChapter 1 dc machines new
Chapter 1 dc machines newmkazree
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copymkazree
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copymkazree
 
Chp5 pic microcontroller instruction set copy
Chp5 pic microcontroller instruction set   copyChp5 pic microcontroller instruction set   copy
Chp5 pic microcontroller instruction set copymkazree
 
Chp3 designing bus system, memory & io copy
Chp3 designing bus system, memory & io   copyChp3 designing bus system, memory & io   copy
Chp3 designing bus system, memory & io copymkazree
 
Chp2 introduction to the 68000 microprocessor copy
Chp2 introduction to the 68000 microprocessor   copyChp2 introduction to the 68000 microprocessor   copy
Chp2 introduction to the 68000 microprocessor copymkazree
 

Más de mkazree (20)

Contoh kertas kerja program
Contoh kertas kerja programContoh kertas kerja program
Contoh kertas kerja program
 
Communication Engineering - Chapter 6 - Noise
Communication Engineering - Chapter 6 - NoiseCommunication Engineering - Chapter 6 - Noise
Communication Engineering - Chapter 6 - Noise
 
The Electronic Hobby Kit
The Electronic Hobby KitThe Electronic Hobby Kit
The Electronic Hobby Kit
 
Dek3223 chapter 2 robotic
Dek3223 chapter 2 roboticDek3223 chapter 2 robotic
Dek3223 chapter 2 robotic
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receivers
 
Dek3223 chapter 3 industrial robotic
Dek3223 chapter 3 industrial roboticDek3223 chapter 3 industrial robotic
Dek3223 chapter 3 industrial robotic
 
Chapter 3 am receivers
Chapter 3 am receiversChapter 3 am receivers
Chapter 3 am receivers
 
Comm introduction
Comm introductionComm introduction
Comm introduction
 
Chapter2 cont
Chapter2 contChapter2 cont
Chapter2 cont
 
Chapter 2 amplitude_modulation
Chapter 2 amplitude_modulationChapter 2 amplitude_modulation
Chapter 2 amplitude_modulation
 
Chapter5 dek 3143 dae 32303 9 (nota tambahan)
Chapter5 dek 3143 dae 32303 9 (nota tambahan)Chapter5 dek 3143 dae 32303 9 (nota tambahan)
Chapter5 dek 3143 dae 32303 9 (nota tambahan)
 
Ii20102011
Ii20102011Ii20102011
Ii20102011
 
Chapter 3 induction machine
Chapter 3 induction machineChapter 3 induction machine
Chapter 3 induction machine
 
Chapter 2 transformer new
Chapter 2 transformer newChapter 2 transformer new
Chapter 2 transformer new
 
Chapter 1 dc machines new
Chapter 1 dc machines newChapter 1 dc machines new
Chapter 1 dc machines new
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copy
 
Chp5 pic microcontroller instruction set copy
Chp5 pic microcontroller instruction set   copyChp5 pic microcontroller instruction set   copy
Chp5 pic microcontroller instruction set copy
 
Chp3 designing bus system, memory & io copy
Chp3 designing bus system, memory & io   copyChp3 designing bus system, memory & io   copy
Chp3 designing bus system, memory & io copy
 
Chp2 introduction to the 68000 microprocessor copy
Chp2 introduction to the 68000 microprocessor   copyChp2 introduction to the 68000 microprocessor   copy
Chp2 introduction to the 68000 microprocessor copy
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Último (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Lab 1 microcontroller

  • 1. FACULTY OF ELECTRICAL AND ELECTRONIC ENGINEERING COMPUTER ADDED DESIGN LABORATORY LABORATORY INSTRUCTION SHEET DAE32203 / DEK3133 Subject Code and Name MICROCONTROLLER Experiment Code 01 Introduction to MPLAB, PROTEUS and Experiment Title MikroC Course Code DET/DEE/DEX
  • 2. Document RPP-05 Page Number 1 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 MAKLUMAT MATAPELAJARAN SUBJECT : DAE32203 / DEK 3133 MICROCONTROLLER TITLE : LAB 1 – Introduction to MPLAB, Proteus and MicroC. GOAL : To expose student with MPLAB, Proteus and MicroC software 1. OBJECTIVES At the end of this lab session, students will : (i) Understand the operation and the basic use of MPLAB, Micro C and Proteus. (ii) Use MPLAB and Micro C to write program and assembly language for PIC Microcontroller. (iii) Use MPLAB SIM and Proteus to simulate assembly and C language for PIC Microcontroller. 2. SINOPSYS MPLAB and Micro C is a software package easy writing process and development of assembly and C language program for PIC Microcontroller. In this lab, student will have the exposure on MPLAB and Micro C software and learn how to manage project by using MPLAB starting and Micro C from assembly and C language program until simulation by Proteus. Disediakan Oleh: Disahkan Oleh: Tandatangan : Tandatangan : Nama : Mohamad Bin Hj. Md. Som Nama : Shamsul Bin Mohamad Tarikh : July-2010 Tarikh : July-2010
  • 3. Document RPP-05 Page Number 2 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 3. THEORY A) MPLAB MPLAB is comprehensive software that has editing, project management and design in it. It used in development of embedded system application using microcontroller Microchip PICmicro and PIC. Assembly language is a language that used for programming microcontroller. Before we programmed these assembly language instructions into microcontroller memory, it has to convert to machine language so that microcontroller easily understands. This conversion is done by software so called assembler in MPLAB. This process is described in Figure 1. Figure 1 In the MPLAB assembly language programming, numbers usually represent decimal, binary and hexadecimal. For example, decimal number 240 is written by: 240 - decimal 0xF0 - hexadecimal b’11110000’ - binary Basic elements in assembly language are: Label Instruction Operand Comment
  • 4. Document RPP-05 Page Number 3 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 B) PROTEUS ISIS provides the development environment for PROTEUS VSM, our revolutionary interactive system level simulator. This software combines mixed mode circuit simulation, micro-processor models and interactive component models to allow the simulation of complete micro-controller based designs. ISIS provides the means to enter the design in the first place, the architecture for real time interactive simulation and a system for managing the source and object code associated with each project. In addition, a number of graph objects can be placed on the schematic to enable conventional time, frequency and swept variable simulation to be performed. Major features of PROTEUS VSM include: · True Mixed Mode simulation based on Berkeley SPICE3F5 with extensions for digital simulation and true mixed mode operation. · Support for both interactive and graph based simulation. · CPU Models available for popular microcontrollers such as the PIC and 8051 series. · Interactive peripheral models include LED and LCD displays, a universal matrix keypad, an RS232 terminal and a whole library of switches, pots, lamps, LEDs etc. MikroC is a powerful, feature rich development tool for PICmicros. It is designed to provide the programmer with the easiest possible solution for developing applications for embedded systems, without compromising performance or control. C) MikroC IDE PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used in a wide variety of applications, and C, prized for its efficiency, is the natural choice for developing embedded systems. mikroC provides a successful match featuring highly advanced IDE, ANSI compliant compiler, broad set of hardware libraries, comprehensive documentation, and plenty of ready-to- run examples. Features : mikroC allows you to quickly develop and deploy complex applications: • Write your C source code using the built-in Code Editor (Code and Parameter Assistants, Syntax Highlighting, Auto Correct, Code Templates, and more…) • Use the included mikroC libraries to dramatically speed up the development: data acquisition, memory, displays, conversions, communications… Practically all P12, P16,
  • 5. Document RPP-05 Page Number 4 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 and P18 chips are supported. • Monitor your program structure, variables, and functions in the Code Explorer. • Generate commented, human-readable assembly, and standard HEX compatible with all programmers. • Inspect program flow and debug executable logic with the integrated Debugger. 4. EQUIPMENT LIST (1) Personal Computer (PC) (2) MPLAB Software (3) Mikro C Software (4) Proteus Software 5. PROCEDURE 5.1 WRITE ASSEMBLY CODE AND SIMULATE USING MPLAB. (A) Starting New Project 1. Start MPLAB software. Click start > Microchip > MPLAB IDE 2. MPLAB work area will appear; shows in Figure 1-1. Figure 1-1 3. To start a new project, click Project > new. New windows of New Project will appear; shows in Figure 1-2.
  • 6. Document RPP-05 Page Number 5 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 4. Fill in Project Name as Lab1 and Project directory with c:lab1 or use Browse to choose existence directory. Figure 1-2 5. To write PIC assembly language program, click File > New. New windows editing will appear. 6. Write down the program 1.1 below and save it by name as lab1.asm ;************************************************************************** PORTA EQU 05h ;This tells the assembler where the address of PORTA, PORTB EQU 06h ;PORTB, STATUS and ADCON1 TRISA EQU 85h ;This Tell the assembler where the address of ports Direction of, TRISB EQU 86h ;TRISA and TRISB. STATUS EQU 03h ADCON1 EQU 9Fh ;Address of Type of data whether Digital/Analog at PORTA RP1 EQU 6 ;Bit 6 and 5 for bank selection in STATUS register. RP0 EQU 5 ;To select bank 0, RP1 = 0 and RP0 = 0 {PORTA and PORTB} ;To select bank 1, RP1 = 0 and RP0 = 1 {TRISA,TRISB & ADCON1} ;To select bank 2, RP1 = 1 and RP0 = 0 ;To select bank 3, RP1 = 1 and RP0 = 1 ;************************************************************************** ORG 00h ;Assembler is now set to address 0 where the main ;program is placed ;********************PIC SETUP******************************************** BSF STATUS,RP0 ;Select bank 1(To use TRISA,B and ADCON1) MOVLW B'00000110' ;Load literal value=6 into W register MOVWF ADCON1 ;Move the literal value into ADCON1 register. ;Now PORTA is configured as digital input MOVLW B'00000000' ;0 is loaded into W register MOVWF TRISB ;Now all PORTB bits are set as OUTPUT
  • 7. Document RPP-05 Page Number 6 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 MOVLW B'11111111' ;move binary value 11111111 to register W MOVWF TRISA ;Now All PORTA bits are set as INPUT ;*******************START OF MAIN PROGRAM************************* BCF STATUS,RP0 ;Back to bank 0;(To use PORTA and PORTB) CLRF PORTB ;Set PORTB output is 0 LOOP BTFSS PORTA,4 ;Bit test PORTA bit 4, if SET skip next line GOTO ON ;Goto ON if button is pressed OFF BCF PORTB,0 ;LED is OFF when button at PORTA is not pressed. GOTO LOOP ;Go back and test the button again ON BSF PORTB,0 ;As PORTA input is 0, mean button is pressed so ;LED at PORTB bit 0 goes ON GOTO LOOP ;Go back to LOOP and test the button again END ;End of code. 7. Insert file programming into this project by clicking right button Source File which shows in Figure 1-3. Choose lab1.asm file that has written. Figure 1-3
  • 8. Document RPP-05 Page Number 7 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 8. To assemble the program, firstly we have to choose types of microcontroller by clicking Configure > Select Device, choose 16F877A. 9. Select Configure > Configuration Bits and set as shown in a figure below. 10. Click Project > Built All to assemble the program. If there is no error, then BUILD SUCCEEDED message will appear. If there is an error, then Error message and Location will appear. (B) Project Simulation 1. To start Simulation, click Debugger > Select Tool > MPLAB SIM. Observe the changes at the MPLAB interface. List down the changes. 2. Click View > Watch. Watch windows (Figure 1-4) will appear. First, from pull down menu, choose PORTA and click Add SFR button. Then choose PORTB and click Add SFR button again. Figure 1-4
  • 9. Document RPP-05 Page Number 8 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 3. Click Debugger > Animate. Observe Watch window and also Lab1.asm program window. Explain your observation. 4. Click Debugger > Halt to stop the simulation process. Click Debugger > Reset > MCLR to reset the program. 5. Click Debugger > Stimulus Controller > New Workbook >Asynch. A window in Figure 1-5 will appear. At Pin/SFR column, choose RA4 pin and at Action column choose Set Low. Observe any changes at Watch window after Animate button and Fire button is pressed. Observe any changes. Figure 1-5
  • 10. Document RPP-05 Page Number 9 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 5.2 SIMULATION THE HEX FILE USING PROTEUS 1. Open Proteus by clicking START > ALL PROGRAM > PROTEUS 7 PROFESIONAL > ISIS 7 PROFESIONAL . Figure 1-6 2. Proteus work area will appear; shows in Figure 1-7. Select button “ P” and follow the next instructions. Figure 1-7
  • 11. Document RPP-05 Page Number 10 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 3. A window in Figure 1-8 will appear. Figure 1-8 4. Select instruction bellows and doudle click your left mouse to input components inside category window as shown in figure 1-9. a) MICROPROCESSORS > PIC16F877A b) RESISTORS > 3 WATT1K c) OPTOELECTRONICS > LED-BIBY d) SWITCHES & RELAYS > BUTTON Figure 1-9
  • 12. Document RPP-05 Page Number 11 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 5. Drag and drop components by clicking at “DEVICES” window to working window as shown at figure 1-10. Figure 1-10 6. Right click mouse and select properties for rotate the components to your suitable positions as shown at figure 1-11. Figure 1-11 7. Connect and wiring all components. 8. Click “Terminals Mode” button to input ‘POWER’ and ‘GROUND’ to your working space as shown at figure 1-12. Figure 1-12
  • 13. Document RPP-05 Page Number 12 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 9. Arrange your components to suitable position and completed your work with the correct connections as figure 1-13. Figure 1-12 10. Save your project at different folder and named it Projek1_circuit as figure 1-14. Figure 1-13
  • 14. Document RPP-05 Page Number 13 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 Figure 1-14 11. From your working space, double click your PIC16F877A and follow the instructions number inside figure 1-15. Setting your Edit Component window by following the step given. 1st setting frequency to 4 MHz, 2nd click at browse button and select the hex file from the project folder created by compiler (MPLAB or Micro C ) . 3rd click “OK”. Figure 1-15
  • 15. Document RPP-05 Page Number 14 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 11. Click DEBUG > EXECUTE to simulate your program and click DEBUG > STOP ANIMATION to stop the program. From your window project, you can animate your program by clicking suitable button as shown in figure 1.16. Explain your observation. Figure 1-16 12. The complete circuit as shown as Figure 1-17. Figure 1-17 13. To see detail what happen to PORTA, PORTB and others register, go to Debug>watch window and add the register that you want to watch like a figure below. Figure 1-18
  • 16. Document RPP-05 Page Number 15 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 5.3 PROGRAMMING USING C LANGUAGE 1. Open Mikro C compiler as shown in figure 1-18. Figure 1-18 2. Create a new project • Project wizard dialog will appear – fill the dialog with appropriate settings for your project • Enter a name for your new project • Choose project path, • Enter short text which describes your project (this is optional) • Choose the microcontroller from drop-down menu • Set the device clock by entering the value in edit box (set to 4Mhz) • Set configuration bits (device flags) by clicking default • After you have set up your project, click OK to continue.
  • 17. Document RPP-05 Page Number 16 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 3. Write the code: ‐ Compiler will create the project file and an accompanying source file, named same as your project. This source file will be automatically opened in the code editor, so you can write the source code. Picture below is the code editor.
  • 18. Document RPP-05 Page Number 17 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 4. Type the source code below into the code editor: 5. Save the file by clicking on the save icon. To compile the source code select Project->Build from the drop-down menu, or click the Build Icon. 6. Compiler will generate output files in the project folder. There should be 4 new files: project1.asm, project1.lst, project1.mcl and project1.hex. The file name with *.hex file will be used to burn into PIC flash memory or can be load into simulation software (Proteus) to simulate the output.
  • 19. Document RPP-05 Page Number 18 of 18 Reference No. Edition 1 Document Title LABORATORY Revision No. 1 PRACTICUM Effective Date JULY 2010 Amendment Date JULY 2010 6. REPORT PREPARATION AND SCHEMA. (1) 2 persons for 1 report. (2) Due date to send report is 1 weeks after lab date. (3) Report schema following below requirements: • Lab report cover sheet for 1st page. • Objective, theory, equipments for the 2nd page. (5) ( 5 Mark ) • Procedure lab sheet . (30) 1. Program 1.1 by MPLAB. ( 5 Mark ) 2. Proteus - Circuit diagram ( 10 Mark ) 3. Program 1.2 by Micro C. ( 5 Mark ) 4. Flow chart of Mikro C code. ( 10 Mark ) • Observations. (35) 1. Observations when using MPLAB software. ( 15 Mark ) 2. Observations when using Proteus software. ( 10 Mark ) 3. Observations when using Micro C software. ( 10 Mark ) • Discussions. (20) 1. Result by using MPLAB software ( 10 Mark ) 2. Result by using Proteus software ( 5 Mark ) 3. Result by using Micro C software ( 5 Mark ) • Conclusions. (10) ( 10 Mark )