ENEX 20001 2018/T2
Assignment 2 Hardware Tasks
Due date: | Friday of Week 7(31st Aug 2018), 23:55hrs. | ASSESSMENT |
Weighting: | 20% of unit final mark | 2 |
Length: Submission |
N/A Online as a single word file |
Note: All programs should associate with appropriate flowcharts and comments, marks will be
given to the explanations of your algorithms and program. You can attach screenshots of running
program as well. All these questions are based on the CQU PIC Development kit. You should use
CQU_LCD_Ver2.h or CQU_LCDVer3.h without any modification to them. Your own header files for
the LCD display are not allowed for this assessment.
All answers should be developed in MCC18 C compiler under MPLAB X. No Assembly language sub
routings are allowed.
Q1. (20marks)
(a) Write a program to turn the LEDs ON in the following sequence D3D4D5D6 and
then turn them OFF in the following sequence D6D5D4D3. This should loop
infinitely. You should incorporate appropriate delay to make sure that it runs smoothly
and a human eye can clearly see it.
(b) Write a program to run a DC motor connected to pins 1A and 1B in CW direction and
reverse it when SW2 is pressed.
Q2. (20marks)
Write a program to display (on 7-segment) continuous up-counting numbers from 00 to 25
and then down-counting from 25 to 00 (in decimal system). There should be a sufficient dely
between two number display status where a human can read them. This should loop
infinitely.
Q3. (30marks)
Write a program to read analog input from RA1 when SW5 is pressed and display the
following messages on the LCD panel. “input is <= 2V” , “input is < =4V & > 2V”, “input is >
4V” depending on the actual real-time analog input. (if the message goes over the first row
display area, it should display on second line)
(To testing your program : Use a 10kΩ potentiometer in the following configuration to
provide the analog input. Use any of the GND pins in P2 as ground connection and the
single female scocket next to PICkit3 connector as +5V and connect the mid pin of pot to
RA1.)
Q4. (30marks)
Write a program to display whatever you type on your computer key board(through
TeraTerm) on the LCD display and display the message “Hellow from CQU PIC Development
Board” on TeraTerm terminal emulator on your Windows computer when you press switch
S2. (you need to connect your PIC development board to your computer via USB to serial
cable and configure TeraTerm appropriately for this. Use baud rate of 4800bps)
( 100% of marks is equal to 20% of unit total)
Assessment criteria:
This assignment is based on C language programming skills and PIC18F4321 programming skills. To
obtain full marks students must provide all in detail problem solving and solution development
evidences. Each student must have their unique programs developed by themselves. Answer to every
problem should include a flowchart / NS-diagram or other similar graphical representation of the
solution. You are welcome to include screen shots/clear photos of running programs. You need to
include the complete code for every question. A clean working program as the answer to a question
without evidence of development of it (ex: a soft copy of workbook pages relevant to it) will receive a
maximum of 50% of the allocated marks for that question.
Submission instructions:
Develop your program to solve the problem in each question. When they run successfully, copy the
entire program to your answer script in MS WORD. Then close your project and open a new project.
Copy your listing from the answer script(WORD document) and paste it into the new project’s main c
file. Build the project and run it to check whether it runs smoothly. If it does not run now, it will not
run on marker’s computer as that is what the marker does. ( Hint: When you first copy from project
to WORD document, WORD may auto correct some spelling, capitalize initial words, etc. which will
prevent your answer from running successfully in the marker’s computer when copy and pasted into
a new project. The above exercise will highlight you if there are any such things done by WORD Auto
correct feature and you are on can correct them before submitting. The marker will not try to correct
them and any submitted program with compilation errors will receive very low marks)
GND +5V
Analog input
The post All programs should associate appeared first on My Assignment Tutor.
-
- Assignment status: Resolved by our Writing Team
- Source@PrimeWritersBay.com
Comments
Post a Comment