5-12-08

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

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.

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
Assignment
No.
Assignment Name Max.
Pts.

Date Assigned

Date Due

 Language Description
GH22-13 Install XBasic 5

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

XC Directions for downloading XCSB and PIC software.
GF4-14 Intro to PIC microcontroller XB, XC
GI5-17 2-input OR gate 15 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 XB Make a 2-input NOR gate.
GI5-19 2-input NAND gate 10 XB Make a 2-input NAND gate.
GI5-20 3-input AND gate 15 XB Make a 3-input AND gate. (Hint: You'll need three IF statements)
HB29-10 Delay function -- 2-29 XC Download the program and understand it so you'll be able to answer questions about it if it shows up on a quiz.
HB29-11 Variable delay function -- 2-29 XC Download the program and understand it so you'll be able to answer questions about it if it shows up on a quiz.
HB29-12 Two tones 15 2-29 XC Modify the HB29-11 program so that it produces two different tones when you have switch 0 on or off. You'll need to connect a speaker to output line 0.
HB29-13 Five tones 15 2-29 XC Modify the HB29-12 program so that input switches zero through five will produce five different tones when they are turned on.
gi26-17 Sounds 20 XC Modify this program so that switches 0, 1, and 2 produce different frequencies.
gj10-01 Controlling 2 motors 20 XC Directions.
gj03-14 Timer functions 5 XC Demo. Right click here to download the file.
gj03-16 Switches & Delays 15 XC Modify the gj03-14 program to be like the flowchart on the gj03-16 handout..
gj08-16 Two Motors Using Improved Delays 15 XC Directions.
gj10-18 RS Flip-Flop 20 XC XB Get handout sheet.
gj17-17 Toggle Flip-Flop 10 XC Get handout sheet.
gj22-16 D Flip-Flop 10 XC Get handout sheet.
gj22-18 Two motors connected to D flip-flop 10 XC Directions.
gj24-15 Tone translator input processor 10 XC Get handout sheet.
gj24-19 Toggle flip-flop connected to real square wave generator 10 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 XC Get handout sheet. Right-click here to download the skeleton program.
gj29-18 Shift register 10 XC if x==0 then
x = 1
endif
--------------
x = x<<1
gj29-19 Shift or count 20 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 XC Get handout sheet.
gk07-17 Stopwatch 10 XC Get handout sheet.
gk12-17 Flash() procedure 15 XC Get handout sheet.
gk12-15 Period Meter 15 XC Get handout sheet. Right click here for a skeleton program.
gk26-16 Adding 0
(Example)
XC Get handout sheet.
gk26-17 Dividing 0
(Example)
XC Get handout sheet.
gk26-18 Running total 15 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, General
BASIC Programming (a Wikibook)
This is an online book. Be sure to click the underlined topics on the first page. This will take you to more pages of the "book."
S215 Custom Functions General Documentation on Other Web Sites What Are Functions? 
Flowchart Symbols & Conventions Using Word to Draw Flowcharts

Reference, X Basic

Overview Detailed reference material Keywords, types, etc. Download and use the compiler
OEES215 template and custom functions, for downloading (XBasic and XCSB)

Reference, XCSB Basic

Detailed reference material Running Programs Download and use the compiler OEES215 template and custom functions, for downloading
(XBasic and XCSB)