1 / 11

Last week’s project demos

Last week’s project demos. Servo control with photoresistor and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve seen this one!. More circuit design. Seven segment display. The Seven-segment Display. Nothing more that 8 LEDs in a single package

silas
Download Presentation

Last week’s project demos

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Last week’s project demos • Servo control with photoresistor and enable/disable buttons • Demo in class tonight – don’t start on the next project until I’ve seen this one!

  2. More circuit design Seven segment display

  3. The Seven-segment Display • Nothing more that 8 LEDs in a single package • Each LED can be turned on/off independent of all others

  4. The Seven-segment Display • Like individual LEDs, each has a cathode and an anode leg • The anode of each LED is routed to its own pin on the package • All cathodes are connected together and routed to two pins on the package (choose one of the other)

  5. Schematic • The schematic shows the part as seven separate LEDs (as expected)

  6. Usage • Use them as seven separate LEDs • That is, for whatever you would normally use an LED for

  7. Typical circuit schematic and layout • See chapter 7 for example code • It’s just a bunch of OUTH and PAUSE statements

  8. Memory usage • So far we have been writing to individual pins on the Basic Stamp module • For the seven segment display it would be convenient to write to multiple pins at one time • The I/O pins are memory mapped to various PBASIC Word type instructions • INS, OUTS • These are broken down further to Byte type instructions • INL, INH, OUTL, OUTH (Low byte, High byte) • These are broken down further to Nibble type instructions • INA, INB, INC, IND, OUTA, OUTB, OUTC, OUTD • These are broken down further to Bit type instructions • IN0 – IN15, OUT0 – OUT15 • Utilizing these instructions will set the direction of the pin accordingly

  9. Memory usage • Another instruction called DIRS (and all size variations) is available to set the directions of the I/O pins • We saw this earlier when we needed to “disconnect” an output pin • Set the bits to 0 for input direction • Set the bits to 1 for output direction • Default power up is input • This is useful when setting up to do I/O without actually doing the I/O operation

  10. Homework • By changing the value of the capacitor the time decay can be altered • Book labs had you do this • For this assignment • Build RC circuits using both 0.1uF and 0.01uF capacitors to create 2 timers (select one resistor value) • Include a button to select one of the two timer s • Include debug statements to indicate timer decay • Use the bidirectional LED to indicate which timer is selected • Green – fast (short time decay) • Red – slow (long time decay) • Include a 7-segment display in your design in some creative way

  11. Deliverables • Due next week • A functional description of the system • A state-machine diagram depicting the operation of the system • Source code • A schematic diagram of the circuit • A working demonstration on the Basic Stamp development board (in class)

More Related