11-26-07

OEES 215 Microprocessor Applications I
(Emphasis will be placed on microcontrollers.)
Bruce McDowell
e-mail address and phone
Fall 2007

Announcements
(None)

 
Syllabus

Recently added text is shown in a larger font.
The date when this page was updated is shown in the upper right-hand corner.

Homework & Class Exercises
b = beginning of class period, e = end of class period.
[w.i.p. stands for "work in progress"]

Assignment
No.
Max.
Pts.
Date Assigned

Date Due

Assignment



Lab Work & Class Exercises
XCSB = XCSB BASIC run on a PIC16F84, XB = XBASIC run on a "big" computer, PP = pencil and paper, b = beginning of class period, e = end of class period. Note: Unless otherwise specified, draw a flowchart before writing each program (unless, of course, the flowchart is furnished).
Assignment
No.
Assignment Name Max.
Pts.

Date Assigned

Date Due

 Language Description
GH22-13 Install XBasic 5 Wed 8-22 Mon 8-27 XB Go to xbasic.sourceforge.net, download xbasic-6.2.3.exe, and install it.
GF3-13 Guess a Number - A 10 XB First see how Age in 10 Years, version A works, then write Guess a Number, vers. A.
GF3-14 Guess a Number - B 10 XB First see how Age in 10 Years, version B works, then write Guess a Number, vers. B.
GF3-16 Guess a Number - C 10 XB First see how Age in 10 Years, version C works, then write Guess a Number, vers. C.
GH28-9 Download XCSB and PIC software 20 Wed 8-29 Mon 9-3 XC Directions.
GF4-14 Intro to PIC microcontroller XB, XC
GI5-17 2-input OR gate 15 Wed 9-5 XB Modify the AND-gate program contained in the XBasic template to create  a 2-input OR gate.
GI5-18 2-input NOR gate 10 Wed 9-5 XB Make a 2-input NOR gate.
GI5-19 2-input NAND gate 10 Wed 9-5 XB Make a 2-input NAND gate.
GI5-20 3-input AND gate 15 Wed 9-5 XB Make a 3-input AND gate. (Hint: You'll need three IF statements)
gi17-16 Lights and strobe 1 15 Mon 9-17 XB See handout for directions.
gi19-16 Lights and strobe 2 20 Wed 9-19 XB Lights and Strobe 2. Download this file.
gi24-14 Lights and strobe on PIC 5 Mon 9-24 XC Lights and Strobe running on PIC. Download this file and also a new version of the standard functions, and try out the program--just a demo.
gi26-17 Sounds 20 Wed 9-26 XC Modify this program so that switches 0, 1, and 2 produce different frequencies.
gj10-01 Controlling 2 motors 20 Mon 10-1 XC Directions.
gj03-14 Timer functions 5 Wed 10-3 XC Demo. Right click here to download the file.
gj03-16 Switches & Delays 15 Wed 10-3 XC Modify the gj03-14 program to be like the flowchart on the gj03-16 handout..
gj08-16 Two Motors Using Improved Delays 15 Mon 10-8 XC Directions.
gj10-18 RS Flip-Flop 20 Wed 10-10 XC Get handout sheet.
gj17-17 Toggle Flip-Flop 10 Wed 10-17 XC Get handout sheet.
gj22-16 D Flip-Flop 10 Mon 10-22 XC Get handout sheet.
gj22-18 Two motors connected to D flip-flop 10 Mon 10-22 XC Directions.
gj24-15 Tone translator input processor 10 Wed 10-24 XC Get handout sheet.
gj24-19 Toggle flip-flop connected to real square wave generator 10 Wed 10-24 XC
  1. Load the toggle flip-flop program (gj17-17) into a PIC board.
  2. Get the PIC-board schematic and assembly drawing.
  3. Run a one-to-one ribbon cable from J1 on the PIC board to one of the white breadboards.
  4. For the remaining steps, make your connections on the white breadboard.
  5. Get a function generator, and be sure it's turned off.
  6. Connect the ground of the function generator to ground on the PIC board.
  7. Connect the TTL output of the function generator to PIC-board input switch 0 (RA0).
  8. Also, connect channel 1 on a scope to input switch 0.
  9. Connect scope channel 2 to output line 0 (RB0).
  10. Turn on the function generator, and set it to square waves at 1 kHz.
  11. Channel 2 should have half the frequency of channel 1. The jitter in the waveform on channel 2 is normal, and is a result of the program sometimes catching the square wave right when it changes and sometimes catching it a little after.
gj29-14 Counter 20 Mon 10-29 XC Get handout sheet. Right-click here to download the skeleton program.
gj29-18 Shift register 10 Mon 10-29 XC if x==0 then
x = 1
endif
--------------
x = x<<1
gj29-19 Shift or count 20 Mon 10-29 XC in0 is the clock
in1 ==1 count up
in2==1 count down
in3==1 shift left
in4==1 shift right
gk05-16 Combination lock 15 Mon 11-5 XC Get handout sheet.
gk07-17 Stopwatch 10 Wed 11-7 XC Get handout sheet.
gk12-17 Flash() procedure 15 Mon 11-12 XC Get handout sheet.
gk12-15 Period Meter 15 Wed 11-14 XC Get handout sheet. Right click here for a skeleton program.
gk26-16 Adding 0
(Example)
Mon 11-26 XC Get handout sheet.
gk26-17 Dividing 0
(Example)
Mon 11-26 XC Get handout sheet.
gk26-18 Running total 15 Mon 11-26 XC Get handout sheet. Right click here for a skeleton program.

Extra Credit

Assignment
No.
Assignment Name Max.
Pts.

Date Assigned

Date Due

  Description

Reference
[w.i.p. stands for "work in progress"]

S215 Custom Functions Template and Standard Functions Files for Downloading (XBasic and XCSB) Running XCSB Programs
What the Heck Are Functions? 
Documentation on Other Web Sites Flowchart Symbols & Conventions Using Word to Draw Flowcharts