Notices

  • Interrupt Vector Table

    Posted by Hui Wu Monday 18 September 2017, 08:05:17 PM.

    As I explained in the lecture, you need to initialize the interrupt vector table from Lab 3 onward by placing the interrupt vectors of all the interrupts your program uses in their locations in the interrupt vector table. All the code should be placed after the interrupt table.

    Refer to the sample interrupt vector tables given in the sample code.


  • Labels on PORTL are wrong

    Posted by Hui Wu Monday 18 September 2017, 05:57:00 PM.

    The labels on PORTL are reversed, i.e., PLi is actually PL7-i (i=0, 1, …, 7). The code keypad.asm is correct.

  • Extended Deadline of Lab 3

    Posted by Hui Wu Monday 11 September 2017, 04:48:52 PM.

    Dear All,

    I have extended the deadline of Lab 3 by one week. The mid-semester break is 23 Sep - 2 Oct. Therefore, you have more time for Lab 4.

    Cheers,

    Hui

  • Assignment due this sunday

    Posted by Hui Wu Wednesday 06 September 2017, 11:51:12 AM.

    Don't forget to submit assignment by the deadline.

  • Typos in Lab 3 Specification

    Posted by Hui Wu Sunday 03 September 2017, 04:28:34 PM.

    In the last line of Important Notice of the previous Lab 3 specification, PDX4 and PDx3 should be RDX4 and RDx3. The latest lab specification has fixed the typos.

  • download.bat for 32-bit Windows

    Posted by Hui Wu Sunday 03 September 2017, 01:10:18 PM, last modified Sunday 03 September 2017, 04:01:13 PM.

    If your computer uses 32-bit Windows, you need to change the paths of avrdude.exe and avrdude.conf in the command of download.bat. For example:

    "C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude.exe" -C "C:\Program Files\Arduino\hardware\tools\avr\etc\avrdude.conf" -c wiring -p m2560 -P %1 -b 115200 -U flash:w:%2:i -D

  • AVR Board

    Posted by Hui Wu Thursday 31 August 2017, 05:22:58 PM.

    Dear Students,

    Next week you will be given an AVR board to test your program on it. Due to the limited number of boards and two courses COMP2121 and COMP9032 using the boards, each group will be allocated one board only. You will need to perform the following procedure before working on your lab tasks. Also don’t forget to read “Board Introduction”.

    Make sure the driver is installed in your computer

    Before wiring up the board, you should connect it to the computer using the USB cable and make sure that the board is detected by the computer. You could check this in "Device Manager" (this means the Driver is installed and your board is ok. Also, check the COM port number that you need to program the board). Note that COM port number may change when you reconnect the board.

    If the board is not detected, please try with other USB port in your lab PC.

    If you use your own laptop you should manage to download and install the driver. The driver can be installed by downloading and installing “arduino-1.0.6-windows.exe” file for the AVR Resources tab in Comp2121 website. You can also download the latest Arduino IDE including a USB driver from the link given in the lab specification.

    Wiring up the Board

    Next wire up the board following the connections given in "Test Your Board" under Lab 3. Note that there are two PB0 and PB1 labels on the board. One set represents PORTB bit 0 and bit 1 and the other set represents Push Button 0 and Push Button 1. Also, make sure that all 4 jumpers are connected (if you don't have jumpers you can use wires). You can ask more wires if you need. Double check if your wiring is correct.

    Testing the Board

    Once the wiring is complete, program the board with the given "test.hex" and follow the test procedure (given in separate documents in the lab) and check what does not work. In order to program the board, follow the instruction in "Board Introduction" under Lab 3.

    The "download.bat" script is provided for 64-bit windows if you use 32-bit windows you should change the script and fix the paths. Also, note that, in most cases, you cannot program the board when the motor is working.

    Be aware that most of the boards cannot pass the following 2 tests:

    1.Speaker.

    2. The motor on half speed.

    That is OK, and just tick fail column. All group members should write down their names and zIDs on the test sheet.

  • Lab 3

    Posted by Hui Wu Wednesday 30 August 2017, 08:56:01 PM.

    Dear All,

    I just released Lab 3. You have two weeks to do it. This lab may take a significant amount of time if you still do not have a global picture of interrupts and ports. You are advised to read the lab specification and the relevant material as soon as possible, write most of the code at home. Next week, at the beginning of your lab class, everyone will be given a board.

    If you find any typos/errors, please contact me asap.

    Cheers,

    Hui


  • Video for implementing C functions

    Posted by Hui Wu Wednesday 30 August 2017, 12:40:24 PM, last modified Wednesday 30 August 2017, 12:43:27 PM.

    Dear All,

    Arash has created a video for implementing a C function. This video is for those who still have difficulty in implementing a C function.

    You can find the link to the video under "Labs".

    Cheers,

    Hui

  • Student Experience Survey (SES)

    Posted by Hui Wu Tuesday 29 August 2017, 06:09:46 PM.

    UNSW is participating in the Student Experience Survey (SES). All undergraduate and postgraduate students studying in Australia are invited to participate in this survey.

    The earlier you complete the survey, the more chances you have to win the major weekly prize of $1,000 prepaid VISA gift card! There are heaps of other prizes to be won each week as well! Terms and conditions are here ( http://www.srcentre.com.au/sestcs ).

    The survey is now open and can be accessed at this link: http://www.ses.edu.au/

    Login details should have been sent to your UNSW email address.

    About SES

    The Student Experience Survey (SES) provides current higher education students with the opportunity to talk about their experience of the institution they are enrolled in. The results of this research are used to help UNSW and the government gain insight into students' experiences, and to monitor and improve teaching and learning in Australia.

    The SES is an Australian Government Department of Education and Training initiative which is carried out by The Social Research Centre ( http://www.srcentre.com.au/ses ), forming part of the suite of higher education surveys under Quality Indicators for Learning and Teaching (QILT; https://www.qilt.edu.au/about-this-site/student-experience ). The SES takes place in August of each year.

    Privacy
    The Social Research Centre respects your privacy. Read their full privacy terms ( http://www.srcentre.com.au/research-participants/privacy ).

    Contacts
    If you have any queries, please do not hesitate to contact the Social Research Centre:

    • From within Australia phone: 1800 055 818

    • From outside Australia phone: +61 3 8327 1951

    • Email contact: ses@srcentre.com.au

  • Typo in Task B, Lab 2

    Posted by Hui Wu Monday 28 August 2017, 05:24:46 PM.

    There is a typo in task B, Lab 2. a[n] should be a[n+1]. Thanks Quoc-An for pointing this typo out.

    Cheers,

    Hui

  • Deadline Extension for Lab 2

    Posted by Hui Wu Monday 28 August 2017, 05:01:46 PM.

    Dear All,

    To allow most students to finish all the tasks of Lab 2, I have extended the deadline by one week, i.e., you get get your lab 2 marked next week. Note that the deadline of Lab 3 remains.

    Cheers,

    Hui

  • Homework Three Solutions

    Posted by Hui Wu Saturday 26 August 2017, 11:44:09 AM.

    Dear All,

    Q2 and Q6 should be helpful for Lab 2.

    I have received several emails asking me to debug their code. It appears that some students did not follow the requirements given by the specification. For all the tasks except the first one, you need to create a frame for each function call. It's important that you construct a layout for all the contents stored in a frame, and understand how a frame is created and de-allocated.

    It's time consuming to debug a program. The most efficient way is to check if the logic is correct. Setting a break point and checking the state at the break point is also very helpful.

    I may help you debug your program only you are desperate. Please understand that if everyone asked me to do debugging, It would be a nightmare for me.

    Cheers,

    Hui

  • Typos in Task B of Lab 2

    Posted by Hui Wu Sunday 20 August 2017, 09:45:34 AM.

    Dear All,

    Please download Lab 2 specification again. The previous C program in Task B was not consistent with the description before the C program and there were typos in the power function (return should not be in the for loop). Sorry for the mistakes.

    For Task B, You need to avoid overflow. Notice that the maximum value of an unsigned integer using two bytes is 2^{16}-1=65535, and 3^10=59049. Therefore, the return value of the power function needs two bytes only. However, sum needs three bytes to avoid overflow.

    Cheers,

    Hui

  • Assignment

    Posted by Hui Wu Thursday 17 August 2017, 03:28:23 PM.

    Dear All,

    In this assignment, you will work alone and write a report about the ISA of an ARM microprocessor. The due date is 10 Sept. For the interrupt part, you need to wait for me to finish it by Week 6. You may start writing the other parts.

    Cheers,

    Hui

  • Lab 2

    Posted by Hui Wu Tuesday 15 August 2017, 02:16:31 PM.

    Dear All,

    I have released Lab 2. The deadline is Week 6. If you find any errors/typos, please let me know.

    Cheers,

    Hui

  • The origin of data segment

    Posted by Hui Wu Monday 14 August 2017, 06:13:15 PM.

    The origin of the data should be set to at least 0x200. The default value for ATmega2560 is 0x200. The upper part before 0x200 is used by general registers, I/O registers and ports.

    Cheers,

    Hui


  • Change of Lab Class

    Posted by Hui Wu Monday 14 August 2017, 05:43:33 PM.

    Dear All,

    In general, You are now allowed to change you lab class. However, if you have a special reason, you must contact the course admin Arash for approval. Thanks.

    Hui


  • Some mistakes at the beginning of today's lecture

    Posted by Hui Wu Monday 07 August 2017, 07:52:32 PM.

    After having had a flu for several days, I was completely out of condition at the beginning of today's lecture. When I talked out data memory and program memory, the correct statements should be:

    1. Data memory consists of SRAM, and thus is volatile.

    2. Program memory consists of FLASH, and thus can store constants and code permanently.

    Sorry for the mistakes.

    Hui

  • A typo in Task B, Lab 1

    Posted by Hui Wu Monday 07 August 2017, 12:38:50 PM.

    The code for Task B has a typo. for(i=0;i<5;i++) should be for(i=0;i<=5;i++). I have fixed the typo.

    Hui

  • Homework Two Solutions Available

    Posted by Hui Wu Saturday 05 August 2017, 03:40:26 PM.

    Hi Guys,

    Debugging the assembly code took much more time than I expected. I have simulated all the assembly programs for the first three questions. The sample assembly programs for the first three questions should be enough for the beginners to complete Lab 1.

    For students who are not familiar with Hexadecimal numbers, the following link is useful: http://www.binaryhexconverter.com/hex-to-decimal-converter .

    I have to take a rest and will release the solutions to Homework One tomorrow morning.

    Have a good weekend,

    Hui

  • Testing your programs

    Posted by Hui Wu Friday 04 August 2017, 05:51:17 PM.

    The course admin Arash has found two good links for testing your GCD and matrix product programs:

    Testing matrix multiplication:

    http://www.calcul.com/show/calculator/matrix-multiplication

    Testing greatest common divisor GDC:

    http://www.alcula.com/calculators/math/gcd/

    These two links should be very helpful for verifying your programs.

    Cheers,

    Hui

  • Homework Two

    Posted by Hui Wu Friday 04 August 2017, 02:24:38 PM.

    Hi Guys,

    In order to help you do the first lab, I designed the questions catered for it. I will release the solutions no later than tomorrow morning. Sorry for the delay. The worst flu completely disordered my schedule.

    Hui

  • Delay of Consultation

    Posted by Hui Wu Friday 04 August 2017, 11:17:21 AM.

    Hi Guys,

    I'm still in bad condition and thus have to delay the consultation to 9:00am - 12:00pm next Tuesday.

    Hui

  • AVR Studio on Linux

    Posted by Hui Wu Wednesday 02 August 2017, 06:15:39 PM.

    AVR Studio is designed for Windows. However, people found ways of running it on linux. I don't have any experience using AVR Studio on linux.

    Here is a good link https://www.scribd.com/document/79457367/AVR-Studio-on-Linux for using AVR Studio on linux.

    Hui

  • Change of Consultation Time

    Posted by Hui Wu Wednesday 02 August 2017, 06:11:43 PM, last modified Wednesday 02 August 2017, 06:27:31 PM.

    Hi Guys,

    I was knocked down by a severe flu and thus will not be available for consultation tomorrow. I will come to uni for consultation this Friday if I get better. I will keep you informed.

    Hui

  • Lab 1 (must read)

    Posted by Hui Wu Tuesday 01 August 2017, 02:44:58 PM, last modified Tuesday 08 August 2017, 08:04:27 AM.

    Lab 1 is available now. For all the labs, you will form a group with another student. If you have any problems in forming a group, contact a lab tutor. If your problem is still not resolved, contact the course Admin Arash. You can see the names of all the tutors by clicking on Timetable in the left pane of the course homepage.

    The lab time is not enough. Please write most of your code before attending each lab.

    There will be no deadline extension for each lab. If you have special reasons, contact me for approval. In case your program cannot be marked in time,contact a lab tutor, keep your program intact, and get it marked next week.

    Things you need to do:

    1. Download the latest AVR Studio via the link given at the beginning of Introduction to AVR Studio which is under "Labs" in the left pane of the course homepage.

    2. Read Introduction to AVR Studio to understand how to use it to debug and simulate an AVR assembly problem.

    3. Read the lab specification. Notice that there is an optional task. If you complete the optional task, you will get bonus marks. Do the optional task only if you finish or the compulsory tasks.

    Key technical points about first lab:

    1. How to store a multi-byte number or string in the data memory? You need to use either little endian order or big endian order. How a multi-byte number or a string is stored in the program memory by AVR Studio? You will know the answer if you write a sample program defining a string constant and a word constant, and view how they stored.

    2. When performing an addition or a subtraction on two number with different sizes, how to sign-extend the shorter number?

    3. Which branch instructions should be used for signed numbers, and which branch instructions should be used for unsigned number?

    4. How a pointer register should change when an array is accessed?

    Cheers,

    Hui

  • Self-study material

    Posted by Hui Wu Monday 31 July 2017, 05:28:22 PM.

    As I explained in the lectures, my lectures are a bit out of order due to the lab schedule. I have added the lecture slides on number systems, instruction formats and addressing modes for self-study, to Week 2. I will teach number systems in Week 10. You don't need to read the part about floating point numbers. For the students who are not familiar with the number systems, you may read the part about number conversions and sign extension.

    Cheers,

    Hui

  • Homework One

    Posted by Hui Wu Thursday 27 July 2017, 12:17:45 PM.

    Homework One is available now. Please try your best to answer all the questions. I will post solutions next week.

    Cheers,

    Hui

  • Moodle or Webcms3

    Posted by Hui Wu Tuesday 25 July 2017, 03:50:53 PM.

    So far only one third of students have responded. I need more input to make a good decision. Please make a choice. Thanks

    How to do it? Click on "Activities" in the left pane, click on "Moodle or Webcms3", and make a choice.

    Hui

  • Lecture recordings are now avaliable

    Posted by Hui Wu Tuesday 25 July 2017, 03:26:15 PM.

    Click on "Lecture Recordings" in the left pane, and sign on Moodle using your zPass.

    Hui

  • Lecture Recording Problem Still Unresolved

    Posted by Hui Wu Tuesday 25 July 2017, 10:55:37 AM.

    I have contacted CSE Student Office about the problem. I will inform you once the problem is resolved. Apologies to Web Stream students for the delay!

    Lecture recording is done automatically, and is processed by the ECHO team. After processing it, they send the lecturer an link to the recording. So, I'm quite passive.

    Hui

  • Different lecture room for Tuesday's lecture

    Posted by Hui Wu Tuesday 25 July 2017, 10:50:34 AM.

    We are in Colombo Theatre A today. It is inside Colombo House (B16) beside High Street and neighbors Goldstein Hall (D16). When you get there, go to the entrance facing Fig Tree Lane, not the one facing High Street. A detailed map is here:

    http://fmtoolbox.unsw.edu.au/comms/KensingtonCampus.pdf

    Cheers,

    Hui

  • First Lab

    Posted by Hui Wu Monday 24 July 2017, 10:12:15 PM.

    The first Lab will start in Week 3, and the lab is ElecEng233 inside EE building, right above the main entrance of EE building.

    Cheers,

    Hui

  • Lecture Recording

    Posted by Hui Wu Monday 24 July 2017, 10:09:29 PM.

    So far I have not received any email about the lecture recording for today's lecture. Once it is available, I will send you an email about where to watch the lecture recordings.

    Cheers,

    Hui

  • Poll for Moodle or Webcms3

    Posted by Hui Wu Monday 24 July 2017, 10:02:52 PM.

    A student suggested we use Moodle for our course website. I just set up a poll. Please click on Activities in the left pane, click on "Moodle or Webcms3", and make a choice. I will move our home to Moodle if the majority of students select Moodle. Thanks.

    Hui

  • Welcome Message

    Posted by Hui Wu Friday 21 July 2017, 03:01:17 PM.

    Dear COMP2121 Students,

    Welcome to COMP2121! Please read the course outline. See you next Monday.


Back to top

COMP2121 17s2 (Microprocessors and Interfacing) is powered by WebCMS3
CRICOS Provider No. 00098G