Ch6_Solutions_WAM2.2

Ch6_Solutions_WAM2.2 - Chapter 6 Solutions Questions 1....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 6 Solutions Questions 1. What is the difference between a schematic symbol and a pin map? How are the two related? A schematic shows what is connected to each pin. However, it does not show where each pin is physically located on the part. That’s what the pin map does. The usual relation is to first consult the schematic to know what to wire to a given pin, and then look at the pin map to know which leg or lead on the part corresponds to that pin. (p. 160, p. 165) Sometimes, after becoming more familiar with the part, you don’t need the look at the pin map anymore. At that point you know where the pins are. 2. How do the DIRH and OUTH variables work? DIRH works as follows: Any bit set to "1" means the corresponding pin is an output. Any bit set to "0" means the corresponding pin is an input. OUTH works as follows: Any bit set to "1" makes the corresponding pin HIGH. Any bit set to "0" makes the corresponding pin LOW. (p. 171) 3. What character do you have to type before entering a binary number into the BASIC Stamp Editor? The % character (percent sign) denotes binary numbers. (p. 171) 4. How do you make the “less than or equal” comparison? Less than or equal is <=. (p. 178) Exercises 1. Modify one line in SegmentTestWithHighLow.bs2 from Activity #2 so that it tests a 7- segment display connected to P0 through P7. Draw the schematic of your revised design. To solve this problem, change the FOR. ..NEXT loop. Instead of FROM 8 TO 15, it will be FROM 0 TO 7. FOR pinCounter = 0 TO 7 DEBUG DEC2 pinCounter, CR HIGH pinCounter PAUSE 1000 LOW pinCounter
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
NEXT E CB A F LED’s common G DP Vss 1 k P0 P1 P2 P3 P4 P5 P6 P7 Based on: Figure 6-10 p. 166. Pins P15. .P8 changed to P7. .P0. 2. Assume that you moved your entire 7-segment LED circuit so that instead of being connected to P8 through P15, it is now connected to P0 through P7. The variable that addresses these I/O pins is OUTL . The L is for low byte while the H in OUTH is for high byte. Rewrite the LOOKUP command in DisplayDigitsWithLookup.bs2 so that it addresses the OUTL variable. Rewrite the other three commands in the program that need to be changed to accommodate moving the 7-segment LED circuit from the upper byte of BASIC Stamp I/O pins to the lower byte.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course ME 456 taught by Professor Radcliffe during the Fall '07 term at Michigan State University.

Page1 / 6

Ch6_Solutions_WAM2.2 - Chapter 6 Solutions Questions 1....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online