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,...

1 answer below »
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
Answered Same DayJul 09, 2021

Answer To: Section * EGR340L Embedded System Lab My mbed Tutorial * The mbed Tutorial (source: mbed.org)...

Neha answered on Jul 12 2021
146 Votes
Title
Name
Date
Goals of experiment
This experiment is to demonstrate the usage of 16X2 LCD display. It shows how the L
iquidCrystal library works when used with the LCD display. The liquid crystal used in this experiment is compatible with Hitachi HD44780 driver. I have used 16-pin interface in this experiment. All the connections are done properly, and it will show Hello World on the screen after simulation.
C Language
In this simulation code I have used C language. LiquidCrystal header file is included in the code. The code contains a method called setup. This method will start the program from pin 16 and 2. The Hello world message will be printed on the LCD. Another method is declared as the loop which will set the cursor on LCD to print the message from 0 pin. A delay of 1 sec is added in the code while printing the message.
API
In this lab we have used a function called DigitalWrite. The digital write function is used in the code which will help us to write the high or low value for the digital pin. If the pin Is configured as the OUTPUT using the pin more than its voltage will be set as 5 V for high and 0 V (ground) for low. If the pin is configured to be INPUT, then the digitalWrtie function will...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here