I need somebody to do my Embedded system Lab
Section * EGR340L Embedded System Lab My mbed Tutorial * The mbed Tutorial (source: mbed.org) Connecting the mbed to PC Use the USB lead to connect your mbed to a PC. The status light will come on, indicating it has power. After a few seconds of activity, the PC will recognise the mbed Microcontroller as a standard USB drive. * The mbed Tutorial (source: mbed.org) Creating an mbed account. Go to the new USB Drive, and click MBED.HTM to open it in a web browser. If you do not have an mbed account, choose "Signup", and create your mbed Account. Otherwise, log in with your normal username and password. This will give you access to the website, tools, libraries and documentation. Downloading and running a program Download the HelloWorld_LPC1768.bin under the Doc Sharing area or from the following link: HelloWorld_LPC1768.bin (http://developer.mbed.org/static/bins/HelloWorld_LPC1768.bin) Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the microcontroller disk. * The mbed Tutorial (source: mbed.org) When the Reset Button in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens. When the program is has been loaded onto the microcontroller, it will then start it running. The Microcontroller is now running the “HelloWorld” program: flashing LED1 forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart. It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run. Creating new program Open the online compiler using the link in the site menu (top-right of the page). This will open the Compiler in a new tab or window, so you can move back and forth to continue to read these instructions. * The mbed Tutorial (source: mbed.org) To create a new program in your personal Program Workspace: Right-click (Mac users, Command-Click) on "My Programs", and select "New Program...“ Enter the name of the new program (e.g. "test"), and click "OK" Your new program folder will be created under "My Programs". It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run. * The mbed Tutorial (source: mbed.org) To view the default program source code, click on the "main.cpp" file in your new program to open it in the file editor window. This is the main source code file in your program, and by default contains a simple program already. The code should look like:. The other item in the program folder is the "mbed" library - this provides all the useful functions to start up and control the mbed Microcontroller, such as the DigitalOut interface used in this example * The mbed Tutorial (source: mbed.org) Creating new program To compile the newly developed program, click the “Compile” button in the toolbar. This will compile all the program source code files within the program folder to create a binary program. After a successful compile, you will get a "Success!" message in the compiler output and the download dialog will pop up. Save it to the location of the mbed Microcontroller drive, and then hit reset on the microcontroller to start it running! If there are errors, they will show up in the "Compiler Output" window, and will need to be fixed!. * ======The End====== Pre-Lab and Background Information PAGE 6 EGR340L: Embedded System Laboratory EGR340L: Embedded System Laboratory LAB 1 – Introduction to mbed Introduction The student should have all the hardware components received in the mail. 1. Introduction to mbed hardware The ARM mbed takes the LPC1768 microcontroller and places it along with other useful support circuitry on a printed circuit board (PCB). It takes the form of a 2 inch by 1 inch PCB, with 40 pins arranged in two rows of 20. 2. Introduction to mbed compiler. The mbed board is supported with an online compiler, program library and handbook, which forms a complete embedded system development environment. We will learn to program and develop solutions using this development environment in ERG340L. 3. A simple tutorial. The following are slides that include a basic mbed tutorial with some parts that do needs to be updated with the current interfaces of the online compiler. It does provide the basic steps of things and the first task of this lab as described in the lab procedure is for you to update these slides with the correct or more detailed steps for future students. 2 The mbed Tutorial (source: mbed.org) 1.Connecting the mbed to PC •Use the USB lead to connect your mbed to a PC. The status light will come on, indicating it has power. After a few seconds of activity, the PC will recognisethe mbed Microcontroller as a standard USB drive. EMBED PowerPoint.Slide.8 3 The mbed Tutorial (source: mbed.org) 2.Creating an mbed account. •Go to the new USB Drive, and click MBED.HTM to open it in a web browser. •If you do not have an mbed account, choose "Signup", and create your mbed Account. Otherwise, log in with your normal username and password. •This will give you access to the website, tools, libraries and documentation. 3.Downloading and running a program •Download the HelloWorld_LPC1768.bin under the Doc Sharing area or from the following link: HelloWorld_LPC1768.bin (http://developer.mbed.org/static/bins/HelloWorld_LPC1768.bin ) •Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB disk. •The Status LED will flash as the PC writes the file to the microcontroller disk. 4 The mbed Tutorial (source: mbed.org) •When the ResetButton in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens. •When the program is has been loaded onto the microcontroller, it will then start it running. •The Microcontroller is now running the “HelloWorld”program: flashing LED1 forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart. •It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run. 4.Creating new program •Open the online compiler using the link in the site menu (top - right of the page). This will open the Compiler in a new tab or window, so you can move back and forth to continue to read these instructions . 5 The mbed Tutorial (source: mbed.org) •To create a new program in your personal Program Workspace: •Right-click (Mac users, Command -Click) on "My Programs", and select "New Program... “ •Enter the name of the new program (e.g. "test"), and click "OK" •Your new program folder will be created under "My Programs". It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run. 6 The mbed Tutorial (source: mbed.org) •To view the default program source code, click on the "main.cpp" file in your new program to open it in the file editor window. •This is the main source code file in your program, and by default contains a simple program already. The code should look like:. The other item in the program folder is the "mbed" library -this provides all the useful functions to start up and control the mbed Microcontroller, such as the DigitalOutinterface used in this example 4. Here is the list of main materials that you should have received for this lab: · mBed Case · LPC1768 MCU · LPC1768 Pinout Card · USB Interface Cable (1.8m) · Setup Guide · Light Emitting Diode · 7 Segment Display (4Bank) · Potentiometer (10kohm -- Linear) · PC1602 LCD Display · Switch (SPDT) · Switch (Pushbutton) · Resistor Set · Breadboard · Jumper Wire · Analog Servo · Piezo Speaker · Digital Temperature Sensor · Triple Axis Accelerometer · MicroSD breakout board · RJ45 breakout Board 5. Instructions on Experiment Results for Lab Report: As an embedded system laboratory, your work will always include two parts: One part is the hardware (the schematics of your hardware connection, the physical board with all the supporting components properly connected, etc.); The other part is your code, which you enter and compile using the online compiler, and testing of this code to make sure it does perform the desired function properly. Thus in all your lab report, you will need to include · Hardware schematics that include all the detail connection for all component used in that part of the lab with the pin numbers clearly labeled for both the mbed board and the component used (if applicable). The schematics can be either hand drawn or computer graphics. · Pictures of your physical board with all the connections clearly shown. Your code (Save each individual code as a separate text file) · Expected behavior · Actual behavior you observe Lab 1 Procedure Part I – Setup and Tutorial 1. Make a check list of all the items in the kit you received from NU Lab and include a photo of each of the item in your Experiment Result and give a brief description of the name and function of the item. Use this Link for the lab part https://www.tinkercad.com/things/enbAeBuRILy 2. Follow the tutorial and successfully create a new program HelloWorld as indicated in the original tutorial (you will need to type in the Program Example 2.1 as shown below) yourself in the compiler and test the HelloWorld. Include the expected behavior on the board and the observed behavior on the board in your Experiment Result section of the report. Make sure to include pictures of your board connection in your Experiment Result for this program. 3. Save your code in a text file named as: YourFirstName_YourLastName_Lab1PartI.txt. 4. Record a short video clip demonstrating your board and the LED display in action. At the beginning of your file, make sure to reset the board by pressing the reset button on the board and capture the behavior of the board with the LED light in action. Upload