CECS 262 – Introduction to Embedded System Programming
CECS 262 Lecture and Tutorial Videos Page
1/20-Fri Lec1/2: Intro, Syllabus, Adds/Roll, Microcontroller vs General-Purpose Microprocessor, What is an Embedded System. Number Systems, Positional Weighting, Intro Slides – Inside a Computing System and 8051 MCU Slides-(1)
Lab1/2: Lab Supplies w/ Soldering Video, uVision IDE, 8051 Ports and Port Output, Voltages and Logic Levels, Special Function Registers, 8-bit Registers, Lab 1 Simulating 8051 I/O
All Lab Supplies are needed by Lec/Lab5/6 on 2/3. We will have a soldering workshop during lab
Always Bring Laptop to Every Lab
1/27-Fri Lec3/4: Quiz 1 (MCU vs MPU, Embedded System, Hex<->Bin) etc…, 8051 Program Execution Slides-(2), Port Input, Pushbutton/Switch Circuit Topology, Bit-Wise AND Operator, IF Statements & Bit-Masking.
Lab3/4: Start Lab 1
Lab 1 is Due by beginning of next class in Beachboard
2/3-Fri Lec5/6: Quiz 2 (Bit-Masking, Switch/LED Interfacing, Number Systems, Longer and won’t be one of the quizzes that may be dropped from the final grade), FOR Loops, Hard-Coded Delays and Busy-Wait
Lab5/4: Soldering Workshop (Have All Supplies With You) Programming Test Code and Verifying Development Board. Transition Lab 2 to Development Board.
9/16-Fri Lec5/6: Bit Manipulations (SetBit/ClearBit), Port I/O Internal Circuit Topology, LED – Light Emitting Diodes
Lab5/4: Schematic Entry/Documentation Tutorial, Lab 2 Continued
Lab 2 is Due by beginning of next class in Beachboard, a demo of your functioning board will be done during the next lab
9/23-Fri Lec7/8: MCU Minimum Connections, Reset Conditions, Clock Sources
Lab6/7: 1st Half: Lab 2 Demo
Special Note About This and All Future Demos: During a demo, the instructor may remove/modify the circuit, component, code and ask you to fix it. Troubleshooting your code and circuits is a fundamental and necessary skill in our line of work…
2nd Half: Start Lab 3 add External Pushbutton and 2 Different Patterns.
10/7-Fri: Midterm 1
11/11-Fri Veteran’s Day Campus Closed
12/9-Fri Last Day of Instruction
Setting up the Dev Environment and Programming Test Code
Intro Slides (I only use slides for the 1st lectures)
Inside a Computing System and 8051 MCU (slides.pdf)
8051 Program Execution (Slides.pdf)
262 Review Materials
Number Systems, MCU vs General Purpose Microprocessor, Embedded Systems and other Introductory Basics, Port I/O, For-Loops, IF statements, Bit Masking, Bit-Manipulations (Set/Clr Bit), Bitwise Operators, Minimum MCU Connections, LED and Switch Interfacing.
Lab 1 – Simulating the 8051 Output Port
Lab 1 – Simulating the 8051 Output Port.docx
Lab 2 – LED Scrolling Pattern with Input
Lab 3 – LED Scrolling Pattern with Timer Delay
We will take the previous Lab2 and add an external pushbutton connected to any other pin on P0 (note that P0.2 is currently dedicated to the on-board Pushbutton BTN0, therefore you should not use this pin). The External Pushbutton will now be used to select between 2 different patterns, if it is not held down, then the original pattern of 0x01 from Lab2 should be displayed, if the pushbutton is held down, then this pattern should change to 0xFE where all LEDS are on except for the single unlit LED and the scrolling to the left/right should still continue with one LED off and all others on. The speed change should also remain unchanged and allow for the speed change at any time.
Lab 4 – Stepper Motor
Lab 5 – Timer Interrupts and Servo Motor
The Above Lab document is not applicable, please follow the video instructions below.
Important: Please change the following code from InitDevice() from:
//Setup Defaults for P1
P1MDOUT = P1MDOUT_B0__OPEN_DRAIN | P1MDOUT_B1__OPEN_DRAIN | P1MDOUT_B2__OPEN_DRAIN | P1MDOUT_B3__OPEN_DRAIN | P1MDOUT_B4__PUSH_PULL | P1MDOUT_B5__OPEN_DRAIN | P1MDOUT_B6__OPEN_DRAIN | P1MDOUT_B7__OPEN_DRAIN;
//Setup Defaults for P1
P1MDOUT = P1MDOUT_B0__PUSH_PULL | P1MDOUT_B1__PUSH_PULL | P1MDOUT_B2__PUSH_PULL | P1MDOUT_B3__PUSH_PULL | P1MDOUT_B4__PUSH_PULL | P1MDOUT_B5__PUSH_PULL | P1MDOUT_B6__PUSH_PULL | P1MDOUT_B7__PUSH_PULL;
//Setup Defaults for P0
P0MDOUT = P0MDOUT_B0__PUSH_PULL | P0MDOUT_B1__PUSH_PULL
| P0MDOUT_B2__PUSH_PULL | P0MDOUT_B3__PUSH_PULL
| P0MDOUT_B4__PUSH_PULL | P0MDOUT_B5__PUSH_PULL
| P0MDOUT_B6__PUSH_PULL | P0MDOUT_B7__PUSH_PULL;
Development Board – From Digikey or Mouser – approx $7
Digikey_EFM8BB1LCK or Mouser_EFM8BB1LCK
Parts Kit – From Amazon – approx $35
Header Pins – From Amazon – approx $5-10
Miscellaneous Other Basic Electronics Supplies as Needed
For this class, currently to the best of my knowledge, only the development board and the Embedded Systems Starter Kit are all that is absolutely necessary to complete all the labs for this course. There is a lot in that $35 package, however in general as a student you will want to be acquiring some basic electronics prototyping supplies as you progress through your degree. These are basic items like a Multimeter, Breadboard, Wires, Wire Cutters and Wire Strippers, Resistors, Capacitors, Transistors, and other basic components. There is a high likely hood that these types of items are damaged through incorrect usage and handling, for this reason the department does not supply these items to the student as managing these parts would take a lot of people a lot of time effort to make sure components still work and that all items are there. On other pages on this site I make some recommendations that are affordable and of decent quality. For example super cheap multimeters in the $5 to $20 range is sometimes just wasted money in the grand scheme due to poor accuracy of measurement and ease of damage, it would be better to spend $25 on a known good brand of multimeters like an Extech or Amprobe Brand. On my dedicated general supplies page I make suggestions on what I would purchase for myself given a very tight and frugal budget. Some of these items like the breadboard and wires are already in the listed amazon parts kit but you may find yourself in a situation where things have broken or you need more of a particular item. Since this is a very hands-on major we do a lot of other prototyping and labs in future classes, I have a dedicated general supplies page with discussion of many of these low cost tools and components.
General Electronics Supplies Page