SlideShare a Scribd company logo
1 of 19
Download to read offline
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 )

More Related Content

What's hot

ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLAB
ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLABELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLAB
ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLABsanjay kumar pediredla
 
Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontrollerDiwaker Pant
 
Diode Applications & Transistor Basics
Diode Applications & Transistor BasicsDiode Applications & Transistor Basics
Diode Applications & Transistor BasicsA B Shinde
 
Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)AWANISHKUMAR84
 
DC Motor Control By Using A Chopper Circuit
DC Motor Control By Using A Chopper CircuitDC Motor Control By Using A Chopper Circuit
DC Motor Control By Using A Chopper CircuitBirol Arslan
 
Logic families
Logic familiesLogic families
Logic familiesDaudRaza2
 
The logic gate circuit
The logic gate circuitThe logic gate circuit
The logic gate circuitroni Febriandi
 
VLSI Design Sequential circuit design
VLSI Design Sequential circuit designVLSI Design Sequential circuit design
VLSI Design Sequential circuit designtamil arasan
 
RFID BASED ATTENDANCE SYSTEM PPT
RFID BASED ATTENDANCE SYSTEM PPTRFID BASED ATTENDANCE SYSTEM PPT
RFID BASED ATTENDANCE SYSTEM PPTnikhilpatewar
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerCorrado Santoro
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...Saikiran Panjala
 
Lab 6 microcontroller
Lab 6 microcontrollerLab 6 microcontroller
Lab 6 microcontrollermkazree
 
Lab 8 bipolar junction transistor characterstics
Lab 8  bipolar junction transistor charactersticsLab 8  bipolar junction transistor characterstics
Lab 8 bipolar junction transistor charactersticskehali Haileselassie
 
Planar fabrication technology
Planar fabrication technologyPlanar fabrication technology
Planar fabrication technologyPrathamesh Gardi
 

What's hot (20)

ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLAB
ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLABELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLAB
ELECTRICAL CIRCUIT ANALYSIS PROBLEM SOLUTION IN MATLAB
 
Interfacing methods of microcontroller
Interfacing methods of microcontrollerInterfacing methods of microcontroller
Interfacing methods of microcontroller
 
Diode Applications & Transistor Basics
Diode Applications & Transistor BasicsDiode Applications & Transistor Basics
Diode Applications & Transistor Basics
 
Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)
 
DC Motor Control By Using A Chopper Circuit
DC Motor Control By Using A Chopper CircuitDC Motor Control By Using A Chopper Circuit
DC Motor Control By Using A Chopper Circuit
 
Verilog HDL
Verilog HDL Verilog HDL
Verilog HDL
 
Logic families
Logic familiesLogic families
Logic families
 
The logic gate circuit
The logic gate circuitThe logic gate circuit
The logic gate circuit
 
VLSI Design Sequential circuit design
VLSI Design Sequential circuit designVLSI Design Sequential circuit design
VLSI Design Sequential circuit design
 
RFID BASED ATTENDANCE SYSTEM PPT
RFID BASED ATTENDANCE SYSTEM PPTRFID BASED ATTENDANCE SYSTEM PPT
RFID BASED ATTENDANCE SYSTEM PPT
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
 
Lab 6 microcontroller
Lab 6 microcontrollerLab 6 microcontroller
Lab 6 microcontroller
 
RFID based Attendance System
RFID based Attendance SystemRFID based Attendance System
RFID based Attendance System
 
Nand 4011 design
Nand 4011 designNand 4011 design
Nand 4011 design
 
Adele Prayer Service
Adele Prayer ServiceAdele Prayer Service
Adele Prayer Service
 
Lab 8 bipolar junction transistor characterstics
Lab 8  bipolar junction transistor charactersticsLab 8  bipolar junction transistor characterstics
Lab 8 bipolar junction transistor characterstics
 
Planar fabrication technology
Planar fabrication technologyPlanar fabrication technology
Planar fabrication technology
 
N well process
N well processN well process
N well process
 
Vlsi design
Vlsi designVlsi design
Vlsi design
 

Viewers also liked

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
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architectureAhmad Sidik
 
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
 

Viewers also liked (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
 
Ch2 microcontroller architecture
Ch2 microcontroller architectureCh2 microcontroller architecture
Ch2 microcontroller architecture
 
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 to 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
 
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
 
Text Mining with Rapid Miner.
Text Mining with Rapid Miner.Text Mining with Rapid Miner.
Text Mining with Rapid Miner.Gurdal Ertek
 

Similar to 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)
 
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
 
Text Mining with Rapid Miner.
Text Mining with Rapid Miner.Text Mining with Rapid Miner.
Text Mining with Rapid Miner.
 

More from 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
 

More from 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
 

Recently uploaded

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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Recently uploaded (20)

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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

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 )