Digital Control: Micro Systems
 
 

 

 

Tutorials

 

 

         
         
  Example1: A Basic C Program using outputs Download Examples 1-4  
 
Project1a
Generating sequences of events.    
  Example2: Functions    
 
Project2a
More writing functions    
 

Example3:

 

Getting input

   
 
Project3a
Using multiple inputs and responses.    
  Example4 Using Arguments with functions    
 
Project4a
Writing complex sequences using functions with arguments    
  Example5 Writing Directly to PORTB Download Examples 5-11  
 
Project5a
Using conditional expressions    
  Example6 Math Operators - Modulo, addition    
  Example7 Using Binary Numbers    
  Example8 Using Hexadecimal Numbers    
 

Project8a

Creating bit patterns using Hexadecimal Numbers    
  Example9 Shifting Bits Left and Right    
 

Project9a

Shifting back and forth in both directions    
  Example10 Using Flags to keep track of what you are doing in a task with multiple parts    
 

Project10a

Write a program modeled on Example 10 which counts up to 128, then counts back down to zero - repeating back and forth.

   
  Example11 Using bit wise AND and OR to change a bit in a byte while leaving the others untouched. With these, we build a better blink function.    
 

Project11a

Use the AND and OR operators to created patterns by turning LEDs off.    
  Example12 Acceleration Download Example12  
 

Project12a

and Deceleration    
 

Project12b

Combining Acceleration and Deceleration with input    
  Example 13 Acceleration using Interrupts Download Examples 13-14  
  Example 14 Creating the Illusion of doing two things at once    
 

Project 14a

Now, can you keep 4 balls in the air?    
 

Project 14b

Keeping a crowd busy.    
  Example 15 Pseudo-Random Numbers Download Examples 15-17  
 

Project 15a

Programming four independent random patterns    
 

Project 15b

The Random Walk Algorithm    
  Example 16 Band-limited Random Walk    
  Example 17 Using Servo Motors    
 

Project 17a

Random-Walk applied to Servo Motors    
  Example 18 Controlling Motor Speed / Light Intensity using Pulse-Width Modulation Download Examples 18-22  
  Project 18a Rescaling linear change for different / better shaped curves    
  Project 18b Choosing random values of PWM using same "curve" you developed in last exercise.    
  Project 18c Modify previous example to independently operate on two or more outputs. Apply to your own devices.    
  Example 19 Debouncing input switches in conjunction with PWM.    
  Project      
  Example 20 Controlling Stepper Motors    
         
  Example 21 Getting Serial input from ADC    
  Example 22 Controlling a Servo motor using photocell