**Course Title** : C Programming and Embedded Systems
**Course Number** : CMPE 311
**Credits**: 3.00
**Description**:
**Prequisite ** : CMPE310
**Instructor**
Dr. Ryan Robucci
Assistant Professor
Email: robucci@umbc.edu
Department of Computer Science and Electrical Engineering
University of Maryland Baltimore County
1000 Hilltop Circle
Baltimore, MD, 21250
Office: ITE 319 Office Hours: TBD
Phone: 410-455-3549
** Meeting Time Lecture** MW 1:00-2:15 Interdisciplinary Life S 230
** Discussions Sessions** MW 2:30pm - 3:15pm in ITE375
** Teaching Assistants and Graders ** : **TA**: Mozhgan Navardi - umbc email: jt25694
**Syllabus** : PDF



Calendar

| Date | Event / Lecture Material | Reading and Reference Material | |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------| | Jan 31 | **Lecture** 0 Course introduction [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/Lecture00__Introduction/Lecture00__Introduction.html) | -- | | Feb 2 | **Lecture** 1 CH1 [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/Lecture01-ch1_and_prerequisite_review/Lecture01-ch1_and_prerequisite_review.html) | -- | | Feb 7 | **Lecture** 2 AVR Arch. [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L02-AVR_Archetecture/) | -- | | Feb 9 | **Lecture** 3 AVR Ports [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L03-AVR_Ports/) | -- | | | **Lecture** 4 AVR CPU Registers [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L04-AVR_CPU_Registers/) | -- | | | **Lecture** 5 AVR Addressing Modes [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L05-AVR_Addressing_Modes/) | -- | | | **Lecture** 6 AVR More Assembly [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L06-AVR_More_Assembly/) | -- | | | **Lecture** C Basics [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_c_basics/) | -- | | Feb 23 | **Lecture** C Functions, Spearate Compilation, Macros [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Functions_Separate_Compilation_Macros) | -- | | Feb 28 | **Lecture** C Arrays [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Arrays) | -- | | | **Lecture** C Type Casting [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Type_Casting) | -- | | | **Lecture** C Srings and Char [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Strings) | -- | | | **Lecture** C Pointer Variables [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Pointer_Variables) | -- | | | **Lecture** C Struct Union [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Struct_Union) | -- | | | **Lecture** C Pointers and Arrays [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Pointers_and_Arrays) | -- | | | **Lecture** C Advanced_Pointers [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_C_Advanced_Pointers) | -- | | | **Lecture** C Final [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_Final_C) | -- | | | **Lecture** Interrupts [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/Interrupts) | -- | | | https://www.csee.umbc.edu/~alnel1/cmpe311/notes/MemoryRelatedPitfalls.pdf | -- | | | **Lecture** Timers and Counters [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/Timers_and_Counters) | -- | | | **Lecture** RTOS [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_RTOS) | -- | | | **Lecture** Tasks [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_Tasks) | -- | | | **Lecture** Integers and Arithmetic [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_Integers_and_Arithmetic) | -- | | | **Lecture** Data Converters [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_Data_Converters) | | https://editor.p5js.org/robucci/full/gAxRREU12 | -- | | | https://umbc.edu/jh/user/robucci/notebooks/aliasing_fence.ipynb | -- | | | **Lecture** Communications [notes](https://eclipse.umbc.edu/robucci/cmpe311/Lectures/L_Communications)

Provided Materials

ATMEGA169P Microcontroller

ATmega169P Datasheet
Instruction Set Summary on Page 377 of Datasheet PDF
AVR ASM Include File
  • change .equ format,
    example:
      .equ SRAM_START = 0x0100
      should become
      .equ SRAM_START , 0x0100
  • repace .def with #define,
    example:
      .def tempReg = r16
      should become
      #define tempReg r16
  • Untested, partially converted include file
      m169pdef_untested.inc
      , used sed 's/\.equ\(.*\)=\(.*\)/.equ\1,\2/g' m169pdef.inc | sed 's/\.def\(.*\)=\(.*\)/#define \1 \2/g' > m169pdef_untested.inc

SNAP Hardware In-Circuit Debugger

Discussion

| Discussion | Materials | |------------ | -- | | Session 0 IDE | [Tools,IDE, Debugging, Simulator](.//Discussions/Discussion00/) | | Session 1 | Finish Debugging using IDE (memory/register inspection, breakpoints, code stepping) and Simulator with I/O access and manipulation (discussion on state machines moved to lecture) | | Session 2 | [In-Circuit Debugger](./Discussions/discussion02/) | | Session 3 | [UART](./Discussions/discussion03/),[uart.s](uart.s)| | Session 4 | [C,Piezo,UART](./Discussions/discussion04/)| | Session 5 | [Memory Spaces, Using LCD, Debugging mdb/gdb](./Discussions/discussion05/)| | Session 6 | [Dynamic Memory Allocation for Data Struct, GDB, Valgrind ](./Discussions/discussion06/)| | Session 7 | [AVR Interupts](./Discussions/discussion07/)| | ^ | https://www.csee.umbc.edu/~alnel1/cmpe311/notes/MemoryRelatedPitfalls.pdf | -- | | ^ | [PinChangeInterrupt.c](./Discussions/discussion07/attachments/PinChangeInterrupt.c)| | ^ | [U0_LCD_Driver.c](./Discussions/discussion07/attachments/U0_LCD_Driver.c)| | ^ | [U0_LCD_Driver.h](./Discussions/discussion07/attachments/U0_LCD_Driver.h)| | Discussion 8 | [Timers/Counters](./Discussions/discussion08/)| | ^ | [timer.c](https://www.csee.umbc.edu/~alnel1/cmpe311/discussions/timer.c) | | Discussion 9 | [adc tutorial](https://www.csee.umbc.edu/~alnel1/cmpe311/discussions/adc_tutorial.pdf) | | ^ | [ADCSampleCode.c](https://www.csee.umbc.edu/~alnel1/cmpe311/discussions/ADCSampleCode.c) | | | For HW guidance: understand physical delay [Servo Delay Applet](https://eclipse.umbc.edu/robucci/applets/servo/) | | Discussion 10 | [Sending data over UART and Reading data with Python](./Discussions/discussion10/) | | Discussion 11 | [FreeRTOS](./Discussions/discussion11/) |

Assignments and Projects

[Coding Standards](./attachments/CodingStandardsCMPE311Spring2022.html) | Assignment | Link | | ---------- | ---- | | HW1 | [HW1 Traffic Controller](./hw/hw1.html) | | HW2 | [HW2 CESQ (CMPE Word Game)](./hw/hw2.html) | | HW3 | [HW3 DC Circuit Solver](./hw/hw3.html)
[Grading Guidelines](./attachments/grading_guidelines.html)| | HW4 | [HW4 Find the Light](./hw/hw4.html)
Follow Same Gradning Guildines as HW3| | HW5 | [HW5 Work and Distracting Tasks](./hw/hw5.html)
Follow Same Gradning Guildines as HW3|

Reading and References

* Book