Phone: 337-475-5874
Fax: 337-475-5286
Box 91735
Lake Charles, LA 70609
engineering@mcneese.edu http://mcneese.edu/ceet/engtech

Electronics - ELTR 310

Programming Microcontrollers

  • Introduction to the history of the C programming language.
  • Introduction to PC-based vs. microcontroller-based programming
  • Introduction to programming and microcontroller (µc) terminology
  • Introduction to microprocessor (µc) and µc architecture
  • Introduction to C programming fundamentals, including program structure, components of a program, the main function, include statements, the print function, variables, and comment styles.
  • Applying basic C knowledge by writing simple programs using print and variables.
  • Detailed study and application of variables:  data types, declaration, global variables, initialization, assigning values, enumeration, and typedef.
  • Using a C compiler to write, save, compile, and execute programs.
  • Applying knowledge of variables by writing and testing PC-based programs that print text, print constants, and print variables.
  • Detailed study and application of functions: calling functions, declaration and definition of functions, the void statement, passing values to a function, call by value vs. call by reference, and returning values from functions.
  • Applying knowledge of functions by writing and testing PC-based programs using functions to perform tasks, to receive values from main() and to return values to main().
  • Use of scanf and getche to input values to a program.
  • Detailed study and application of C operators: arithmetic, relational, logical, bitwise, increment/decrement, and precedence of operators.
  • Applying knowledge of operators by writing and testing PC-based programs that use scanf to input numbers and to perform various C operations.
  • Detailed study and application of program control statements:  if statements, if-else statements, for loops, while loops, do-while loops, nested loops, and switch statements.
  • Applying knowledge of operators by writing and testing PC-based programs that use control statements such as testing the sign of a number and printing the colors from resistor color code schemes that correspond to 0-9.
  • Detailed study and application of arrays and strings:  one-dimensional arrays, strings, multidimensional arrays, initializing arrays, arrays of strings, and string functions (especially gets and puts).
  • Applying knowledge of arrays and strings by writing and testing PC-based programs that use the gets and puts string functions, declares arrays, initializes arrays, sets values into arrays, and prints arrays.
  • Detailed study and application of pointers: declaring pointers, setting address values into pointer variables, incrementing pointers, pointers and arrays, pointers and call by reference, pointers and functions, and returning of multiple variables from functions using pointers.
  • Introduction to structures and unions: declaration of structures, initialization of structures, passing structures to functions, pointers and structures, and intro to unions.
  • Intro to the set-up and use of the hardware and software needed to program and test the PIC microcontroller. 
  • Lab programming and testing of C programs executable on the PIC microcontroller using the “Embedded C Language Development Kit for the PICmicro MCU Exercise Book”.
  • Detailed study, programming, and testing of C programs that include:  controlling microcontroller outputs, reading inputs, perform analog-to-digital conversions, using the microncontroller, run stand-along programs that are stored on the PIC, using the PIC EEPROM to store data, writing results and reading inputs via an RS-232 port, using PIC timers and interrupts, measuring temperature, and interfacing the PIC to a 7-segment display.