Project demonstration and documentation marks have been uploaded. Please check your marks.
Dear All,
I have added solutions to some sample questions given in the lecture notes for Week 9 and uploaded the new lecture notes with solutions. As you may know, there are some errors, mostly in registers of ldi. I have fixed all the errors.
Also a reminder that I will be available for consultation tomorrow.
Cheers,
Hui
Dear All,
In addition to the usual consultation time ( 2-5pm Friday), I will be available for consultation next Monday. The time and venue:
9:00-12:00, 13:00-17:00 at K17-508 Consultation room.
The room is the small one on level 5 of K17 beside the lift. If I'm not there, call me on ext 56572 using the phone on the wall near the lift.
If you have any questions during this weekend, post your questions to the course forum or email them to me.
Cheers,
Hui
A wireless mouse and a Dell battery bank was left in the project marking venue. The owners please contact me to get the items back.
This is a reminder that the project demonstration is to be done tomorrow (Friday, 16 Aug). The venue is K-K15-151-OMB151 in the Old Main Building 151 . The timeslot you booked can be viewed here .
Dear All,
During the demonstration, your tutor will ask you to explain what contribution in terms of percentage each group member has made and ask each member to explain how your part works.
In the design manual and user manual, you also need to give the contribution of each group member at the beginning of each document in terms of percentage.
Cheers,
Hui
Dear All,
The deadline of document submission is the midnight of this Sunday. Each group submits only one copy. Please write the names and student numbers of both students at the beginning of each file.
Cheers,
Hui
Dear All,
Some of the boards may have an issue where supplying a PWM signal to the motor causes the board to reset, or freeze. To fix this, connect the MOT pin to the POT pin, then remove the right-most isolation jumper above the potentiometer and connect your PWM pin (PE2) to the rightmost jumper pin. Turning the potentiometer will then introduce a resistance in series with the motor, and it should be possible to find a position where the motor spins but does not crash the board. You may not be able to reach 100rps with this configuration. Do not lose the PE2 jumper.
Cheers,
Hui
1. If you have not yet booked a time for project demonstration, please do so before 14th Wednesday (tomorrow) 11.55 pm using the link https://doodle.com/poll/vp2ysycynb85sqyn . The booking link will close at that time. Note that :
2. If any students have an officially authorised extension for lab 5 (eg: a disability support letter) and wish to get marked on this Friday (16th), please email me.
3. The project demonstration (Friday, 16 Aug) venue is K-K15-151-OMB151 in the Old Main Building 151 . Pay attention to the following instructions.
Dear All,
Since the demo will be held this Friday, I have changed the consultation time to 2-5pm tomorrow (Wed).
Cheers,
Hui
Dear All,
If you have not filled up the survey forms, could you do it by this Friday? The link is https://unsw.bluera.com/unsw/ .
Many thanks.
Hui
Dear All,
If your interrupt handlers look correct, but the motor speed is not displayed correctly, check if the external interrupt used is correctly configured as falling-edge triggered.
Cheers,
Hui
Dear All,
There will be no lecture this week. I will have more consultation time. Specifically, in addition to the normal consultation time on Friday, I will be available for consultation during the lecture time scheduled: 4-6pm Wed and 12-2pm Thu. The venue is my office.
Cheers,
Hui
Dear All,
How to measure motor speed:
1. Connect OpE to a port pin and configure this pin as output. And write 1 to this pin to enable the infrared light detector.
2. Connect OpO (the output of infrared light detector) to an external interrupt, say EXT0, configure it as falling edge-trigger, and enable the interrupt.
3. Write an interrupt handler for that external interrupt. In the interrupt handler, use a counter to counts occurrences of the interrupt. The value of the counter divided by 4 ( four holes per revolution ) after each second give the motor speed in terms of revolutions per second.
Cheers,
Hui
The bookings for the project demonstration on Friday, 16 Aug. are open. Select a slot from the link at the end. Please pay attention to following instructions before booking your slots.
- Only one student from each group should make a booking.
- Put your ZID (and your name inside brackets) as the participant name.
- This is a hidden poll, so note down the slot you selected so you will not forget.
- If you want to view/edit your option later make sure you signup and login to Doodle before selection.
The bookings for the project demonstration on Friday, 16 Aug. are open. Select a slot from the link at the end. Please pay attention to following instructions before booking your slots.
- Only one student from each group should make a booking.
- Put your ZID (and your name inside brackets) as the participant name.
- This is a hidden poll, so note down the slot you selected so you will not forget.
- If you want to view/edit your option later make sure you signup and login to Doodle before selection.
Dear All,
The summary of AVR Instructions given at the end of exam paper is the one in http://www.cse.unsw.edu.au/~cs2121/AVR/AVR-Instruction-Set.pdf , pages 11-14.
Cheers,
Hui
Dear All,
As I said yesterday, in the last lecture today, I will go through the major contents we have learned and talk about final exam.
Cheers,
Hui
Dear All,
Lab 5 is available. Note that you have only one week (Week 10) to do Lab 5. So please start working on it as soon as possible. You need the results of Lab 5 for the project.
Best,
Hui
Dear All,
On page 13 of the lecture slides for number systems, notations were not consistent (both a and b were used). I have fixed the issue. Sorry for the typos.
Cheers,
Hui
Dear All,
I have released Lab 4 and project. In the second half of the lecture today, I went through them. Please finish Lab 4 as soon as possible and then work on project.
You need to work in a group of two students in the project. Your project mate can be your lab partner, or you can find another student for project. If you cannot find a project mate, contact Hasindu.
Cheers,
Hui
Dear All,
If you are still having difficulty in Task B, read this post and my reply https://webcms3.cse.unsw.edu.au/COMP2121/19T2/forums/2729962 .
Cheers,
Hui
Dear All,
I'm not available for consultation this afternoon due to an unexpected schedule. I will be available for consultation next Monday afternoon. My apologies!
Best
Hui
Dear All,
To help you test the board and download a program onto the board, we have prepared a video. The video is located under Lab 3 with a title "AVR board demo video". The video file has 1G+ bytes.
Cheers,
Huu
Dear All,
One more cycle is required to make one millisecond in the previous solution. I have added one "nop" instruction to the previous program. Sorry for the mistake.
Hui
Dear All,
Overflow may occur when doing the multiplication result*x and doing addition result*x+poly[i]. For the former, you cannot use the overflow flag. For the latter, brvs can be used.
A straightforward way for checking if there is an overflow for result*x is as follows:
1. Compute |result|*|x|, where |x| is the absolute value of x.
2. Check the byte 2 (most significant byte) of the result of |result|*|x|. If it contains a non-zero value, overflows occurs.
Cheers,
Hui
Dear All,
I want to clarify a few points:
1. For Task A and Task B, you don't need to use any fame.
2. For Task A, use .equ to define value for each input. For example,
.equ dividend=35210
.equ divisor=450
3. The overflow flag V is in SREG. If an overflow occurs, S is set 1 by the corresponding arithmetic or logical instruction; otherwise, V is cleared (V=0).
Use brvs or brvc to check whether an overflow occurs or not.
Cheers,
Hui
Dear All,
I just attended the Turing Lecture given by Geoffrey Hinton and Yann LeCun who received the 2018 ACM A.M. Turing Award with Yoshua Bengio for conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing. The link for the talks is here
https://fcrc.acm.org/turing-lecture-at-fcrc-2019
.
Although it is not relevant to any course material in this course, some students might find it inspiring.
I will be back this Wed to give the lecture in time.
Best,
Hui
Dear All,
Lab 2 is available. You may need a significant amount of time to complete it. Please start working on it as soon as possible.
Cheers,
Hui
Dear Students,
In the examples of assembly programs in the lecture notes, the origin of the data segment is set 0x100. However, for the AVR 2560 Microcontroller used on our board, the origin should be set to 0x200 as follows:
.dseg
.orgin 0x200
...
Cheers,
Hui
Dear All,
The lecture recordings are now available on the Moodle course website. Click on "Lecture Recording" in the left pane and you will be directed to the Moodle site. After you sign in, find the following:
There are three parts. Click on each link, you will find the lecture recording. To watch the video in full screen, click on the square symbol at the bottom right corner of video window.
Those recordings are taken from 18s2 when I taught COMP2121. The contents are exactly the same. After watching these three videos, you should be able to write AVR assembly programs for the first lab.
Best,
Hui
Dear All,
I'm working on the access permission issue. It seems that I don't have control. I have to ask Moodle people to help resolve this issue.
Once the issue resolves, I will make an announcement.
Best,
Hui
Dear All,
Previously I uploaded wrong videos. The two videos should be from 18s2 when I taught this course. I just uploaded the correct videos. Sorry for the mistake.
Best,
Hui
Dear All,
I have added two lecture videos for today's lecture. To view the lecture videos, click on "Lecture Video" in the left pane, which directs you to the course site on Moodle. After you sign on, you will see the following:
Engineering
There are two lecture recordings: Lecture Video 1 and Lecture Video 2, and these two lecture videos are taken from 18s2 when I taught this course. The contents are the same.
My apologies again for missing the lecture today.
Best,
Hui
Dear All,
Lab starts next week. Lab 1 specification is available now. Click on Labs in the left pane, then you will find it. For the first two labs, you will use AVR Studio to write your assembly code and simulate it. Please download and install it on your machine. A short introduction to AVR Studio and a link for downloading it are given in a pdf file with the title "Getting started" on the lab page.
Unfortunately, AVR Studio can only be run on Windows. For students who do not use Windows, please read Flashing the board on non-Windows systems for instructions and tips about how to run AVR Studio on non-windows environments.
at the beginning of the lab page, you can find other AVR resources.
For all the labs you will work with a partner. So you need to find a partner in the first lab next week and form a group with your partner. A tutor will explain what to do about grouping at the beginning of the first lab. If you are unable to find a partner, as a lab tutor to help.
Please ensure that two members of each group contribute roughly equally. Once you finish a task, ask a lab tutor to mark your program. Your tutor will ask you to explain your code with some questions. It's recommended that both members take turns to demonstrate your programs. For example, one student demonstrates Task A and the other student does Task B and so on.
Best,
Hui
Dear All,
For the first time in my teaching career, I got the lecture time wrong today. When I walked into the lecture room at 1:52pm, one student told me that you had waited for me and I was shocked.
I will prepare a lecture video for today's lecture by tomorrow and inform you once it's available. My sincere apologies again.
Hui
Dear All,
The lecture recording of the first lecture this afternoon is available. Please click on "Lecture Recordings" in the left pane, and then you will be directed to the course website on Moodle. Once you sign onto Moodle, you will see the following:
Click on Lecture Recordings, and it will lead you to a page that hosts all the lecture recordings.
Cheers,
Hui
Dear COMP2121 Students,
Welcome to COMP2121!
The url of COMP2121 is https://webcms3.cse.unsw.edu.au/COMP2121/19T2/ . Please bookmark it.
Please read the course outline.
Each lecture will be recorded and the lecture recording will be available the next day on the Moodle website. There will be a link named Lecture Recordings in the left pane and this link will lead you to the Moodle course website for lecture recordings.
All the course contents are on this website and the Moodle website only hosts lecture recordings.
See you all next week.
Cheers,
Hui Wu