EEET2246 – Introduction To Engineering Computing - Week 8,9 and 10 Tasks EEET2246 – Engineering Computing 1 – Weeks 8, 9 and 10 Laboratory Tasks 11/09/20 1 EEET2246 – Engineering Computing – Weeks 8,...

please refer the given files. uploading files seem to be a bit confusing since it has references separately. please give me an email address in order to provide necessary documents clearly.


EEET2246 – Introduction To Engineering Computing - Week 8,9 and 10 Tasks EEET2246 – Engineering Computing 1 – Weeks 8, 9 and 10 Laboratory Tasks 11/09/20 1 EEET2246 – Engineering Computing – Weeks 8, 9 and 10 Laboratory Tasks Due: Friday Week 11, 11:59pm via Canvas / Total Marks 10%. Overview: Laboratory Exercise 3 consists of a single set of Laboratory Tasks (defined in this document) and one Laboratory Test (Laboratory Test 3). The Laboratory Tasks are designed to help you build your code solution for the corresponding test. These tasks should be done at your own pace over the periods between Weeks 8 through to Week 11. The combined total for Laboratory Exercise 3 is 25% final mark for EEET2246, which comprises of 10% of these tasks and 15% for Laboratory Test 3 submission. All assessment items for Laboratory Exercise 3 are due by Friday, Week 11 at 11:59pm. IMPORTANT: Please use the Collaborate Ultra Laboratory sessions as Q & A to work through the tasks. Your Laboratory Demonstrator will not mark any work during these sessions and will be available online during this time to answer questions and provide assistance. Assessment: There are two types of tasks – explanation- and code-based. Explanation questions require you to provide a written descriptive answer or screen capture based on the question in your report. These types of questions will have a heading of Explanation based. Code-based means you will need to submit a working standalone *.cpp file. This type of question can be identified by the heading Code Submission. The submitted *.cpp files must be fully functional and compile without modification to achieve full marks. Each question that is marked as “Code Submission” requires a separate .cpp file to be submitted. The naming convention is as follows: ‘s1234567_week_8_9_10_question.cpp’, where s1234567 is your student number. Please do not submit all tasks in one .cpp file. Note: Some tasks will not attract any marks at all. These tasks are either introductory or bridging tasks to assist in your understanding of the topic. The report only needs to provide the required diagrams and text to inform the assessor what the required inputs are and the expected output of the code. Text explanations should be kept to a minimum and it is suggested to use dot points where possible. The report should use the same question number referencing as this document so that it is clear which answers are for what task questions. Note: All tasks are marked on a scale, however if code is not submitted for a given task (when required) or if it does not compile you will not score marks for that item. Submission Process: You will be required to submit a report with specific standalone *.cpp files to address the tasks outlined in this document. THE FIRST PAGE OF THE REPORT MUST SPECIFY: Your full name, student number, number of *.cpp files submitted, enrolled Laboratory session time slot and tutor name. The report along with *.cpp files must be uploaded via Canvas before the deadline to avoid any late penalties. A deduction of 10% per 24-hour period (including weekends) will be applied to late assessments. You are responsible for ensuring that you upload the correct files by the due date / time. EEET2246 – Engineering Computing 1 – Weeks 8, 9 and 10 Laboratory Tasks 11/09/20 2 Aim: The aim of these laboratory tasks is to continue developing your C++ skills within the Microsoft Visual Studio 2019 Integrated Development Environment (IDE). When combined with the tasks that you have completed in your laboratory sessions over the semester, you will have effectively developed the necessary code for a significant portion of the Week 11 Laboratory Test submission. You are strongly recommended to download and familiarize yourself with the Laboratory Test 3 proforma .cpp file which is available on Canvas and start writing a practice solution whilst completing these tasks. These tasks have been designed so that you will also have time to work on your Laboratory Test 3 solution during the Week 10 Laboratory session. So far, we have considered the basics of C++ and now you should have the ability to write simple programs that check user input and then perform basic calculations based on that data. In this series of laboratory tasks you will extend your C++ knowledge by utilising user-defined functions, manipulate arrays using inbuilt functions and begin to use pointers to directly access memory locations. To assist in the development of these laboratory tasks it is strongly recommended that you read Module 4 and 5 of the course textbook as well as the lecture notes. As discussed in the lecture series, arrays, string and pointers are closely related to each other. In summary, an array is a group of variables with the same data-type that the can be accessed via an index or pointer. It is important to remember that once an array is created, it is generally a good idea to initialise the corresponding memory locations to a ‘safe’ value (which is typically 0, zero). This is because the compiler will only provide the memory space for the array and will not automatically initialise it unless it is a global variable. Based on the above concepts, a string can be considered as an array of characters. In this course we consider null-terminated strings, which, as the name suggests is an array of characters with a null- terminator (‘\0’) at the end of the string. It should be noted that the null-terminator value does not necessarily have to be the last value of the array as it is possible for it to be placed in the middle of the defined array if the character string does not use up all the elements in the array. However, it is generally a good idea to place the null-terminator value in all unused elements of the array including the last element if the character string is shorted than the defined array size. Pointers are simply a variable that holds the address of another variable. One method to recall the details of a pointer is to memorise the phrase ‘a pointer points to another variable’. Pointers are essential in high- performance programming languages (such as C++) as they allow direct, efficient and high-speed access to memory locations. Furthermore, pointers are used heavily in the inbuilt C++ functions as it is more efficient to pass parameters using a memory address (pass by reference) than by making a copy (pass by value). Note that many of the concepts relating to pointers will be discussed in the Week 7 to 9 Lectures. To support the Laboratory 3 Test, additional functionality is required from the OUSB-IO Board. In the absence of a physical OUSB-IO Board, you are required to use the provided OUSB-IO Board Simulator which has been made available on the course Canvas website. The OUSB-IO Simulator can be used to simulate the presence of a virtual OUSB-IO Board with PORTB, PINC and ADC 5 functionality using the portb.txt, pinc.txt and p_ADC5.txt files, respectively. The p_ADC5.txt file holds the value of the virtualised Analogue-to-Digital Converter (ADC) for pin 5 that is connected to potentiometer. However, unlike the PORTB and PINC registers (which are 8-bits), the ADC 5 register is a 10-bit register. This means it can hold a value between 0 – 1023, however instead of turning a physical potentiometer to achieve a different value you are required to edit the p_ADC5.txt with a value between 0 – 1023 to simulate the potentiometer value at the ADC 5 pin. EEET2246 – Engineering Computing 1 – Weeks 8, 9 and 10 Laboratory Tasks 11/09/20 3 This laboratory will require you to perform the following tasks: • Investigate the Analogue-to-Digital Converter (ADC) provided on the simulated OUSB-IO Board and manipulate the range of values obtained. • Use advanced program control statements to wait for certain OUSB-IO Board hardware conditions to occur and then perform a specified action. • Perform comparisons within integer arrays to find the largest value in a list or set of given variables. • Use pointers to reverse null-terminated strings and display them on the console window. Furthermore, you should become more familiar with the IDE and how to use its debugging features such as breakpoints and ‘watch’ windows. Doing this will help you understand how pointers work!! During the course of these laboratory tasks you are encouraged to build up your code solutions sequentially (where appropriate) as you move through each task, however you should keep a copy of each solution as a standalone piece of code by using block comment (/* */) to save the solutions for future reference. Remember to use the lecture notes as a reference as well as the prescribed textbook and the OUSB-IO Board reference manual. Tasks Explanation based 1. When writing software to communicate with hardware such as the OUSB-IO Board, we often need to perform multiple read and write operations within the same program. In Laboratory test 2 we considered acquisition of data via the switches (read PINC) as well as displaying the result to the LEDs (writing to PORTB). Both these read and write operations dealt with digital data, where in the case of the switches there are 256 discrete values (0->255) and similarly the LEDs connected to PORTB can display 256 discrete combinations. In the real world, input signals are not always in a digital form and can vary indefinitely. These types of signals are generally known as analogue signals. One method that embedded hardware (such as the OUSB-IO Board) can sample analogue data is via an Analogue-to- Digital Converter (ADC). This is a specialist piece of hardware that is built into the OUSB Board microcontroller. The ADC is capable of digitising signals between 0 and 5V and then returning the results via the OUSB.exe application. To vary the analogue voltage signal present at the ADC input pin number 5, a potentiometer on the board can be rotated. Utilising the OUSB.exe application and the reference manual available on Canvas, determine the minimum and maximum values when the potentiometer is rotated through its entire range. In your report please write the correct ousb.exe command to access the ADC input pin number 5 as well as calculate the maximum and minimum likely voltages that can be generated on the pin by looking at the potentiometer input circuitry. Note you may want to have a look at the OUSB-IO Board schematics to determine this. The schematic can be found on the
Oct 02, 2021EEET2246
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here