-
-
- Basic information, updated May 3, 2004 (Hannu Laine)
-
Advanced C Programming C0018 (CAP01S3)
You have to register to the course using WinhaWille (the web
interface
for students to the student office) (web address: https://www.evitech.fi/winha.
The identification code of the course is C0018 and the implementation
code
is CAP01S3.
The main objectives are, that students will improve their
programming
skills in advanced features of C-programming language as well as that
they
learn system’s programming (device level programming and using
operating
system services in programming). The students will learn to control
computer
hardware and peripherals at different levels: at device interface
level,
at device driver level and at operating system level. Students will
learn
to evaluate, at which level the programming should be made in a
particular
case. The topics discussed and the skills learned are necessary in the
development of embedded systems.
Abstraction tools, learned in the basic programming unit C0002,
are
still applied and deepened troughout the unit. This kind of approach is
of essential importance, when large softwarte projects are concerned.
The
idea is that students will learn to construct entities from different
data
units and manipulate those entities using approriate functions.
Students
will learn to “pack” these entities to modules and libraries. Operating
systems offer services for application programs. This course gives an
introduction
to these services (what kind of services they offer and how they are
used
in programming). Windows operating system is used as an example. All
example
programs are so called console programs, because graphical user
interface
programming is not the topic of this course.
[ General |
Main
topics | Record | Course
material | Exercises |
Teamwork
excercise | Exam
]
General
information
- The course is taught during third and fourth period of the third
year
- The course is 3 cu (corresponding 4.5 ECT)
- Lectures 2 h / week ( 28 hours together)
- Labs 2 h / week (28 hours together)
- One teamwork exercise (estimated effort for student 30 hours)
- Self study (estimated effort for student 30 hours)
Exam at the end of the course (3 hours)
Main topics
The preliminary list of main topics is below.
- Introduction : Hierarcy levels of computer system
- Pointers
- Pointers and arrays (two dimensional arrays)
- Bit-wise operations
- Boolean vs bitlevel information
- Using abstraction at low level (bitwise-operations and memory
addressing)
- Macros with parameters
- Changing interpretation of information
- Functions and function pointers
- I/O-ports and device-registers ( PIT as an example)
- Serial port, a programmer's view
- Programming serial port
- Combining C-language and assembler language
- Examples from previous topic
- Device interrupts and interrupt service routines
- The role of and programming PIC
- Storage classes of variables. Protecting global variables
- Device/File at i/o-library level
- Device/File at operating systen level
- Short introduction to Windows API
- Multitasking, Threads, Signals, Memory management
- Process/thread synchronization
- Device control at Windows API level
- DLL-libraries
- Conclusion
The history of
topics
of lectures
You can find a list of topic titles, which have been discussed so far
on "theory" classes by clicking the following link.
Course
material
- You can print out the handouts from the following links
- Handouts are supplemented with notes during lectures
- Supportive books (there is no course book) 1) In the first part
of the
course some topics are covered in the book: Lawrence H. Miller &
Alexander
E. Quilici : The Joy of C
Part 3
(Abstraction of bit manipulation and memory addressing). Example
program
floates.c
Part 4
(Function pointers).
Part 5
(Using I/O ports).
Part 6
(Integrating C-language and assembly language; Stack frames, calling
conventions
and variable argument lists).
Part 7
(Changing properties of variables; Storage class specifiers, file as an
encapsulation tool etc.).
Exercises
There are about 12 task assignments during the course. Some of
them are voluntary, additional tasks (marked with E, standing for
extra)
Teamwork
Exercise
The You will find the description of the teamwork excercise from
here. It may also include some
instructions and hints
for teamwork. The team
work will be done in teams of two or three persons. One goal of the
work
is to exercise team work and work according the principles of real
project.
Thus it is necessary to divide the work into pieces, which are as
independent
as possible from each other. It is also necessary to compose a
plan
for the project to get it to proceed smoothly. The plan contains at
least
a list of subtasks, the timetable and responsibility chart (who is
responsible
for each task).
More
instructions for project work in this link.
The deliverables of the teamwork are published using NetPro system.
More instructions on that in
this
link .
Exam
The examination is held on
Monday, May 10 at 13.00 in the room
1.127.
At the end of the course the exam will be arranged in which the
understanding
of the topics and the ability to apply that understanding is tested.
The
final grade is based mainly on the exam. The activity in labs and in a
teamwork excercise can have an effect of 20% in final grade (although
all
compulsory lab excercises are required to be completed to get the
course
approved).. The problems to be solved in the exam are similar in
nature to the problems worked out in labs, but they don't give straight
answers to questions in the exam.
Hannu.Laine@Evitech.fi