_Tutorial Session on Microcontroller

download _Tutorial Session on Microcontroller

of 17

Transcript of _Tutorial Session on Microcontroller

  • 8/9/2019 _Tutorial Session on Microcontroller

    1/17

    Tutorial Session on

    Microcontroller/KitPresenter: Engr. Mohammad Faisal Haider Paracha.

    Venue: Microprocessors and Digital Systems, Lab

    Timings: 08:30~11:00

  • 8/9/2019 _Tutorial Session on Microcontroller

    2/17

    What is a Microcontroller/Microprocessor?

    • Microcontrollers and Microprocessors are

    widely used in Embedded Systems.

    • An embedded product uses a

    Microcontroller/Microprocessor, that

    performs only one task.

    • Some Embedded Systems are: keyboard,

    printer, modem, disk controller, sound card,

    CD-ROM driver, mouse and so on.

    5/2/2014 2Copy Rights are Reserved only ForEngr. M. Faisalr Paracha

  • 8/9/2019 _Tutorial Session on Microcontroller

    3/17

    What are the differences b/w

    Microcontroller and Microprocessor?

    • A Microcontroller is an Integrated Circuit thatcontains CPU, RAM, ROM, Timers, I/O pins, SerialCOM Port on the one chip. Designer just have to

    use the IC up to the requirements, just plug andplay. Less versatile.

    • A Microprocessor is an Integrated Circuit thatdoes not contain RAM, ROM, Timers, I/O pins,

    Serial COM Port on its chip. Designers have toadd the above peripherals up to therequirements. More versatile.

    5/2/2014 3Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

  • 8/9/2019 _Tutorial Session on Microcontroller

    4/17

    Some Famous Microprocessors.

    • Intel's 4004, 8086, 80286, 80386, 80486,

    Pentium, Pentium II, Pentium III, Pentium 4,

    Pentium M, Pentium Dual Core, Core i3, Core

    i5, Core i7

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    4

  • 8/9/2019 _Tutorial Session on Microcontroller

    5/17

    Overview of the 8051 Family

    • In 1981, Intel Corporation introduced an 8-bitmicrocontroller called the 8051.

    • 8-bit microcontroller means that its CPU can

    work only on 8-bits of data at a time.• It has 4k bytes of ROM, 128 bytes of RAM, 2

    Timers, 32 I/O pins, 1 Serial Port, 6 interrupt

    sources.• What will happen if the data is larger than 8-

    bits?

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    5

  • 8/9/2019 _Tutorial Session on Microcontroller

    6/17

    Comparison of 8051 Family Members

    Features 8051 8052 8031

    ROM(on-chip

    program space in

    bytes)

    4K 8K 0K

    RAM(bytes) 128 256 128

    Timers 2 3 2

    I/O pins 32 32 32

    Serial Port 1 1 1

    Interrupt sources 6 8 6

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    6

  • 8/9/2019 _Tutorial Session on Microcontroller

    7/17

    What is the Trainer Board?

    • A Trainer Board allow us to test the differentsource codes.

    • In Universities these trainers could be help full for

    students to visualize the actual working of theprogram; so that they will be able to make theirconcepts better.

    • The trainers have a number of devices interfaced

    with the Microcontroller.• We could be able to implement number of

    experiments on these trainers.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    7

  • 8/9/2019 _Tutorial Session on Microcontroller

    8/17

    Some Famous Experiments of 8051

    • Examining the cy flag and the stack

    • To examine the I/O port operation using a simulator.

    • To code a program to transfer data from code ROM space into RAM locations.

    • To write a program to convert data from hex to ASCII to BCD.

    • To test the 8051 system and its ports.

    Interfacing An LCD To The 8051• Interfacing adc804/809/848 to the 8051 trainer

    • Interfacing a sensor to the 8051

    • Timer programming

    • 8051 serial interfacing

    • Interfacing a stepper motor to the 8051

    Event counter programming• Interrupt programming

    • And many more

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    8

  • 8/9/2019 _Tutorial Session on Microcontroller

    9/17

    FEATURE OF LEARNIG KIT

    • Burner & trainer is in one kit (In circuit programming)

    • onboard ADC

    • onboard temperature sensor (LM35)

    onboard Rs232 serial communication• on board IR port( RX & TX)

    • On board RTC (Ds1307)

    • On board serial EPROM (24cxx)

    • On board 7 segment display

    •On board matrix LCD interface IDC connector (14 pin)

    • On board facility to connect external hardware to port 0,1,2,3.

    • On board ZIF socket

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    9

  • 8/9/2019 _Tutorial Session on Microcontroller

    10/17

    RS-232 Communication Module

    • It is commonly used for data transfer between

    microcontroller & PC

    • Since the voltage levels of Microcontroller and

    PC are not directly compatible with each other

    so a level converter such as MAX 232 must be

    used.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    10

  • 8/9/2019 _Tutorial Session on Microcontroller

    11/17

    DS 1307 R.T.C

    • There are many applications of RTC.

    • It stores real time, and calendar.

    External power supply of 12 V DC may be usedto powered On the device.

    • This trainer is capable to support 89S51

    microcontroller chip.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    11

  • 8/9/2019 _Tutorial Session on Microcontroller

    12/17

    IR Receiver

    • Mostly IR receivers are used for remote

    control applications.

    • This trainer has also one IR receiver for

    remote control based experiments.

    • ZIF(zero insertion force) socket is available to

    insert an IC chip on to the trainer board.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    12

  • 8/9/2019 _Tutorial Session on Microcontroller

    13/17

    On Board Programmer

    • There is no need to connect externalprogrammer.

    • All you just need to connect the trainer board

    with the PC and Burn the program using theBurner software, and visualize the functionality ofthe program.

    • There is one button marked as reset, when

    programmer press Reset button microcontrollerwill start to execute the program from the firstline.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    13

  • 8/9/2019 _Tutorial Session on Microcontroller

    14/17

    LED’s 

    •   LED’s are components used for displaying pindigital state.

    • There are seven push buttons which can be

    used to change state of digital inputs on themicrocontroller ports.

    • 89s51 Programmer trainer has one 7-segment

    display.• 89s51 Programmer trainer has one standard

    character LCD.

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    14

  • 8/9/2019 _Tutorial Session on Microcontroller

    15/17

    How can we burn a Program on to the IC chip?

    • Attach your PC with the Trainer Board.

    • Insert an IC (89S51) in to the ZIF socket.

    • Move the switch to the programmer side.

    • Power ON the trainer board, by using an external power supply.

    Open the burning software on to the PC.• Select the number of your Chip.

    • Read the Chip.

    • Erase the earlier program if any;

    • Burn the new program (specified by the path of the .HEX file,

    generated by the assembler) on to the IC chip.• Move the switch back to the trainer side.

    • Enjoy the program!

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    15

  • 8/9/2019 _Tutorial Session on Microcontroller

    16/17

     

    Question/Answer Session

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    16

  • 8/9/2019 _Tutorial Session on Microcontroller

    17/17

     

    Thanks You!

    5/2/2014 Copy Rights are Reserved only ForMohammad Faisal Haider Paracha

    17