Published on

8051 microcontroller

Published in: Education, Technology
1 Comment

    My name is Blessing
    i am a young lady with a kind and open heart,
    I enjoy my life,but life can't be complete if you don't have a person to share it

    Hoping To Hear From You
    Yours Blessing
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • While computers can be used for many different functions with many different programs, microcontrollers generally are used for one purpose, storing only one main program in ROM memory. They are usually “embedded” inside another devise, hence the name embedded control.
  • You need to be able to use the computer to send programs to the microcontroller. You also need to program the microcontroller using c-programming. Depending on what you are using the microcontroller for, you may need to know some circuitry.
  • Pres

    1. 1. PDI Studio 5Dayna Polstein
    2. 2.  Main purpose: ◦ To run programs on devises “Mini Computer” – Contains memory space Devise for embedded control Use a computer to program Can download programs from computer Can output information to computer Contains input/output ports
    3. 3.  Everywhere! ◦ Computers ◦ Remote controls ◦ Cell phones ◦ Cars (engine, antilock breaks, cruise control, etc.) ◦ Microwaves ◦ Dishwashers ◦ TVs ◦ DVD Players ◦ Almost every electronic with a user interface
    4. 4.  Basic computer skills C-programming Some basic circuitry
    5. 5.  Computer C8051 Board USB Debug Adapter Power Cord USB Cable SiLabs IDE SecureCRT
    6. 6. 1.
    7. 7. 2. 3. 4.
    8. 8.  Used For ◦ Writing Programs ◦ Sending Programs to C8051 Programmed in C Used For displaying text from: ◦ Main Program ◦ Input
    9. 9.  Be Careful with circuit ◦ Circuit boards are very delecate Only hold circuits by the edges ◦ Do not touch anything metal Before setting down: ◦ Make sure rubber feet are in tact ◦ Make sure area is clean and dust-free When storing: ◦ Use anti-static bag and cushioned packaging ◦ Store at room temperature
    10. 10. To USB Debug Adapter To Power CordLED should light upwhen powered
    11. 11. USB to ComputerTo power LEDs should lightoutlet up when in use
    12. 12. 1. Open SiLabs IDE2. Go to File  New File3. Type in C Program  Copy Sample Program: #include <stdio.h> main () { printf(“PDI Studio 5/n"); }
    13. 13. 4. Compile program by pressing the Assemble/Compile button on the toolbar or press Project  Assemble/Compile File5. Build program by pressing the Build/Make button on the toolbar or press Project  Build/Make Project Assemble/Compile Build/Make Button Button Note: If your program does not work, it will notify you at steps 4 and 5 and you will have to debug before attempting to connect
    14. 14. 6. Go to Options  Connection options and choose USB Debug Adapter and then OK
    15. 15. 7. Press the Connect button (or alt c) Connect ButtonLEDs on the Debug Adapter should now be on
    16. 16. 8. Press the Download code button Download Code Button
    17. 17.  Go to Project  Target Build Configuration Enable automatic connect/download after build and then press build again
    18. 18.  Go to C:SiLabsMCUExamplesC8051F02x Click on the “Blinky” folder, and open the c file in IDE Press on the green “go” button The green led on the board should start blinking Press the red button for the program to stop Each program has a description of function and reason for different lines Use these programs as guilds for your programs
    19. 19.  8 ports, 0 through 7 Each port is 1 byte (8 bits) wide You can address to entire bytes or individual bits Each port can be assigned as input or output C8051 will read the ports as ◦ 0 volts as false ◦ +3 volts as true
    20. 20.  Setting by bit (one of eight bits of the port) ◦ To assign b7 of port 0 :  sbit bit7 = P0^7; bit7 = 1;
    21. 21.  Set as Input ◦ Port 3 pin 7  P3MDout &= ~0x80; P3 | = 0x80; ***** Set as Output ◦ Port 2 pin 2  P2MOUT |= 0x04
    22. 22.  For individual bits, first read entire port, then use masking to determine value of bit Describe Masking Here
    23. 23.  Open Secure CRT
    24. 24.  Change settings and connect (try different com numbers) **
    25. 25.  Right click on Serial-COM3 and select “Session Options…”
    26. 26.  Click on emulation, change the scrollback buffer to 32000, and press ok.
    27. 27.  Make a new project and file in IDE (save as 384test.c Copy this program: #include "c8051.h" int main() { Sys_Init(); printf("nnntesting...n"); printf("done for now...n"); while(1); }
    28. 28.  Compile and build the code Connect and download code Start the code Text should display on Secure CRT window ***
    29. 29.  Embedded Control Course Materials IDE Software: html C8051 User Guide .pdf C8051 Manual: _4.pdf
    30. 30.  Timers A/D Converter C programming?