Microcontrollers project resource page - FILS
Documentation
- The microcontroller and its resources (note:
most part of this documentation is covered in-depth during the course
sessions).
The test software for AtMega164-20MHz, with multiple
purpose:
- it is already programmed in the processor you received, so it allows you
to test the board after assembly: the functionality of the clock, LED, switch, and
serial port; you can re-load the .HEX file at any time using the PC-loader.
- by examining the source, see how to access the peripherals (one input pin, one output pin,
the serial port, the timers) and how the various registers are initialized.
- it enables you to learn how use the CVAVR IDE and compiler; you receive a functional
project as an example, and you can examine, modify and recompile it.
The quickest way to start your own project is
to base it on this test project. Prior basic knowledge of C is assumed.
For those with no C background, some elements of C are also taught during the course sessions.
Explanations for the test
software
The PC-loader (AVR Buster) for loading a .HEX file
in the processor's FLASH, using the serial connection. You need to press and hold
the switch on the board while powering on, this will invoke the Boot Loader
which resides in the chip's Flash, and which is responsible with communicating
with the PC Loader program.
Driver for the USB-TTL serial converter CH340G I provide for working on your own laptop
(if not installed automatically upon plug-in)
- Free simulator: SimulIDE.
You can load the AVR .hex code in this simulator and test almost every aspect
of the project, however it is not in real-time.
- Frequently Asked Questions
For Romanian-speaking students: you should use the
Romanian documentation page
because it slightly newer and contains some updates. The documentation
on the Romanian page is the same, however the grading, project list and
requirements are different !
Project list
The list of projects for 2024 is here.
The procedure for choosing a project is as follows:
Project report
Each team must create the documentation/report for the project as a website
(hosting is done on matrix.elcom.pub.ro; access details are only given during
the lab session). You
may use any program generating HTML, even Microsoft Word using Save As HTML,
or even write HTML by hand. Since this is not a Web Design class,
I will not grade you according to the "aesthetics" of the page,
but only based on its technical content.
The website must contain the following sections, clearly separated:
- Section "Hardware Description": it will contain:
- the schematics (draw them
in any electronics CAD program (i.e. Orcad, Eagle,...) and export the result as GIF/PNG so it is
viewable on your site). The schematics must correspond exactly to your board,
so you draw all components and connections that exist, but no more. For instance,
you should omit the ISP programming header if it does not exist on your board.
- the bill of materials (components list in tabular form,
as in this example). It must contain
all components, either provided by me or by yourself.
- some photos of your board (newer photos do not
replace older ones, but are added as you add more components to the board)
- a textual description of any hardware features that were not already present
in the common part of the project (uP, serial port, power supply) and that you
added yourself, including I/O: sensors, LEDs, display, switches, etc.
- Section "Software description": you will not publish code, but you will
describe how the software works, and what resources it uses (ports, memory, timers,
interrupts...). Note: the code will be available for download as a .ZIP archive
only for the last session.
- Section "Results and Conclusions": describe here
how you solved any specific issues, what the final functionality is, etc.
- Section "Bibliography"
Instructions for uploading your web site to the server:
- you need to use FileZilla (or
equivalent) and select "SFTP - SSH File Transfer Protocol" as protocol;
the port number is not 22, it is given in class. Using simple FTP will not work.
- all files for the site MUST be in a folder called
public_html, located in
the home directory of your account. Using any other name will not work.
Thus, you
must create the folder public_html on your home machine, save the website into
it, and then upload the folder with all its contents.
- the main (or only) HTML file, which is loaded by default when your
site is opened in the browser, MUST be caled index.html or
index.htm
- lowercase is not the same as uppercase; take care of the case especially when linking
to photos and
uploading them; photo1.jpg and photo1.JPG are not the same! Also, it is not
recommended to
have spaces in your file names.
- assuming your user account is F07, your site will be visible at
matrix.elcom.pub.ro/~F07 (note the ~ sign which signifies "the user's personal
web page contained in his home directory"). So, in order to have on the
website a document visibile as matrix.elcom.pub.ro/~F07/somefolder/image.jpg, you should
save it in the folder public_html/somefolder/image.jpg, and then upload the
public_html folder and all it contents in the home directory (folder)
of the F07 user account (which is the only folder in which you have writing
permissions, anyway).
- if you have basic Linux knowledge, you can use putty under windows (or any other ssh client - use the same port as for SFTP, not standard port 22!)
to access your account in a terminal; for instance, to change your password, login via
ssh, then issue the command "passwd"; you will be asked for the old and new
password. You may use "mc" (Midnight Commander, which
looks similar to Windows Commander/Total Commander/Norton Commander) for file
management, if needed, i.e. to inspect your files and even modify them without
uploading the whole site.
Grading
Your grade is composed of the following:
- 30p - written exam (with prof. M. Udrea)
- 5p - no later than week 6 - finished board with the blinking LED
the quality of the soldering is included.
- 10p - no later than week 8 -
the functional serial port (dispaying char+1 upon reception of a character);
demonstration of the serial TTL transmission on the oscilloscope: you show me
the 10 bits of a character on-screen, in real time, and explain the correspondence
of the bits to the ASCII code (binary and decimal) of the transmitted character
- 10p - no later than week 10 - following modifications of the test software, uploaded and working on
your own board:
- add to the version number your team number, in the message printed upon
reception of the "?" character
- instead of 2 frequencies, the LED should blink at 3 different frequencies
of your choosing, upon successive keypresses.
These intermediate steps demonstrate you are able to use the compiler, you understand the
test software, and you can use the PC Loader to load a new .HEX file on your
board. The points for the first steps will
be permanently lost after week 12.
The final session is during weeks 13+14 or, by extension, on the day of the written exam.
It is highly recommended that at least some of you come in W13+14 or else it will be crowded and there will be a long
wait on the day of the exam. You will
show me the next 3 steps:
- 15p - project report (website)
- 15p - functional demonstration of the specific part, mandatory for a passing grade.
You must have a working
board which shows at least some of the functionality of your specific project.
You will fail the class if your board does nothing or only the common part.
- 15p - answers
to questions regarding your schematic (from your website)
and source code, during the final
session. Note that you will get no points by showing me a project copied
from the Internet (or done by someone else, including your team partner)
that you can't explain to me.
You will not explain the project to me from start to end, instead I
will ask specific questions:
- how and why you chose a specific electronic part and why you connected
it in a certain way,
- what is the purpose of a certain variable or constant (created by yourself),
- why you use a certain numeric value (chosen by you, appearing in your
source code) instead of another,
- where exactly in the source there is a specific function, etc.
This part of the grade is per
student, nor per team. It is acceptable to look for similar projects on the
Internet, but only as reference; I assume everything you show me is done by
yourself, so if it's not, it must, at least, be fully understood.
I will look at your site and source code during the final session. You will
either bring the source code on a USB stick, or download it from your site
(you can upload it in a .zip archive prior to coming to the last session), or
show it to me on a laptop (running CodeVision).
Grades for 2024
Note1:In case of failing the class (less than 50p in
total), only the written exam can be repeated during
the autumn session. According to the regulations of "Politehnica"
University, the lab/project is considered "work performed during the term"
and can only be repeated by repeating the whole class next year. You have many
opportunities to show me parts of your
project (and have your questions answered) during the lab sessions and also on
the date of the final exam. After the common part is finished (roughly at the
middle of the semester), you can come to show me the intermediate steps or ask
questions each week, not only every 2 weeks.
Note2: I will not be too harsh in the case of
mistakes which are natural in this stage of learning (even if some component is
burned out, you will be able to
replace it) or if your project does less than intended, or you have some
unsolved bugs. However, bringing someone else's project, or no project at all,
will not be tolerated.
Note3: During the course lectures, a significant
amount of material covered in the above documentation is explained in-depth
(processor-specific: ports, interrupts, timers, memory management...);
also, you get the chance of having
your questions answered. If you choose to miss lectures, you will have to
read the docs by yourself (and maybe search for additional resources on
the Internet). If all students decide to miss a certain lecture, the
respective material will still be assumed to be known.
The lab sessions are for working on the project, not for giving lectures.