Digital Systems I: Continuing Education

Lab Guide and Lab Files


Week 1 Guide:
Introduction To the Digital Lab

  • 1- No food or drink is allowed in the lab.
  • 2- Lab work is verified and submitted by the end of each lab period.
  • 3- There are no pre-lab assignments or lab work to complete outside the lab period.
  • 4- Each week you must bring the book and the red signoff sheet to the lab.
  • 5- Each week you must view this website to access the lab guide and design files.
  • 6- The Altera UP-1 system design kit is used to build and test all digital systems.
  • 7- The UP-1 (university program) project board has a MAX and FLEX CPLD. We will be using the FLEX CPLD.
  • 8- When you see this icon you can click on it to get help with the theory covered in class. Click on it and give it a try. To move forward through the presentation you need to press the {SPACE BAR} on the keyboard or click the mouse button. To move backwards you press the {BACKSPACE} key.

  •   

    Complete Lab 2

     
    Make corrections to the book:
  • 1- Open your book to page 33 find step #11flex near the bottom. Write into the book the words "Uncheck the box "Show only fastest speed grades"".
  • 2- On page 26 after the second paragraph write into the book the words "skip to page 33 for FLEX device".
  • 3- On page 40 make the correction to the 10th line Change from"INPUT symbol pin17" to "OUTPUT symbol pin17".
  • 4- On page 42 make the correction to Figure 2-54 shown below
  • 5- On page 42 on Figure 2-55 Step 18 answer box write the words "See web guide diode diagram for a hint".
  • 6- On page 43 find "Step 20flex" The second paragraph should say "Use steps 15 to 17 as a guide..."
  •  
    Lab procedure
  • 1- You can use a floppy disk, a flash memory card stick (jump drive), or the student metwork drive (U:). Using the U: drive is the BEST option!
  • 2- Complete the "Lab Work Procedure" on pages 20 to 26.
  • 3- Skip forward from page 26 to page 33. Complete the lab work described on pages 33 to 43. The diagram below shows how the Altera board is configured with the logic gates.
  • 4- You need to answer the question at the bottom of page 42. You can answer questions in your book or you can answer questions on separate piece of paper. The answer will be submitted at the end of the lab period. Answers in your book will be torn out and submitted. The question on page 42 (Figure 2-55) refers to "step 6 in Lab 01". You don't need to review Lab 01 if you know that Lab 01 proves the Altera LEDs are active low. Refer to the diagram below. It's the active low LEDs that make the system appear to NOT be working.
  • 5- Fill in the tables at the bottom of page 43. The tables will be submitted at the end of the lab period.
  • 6- Have the instructor test your system, sign your lab progress form, and collect your answers.
  • 7- Remember to always exit the "Max-Plus II" program before logging off the computer otherwise you may corrupt the design files.

      

    Week 2 Guide:
    Complete Lab 3.

    Lab 3: Vending Machine System.

  • 1- You need the worksheet you created in Tutorial #2 last week. It has the complete vending machine system design.
  • 2- You need to create a folder called "lab03" on the U: drive.
  • 3- Before running the Altera MAX software,click here Lab 03 GDF file for the Vending Machine System and place this file in "u:\lab03".
  • 4- Run the Altera Max software and open the "lab03.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- Complete the "Lab Work Procedure" on pages 48 to page 50. Do not start with PowerPoint. Whenever the book tells you to "use the lab work procedure in Lab 02 as a guide" then you should use the laminated orange card that is attached to your work station. The card summarizes all 17 design steps from lab 2.
  • 6- When you have finished testing the new and improved vending machine system, get the paperwork ready to submit. It will include both tables and both answers. Have the instructor test your system, sign your lab progress form, and collect the answers.
  • 7- Remember to always exit the "Max-Plus II" program before logging off the computer otherwise you may corrupt the design files.

      

    TEAM WORK LABS!
    All digital labs and the end of term project will be completed by teams of 2 students. Find a partner that will work with you each week for the remainder of the year.


      

    Week 3 Guide:
    Complete Lab 5 VHDL Vending Machine System and Lab 6 VHDL Sound Meter System.

    Your design team will simultaneously build two lab systems. Partner #1 will build the Lab 5 VHDL Vending Machine System and Partner #2 will build the Lab 6 VHDL Sound Meter System. Decide who will be Partner #1 and Partner #2. There is a separate set of instructions for each team member.
     

    Lab 5: VHDL Vending Machine System.(Partner #1)

  • 1- Correct the error in the book. Truth table at top of page 87 should read "L Q3 Q2 Q1".
  • 2- You need to create a folder called "lab05" on the U: drive. VHDL only works when files are stored in a folder.
  • 3- Before running the Altera MAX software, right click here vending VHDL file choose "save target as ..." and place this file in "u:\lab05".
  • 4- Before running the Altera MAX software, click here Lab 05 GDF file for the VHDL Vending Machine System and place this file in "u:\lab05".
  • 5- Run the Altera Max software and open the "vending.vhd" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 6- Complete the six step "Lab Work Procedure" on pages 81 to 84. Quickly read over "Steps" 1 to 5. You can skip all 5 of these "Steps" as they are not needed because you downloaded the Vending VHDL file. You must complete step 6 at the bottom of page 84. "Step" 6 converts the VHDL code into a symbol and places it in the symbol library.
  • 7- Close the "vending.vhd" window. Open the "lab05.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 8- Complete the six step "Lab Work Procedure" on pages 85 to 87. Quickly read over "Steps" 1 and 2. You can skip both "Steps" as they are not needed. Complete steps 3 through 6. Fill in the the table on page 87,
  • 9- Change the vending machine system so that it outputs the correct amount of change. Double click the vending symbol. This will open up a text editor and allow you to make changes. Make the changes to the VHDL code now.
  • 10- You must now create a new symbol. Leave the VHDL text editor open. Make sure you can still see the VHDL code that you changed. From the "File" menu select "Create Default Symbol". If Altera reports errors you will need to use the information on pages 87, 88, and 89 of the text to make corrections. Proceed to the next step if you are error free.
  • 11- Shut down both the compiler and VHDL text editor windows. View the system diagram "lab05.gdf". You must update the VHDL Symbol. From the "Symbol" menu select "Update Symbol" and click the "OK" button. The symbol vending will now have the correct number of outputs.
  • 12- Use the laminated orange card and complete steps 14 to 17.
    The system is ready to test but you must wait until your partner is ready before you procede.
  •  

    "Lab 6: VHDL Sound Meter System Version 1". (Partner #2)

  • 1- Read the description on pages 93 to 94.
  • 2- Complete the table shown in figure 6-2 on page 95.
  • 3- You need to create a folder called "U:\Lab06". VHDL only works when files are stored in a folder.
  • 4- Before running the Altera MAX software, right click here sound VHDL file choose "save target as ..." and place this file in "u:\lab06".
  • 5- Before running the Altera MAX software, click here Lab 06 GDF file for the VHDL Sound Meter System and place this file in "u:\lab06".
  • 6- Run the Altera Max software and open the "lab06.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 7- You will see a symbol for the sound meter. The symbol does not have the correct number of outputs because the VHDL code for the symbol must be changed. To change the VHDL code for the symbol "sound" you must double click the symbol. This will open up a text editor and allow you to make changes. Make the changes to the VHDL code now.
  • 8- You must now create a new symbol. Leave the VHDL text editor open. Make sure you can still see the VHDL code that you changed. From the "File" menu select "Create Default Symbol". If Altera reports errors you will need to use the information on pages 87, 88, and 89 of the text to make corrections. Proceed to the next step if you are error free.
  • 9- Shut down both the compiler and VHDL text editor windows. View the system diagram "lab06.gdf". You must update the VHDL Symbol. From the "Symbol" menu select "Update Symbol" and click the "OK" button. The symbol sound will now have the correct number of outputs.
  • 10- Use the laminated orange card and complete steps 10 to 17.
    The system is ready to test but you must wait until your partner is ready before you procede.
  • WORK as a TEAM to record observations for Lab 5 and Lab 6.
  • 1- Both team members must gather around the first system to complete a test of the vending machine system for Lab 5
    -Test the system by trying all valid coin combinations. Make corrections if necessary.
    -Leave this system operational it will be inspected later.
  • 2- Both team members must gather around the second system to complete observations for Lab 6. To test the sound meter system you need try all 16 switch combinations and place a check mark beside each table entry on Figure 6.2 on page 95. Complete the system test now.
  • 3- Demonstrate the operation of the vending machine system and the sound meter system and get two signatures.
  • 4- Remember to always exit the "Max-Plus II" program before logging off the computer otherwise you may corrupt the design files.

      

    Week 4 Guide:
    Complete Lab 7 VHDL Drill Machine System.

    "Lab 7: VHDL Drill Machine System". Both team members work together using only one computer station.

  • 1- Read the description for steps 1 and 2 on pages 111 to 113.
  • 2- You need the worksheet you detached from tutorial #4. You need to copy the table from the tutorial #4 worksheet into the table shown in figure 7-20 on page 112. To save time, only write out column "X".
  • 3- Verify your table. The solution page is available at the front of the class room.
  • 4- You need to create a folder called "U:\Lab07". VHDL only works when files are stored in a folder.
  • 5- Before running the Altera MAX software, right click here drill VHDL file choose "save target as ..." and place this file in "u:\lab07".
  • 6- Before running the Altera MAX software, click here Lab 07 GDF file for the VHDL Drill Machine System and place this file in "u:\lab07".
  • 7- Run the Altera Max software and open the "lab07.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 8- You will see a symbol for the drill machine. The symbol does not have the correct number of outputs because the VHDL code for the symbol must be changed. To change the VHDL code for the symbol "drill" you must double click the symbol. This will open up a text editor and allow you to make changes. Make the changes to the VHDL code now.
  • 9- You must now create a new symbol. Leave the VHDL text editor open. Make sure you can still see the VHDL code that you changed. From the "File" menu select "Create Default Symbol". If Altera reports errors you will need to use the information on pages 87, 88, and 89 of the text to make corrections. Proceed to the next step if you are error free.
  • 10- Shut down both the compiler and VHDL text editor windows. View the system diagram "lab07.gdf". You must update the VHDL Symbol. From the "Symbol" menu select "Update Symbol" and click the "OK" button. The symbol sound will now have the correct number of outputs.
  • 11- Use the laminated orange card and complete steps 10 to 12.
  • 12- Use the laminated orange card and complete step 13. Assign the 2 FLEX pushbuttons pins number 28 and 29 to start the drill. Assign 2 flex switches to simulate the cover sensor and the part clamped sensor.
  • 13- Use the laminated orange card and complete steps 14 to 17.
  • 14- To test the drill machine you need try all 16 switch combinations and place a check mark beside each table entry in Figure 7-20. Complete the system test now.
    - Once all 16 conditions have been tested then you need to answer the questions on page 114.
    - Tear out page 114 and place both your names at the top of the page. Demonstrate the operation of the drill machine system and get a signature. Bring these files back to the lab next week.
  • 15- Remember to always exit the "Max-Plus II" program before logging off the computer otherwise you may corrupt the design files. These files will be needed next week to complete Lab 8.

  •   

    Week 5 Guide:
    Complete Lab 8 SR Flip Flop. Both team members work together using only one computer station.

    Drill Machine and Flip Flops.
  • 1- Run the Altera Max software and open the "lab07.gdf" file you created last week. It is the drill machine system.
  • 2- Add an SR flip flop to the drill machine. It has symbol name "norltch". The SR flip flop will act like a memory cell. It will keep the drill ON when the pushbuttons are released. Make sure the drill shuts down if the part should ever unclamped.
  • 3- Demonstrate the operation of the system and get a signature.

  •   

    Week 6 Guide:
    Complete Lab 9 Shift Registers.

     
    Both team members work together using only one computer station. Take turns being the computer operator.
     
  • 1- Make sure the "Max-Plus II" program is shut down. You need to prepare your computer for Lab 9.
  • 2- You need to create a folder called "Lab09".
  • 3- Before running the Altera MAX software, click here Lab 09 GDF file for the Shift Register System and place this file in "u:\lab09".
  • 4- Run the Altera Max software and open the "lab09.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- With partner #1 as the computer operator complete the work described on pages 137 and 138 "Test a 4-bit Shift Register WITH Switch Bounce". Remember to always follow the instructions for the FLEX IC Design. We never use the MAX IC. When you get to "step 3", in the middle of page 138 you must demonstrate the operation of the system and explain the diagram below.Get the first signature.
  • 6- With partner #2 as the computer operator complete the "Lab Work Procedure" on pages 138 to 143 "Test a 4-bit Shift Register WITHOUT Switch Bounce". When this work is complete you must demonstrate the operation of the system and explain the diagram below. Get a second signature.

  •   

    Week 7 Guide:
    Complete Lab 10 Serial Data Transfer System.

  • 1- Your design team will build a serial data transfer system. The transfer system is made up of two Altera stations. One station is the transmitter and the other station is the receiver.
  • 2- Sit at 2 Altera stations that are physically next to each other. This will keep the length of the wires to a minimum when the 2 stations are linked together.
  • 3- Decide which partner builds the transmitter and which partner builds the receiver. There is a separate set of instructions for each team member.
  • Transmitter (Partner #1). .
  • 1- You need to create a folder called "Lab10".
  • 2- Before running the Altera MAX software, click here Lab 10 GDF file for the Transmitter and place this file in "u:\lab10".
  • 3- Before running the Altera MAX software, click here GDF file for the Debounce system and place this file in "u:\lab10"
  • 4- Pick up and follow the instructions in the "Lab 10 Guide" handout. Do not follow the instructions in the book. The book instructions are for the MAX IC. The lab 10 handout describes the procedure for using the FLEX IC.
  • Receiver (Partner #2).
  • 1- You need to create a folder called "Lab10".
  • 2- Before running the Altera MAX software, click here Lab 10 GDF file for the Receiver. and place this file in "u:\lab10".
  • 3- Pick up and follow the instructions in the "Lab 10 Guide" handout. Do not follow the instructions in the book. The book instructions are for the MAX IC. The lab 10 handout describes the procedure for using the FLEX IC.

  •   

    Week 8 Guide:
    Complete Lab 13 Binary Counter System and Lab 15: "32-Bit" Frequency Divider System.

    Your design team will simultaneously build 2 digital systems. One person will configure an Altera board with the Lab 13 counter system while the other person configures an Altera board with the Lab 15 Frequency Divider. Once the 2 Altera boards are configured then you will gather around each system and work together to test it and record observations. Decide who does what and begin.
     

    "Lab 13: "Binary Counter System".(Partner #1)

  • 1- Partner #1 will configure an Altera board with the counter system. Partner #2 skip ahead to Lab 15 and configure an Altera board the frequency divider system.
  • 2- You need to create a folder called "Lab13".
  • 3- Before running the Altera MAX software, click here Lab 13 GDF file for the Binary Counter System and place this file in "u:\lab13".
  • 3- Before running the Altera MAX software, click here Debounce GDF file for the Serial Data Transfer System and place this file in "u:\lab13".
  • 4- Run the Altera Max software and open the "lab13.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- Use the "Laminated orange card as a guide"and complete Steps 11, 12, 13, and 14. The "lab13.gdf" diagram shows you which pin numbers you must assign to the switches, the LEDs and the oscillator.
  • 6- Use the "Laminated orange card as a guide"and complete Steps 15, 16, and 17. These steps will compile and configure the FLEX IC with the binary counter system. The system is ready to test but you must wait until your partner is ready before you procede.
  •  

    "Lab 15: "32-Bit" Frequency Divider System. (Partner #2)

  • 1- You need to create a folder called "Lab15".
  • 2- Before running the Altera MAX software, click here Lab 15_2 GDF file for the "32-Bit" Frequency Divider System. and place this file in "u:\lab15".
  • 3- Run the Altera Max software and open the "lab15_2gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 4- Use the "Laminated orange card as a guide"and complete Steps 11, 12, 13, and 14. The "lab15_2.gdf" diagram shows you which pin numbers you must assign to the switches, the LEDs and the oscillator.
  • 5- Use the "Laminated orange card as a guide"and complete Steps 15, 16, and 17. These steps will compile and configure the FLEX IC with the frequency divider system.The system is ready to test but you must wait until your partner is ready before you procede.
  • WORK as a TEAM to record observations for Lab 13 and Lab 15.
  • 1- Both team members must gather around the first system to complete observations for Lab 13. Test the operation of the binary counter system. The test is described on page 183 (step 4). Fill in the table and answer the questions shown in Figure 13-16. If you need help with "4count" theory, view the powerpoint presentation for lab 13 slide 5. Demonstrate the operation of the system, submit the answers, and get a signature.
  • 2- Both team members must gather around the second system to complete observations for Lab 15. The test is described on page 207 and 208 (steps 4, 5, 6, 7, and 8). Answer all the questions. Hint: Use the diagram below. The diagram shows more detail and is equivalent to the Altera diagram.

    Demonstrate the operation of the system, submit your answers, and get a signature.
  • Assignment #7: Use the remaining time to work on Part 2 of Assignment #7.
    Here is the ZIP file .

  •   

    Week 9 Guide:
    Complete Lab 16 and begin the project.

    Complete Lab 16 and use any extra lab time to work on the project parking garage system. You will likely learn more about VHDL if you work alone on Lab 16 but you can choose to work with a partner.
     

    "Lab 16: "VHDL BCD Counter System".

  • 1- Create a folder called "U:\Lab16".
  • 2- Before running the Altera MAX software, right click here countBCD VHDL file choose "save target as ..." and place this file in "u:\lab16".
  • 3- Before running the Altera MAX software, click here Lab 16_2 GDF file for the VHDL BCD Counter System. and place this file in "u:\lab16".
  • 4- Run the Altera Max software and open the "lab16_2.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- Use the "Laminated orange card as a guide"and complete Steps 11, 12, 13, and 14. The "lab16_2.gdf" diagram shows you which pin numbers you must assign to the switches, the LEDs and the oscillator.
  • 6- Use the "Laminated orange card as a guide"and complete Steps 15, 16, and 17. These steps will compile and configure the FLEX IC with the MOD 10 counter. The system is ready to be tested.
  • 7- Test the operation of the counter system. The test is described on page 213 (step 5). Remember, QL23 is a 1.5 PPS clock signal that is connected to the clock of the counter. This will make the counter automatically cycle the LEDs through its count sequence when you put the switches "Cin", "Clear" and "Load" in the correct position. To help you figure out the correct switch positions study the VHDL code on page 212. Do not proceed with the lab until you can get the counter to cycle the LEDs.
  • 8- Answer the question for "step 6" shown on page 213.
  •  

    "Hack the MOD 10 VHDL code to create a MOD 12 VHDL counter.".

    At this point you have tested the BCD counter and you have answered the question in step 6 (page 213.). You will now change the VHDL code for symbol "countbcd" to create a MOD 12 counter that will count from 0 to 11.
  • 1- From the graphics editor window "double click" on the symbol "countbcd". This will open the text editor window and allow you to view and change the VHDL code. Change the VHDL code for the BCD counter to make a MOD 12 counter.
  • 2- You must now create a new symbol. Leave the VHDL text editor open. Make sure you can still see the VHDL code that you changed. From the "File" menu select "Create Default Symbol". If Altera reports errors you will need to use the information on pages 87, 88, and 89 of the text to make corrections. Proceed to the next step if you are error free.
  • 3- Shut down both the compiler and VHDL text editor windows. View the system diagram "lab16_2.gdf". You must update the VHDL Symbol. From the "Symbol" menu select "Update Symbol" and click the "OK" button.
  • 4- Use the laminated orange card and repeat steps 15 to 17. This will "save and compile" the new design and re-configure the FLEX IC.
  • 5- You are now ready to test the operation of the MOD 12 counter system. Test the system and make changes if necessary. When it is functional, demonstrate the operation of the system. Submit the answer from page 213 and get a signature.

  •   

    Week 10, 11 and 12 Project Guide:

    You will likely need to complete Tutorial #8 to be able to explain the VHDL changes made to the parking garage system.
    You will likely need to complete Tutorial #9 to be able to explain the VHDL changes made to the stopwatch and board game spinner systems.

    "Parking Garage System".

  • 1- You need to create a folder called "U:\lab17".
  • 2- Before running the Altera MAX software, right click here Parking Garage System VHDL file choose "save target as ..." and place this file in "u:\lab17".
  • 3- Before running the Altera MAX software, click here Lab 17 GDF file for the Parking Garage System. and place this file in "U:\lab17".
  • 4- Run the Altera Max software and open the "lab17.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- Complete the project work described on the project handout.
  • "Stopwatch System".

  • 1- You need to create a folder called "U:\sw".
  • 2- Before running the Altera MAX software, right click here Stopwatch System VHDL file choose "save target as ..." and place this file in "u:\sw".
  • 3- Before running the Altera MAX software, click here SW GDF file for the Stopwatch System. and place this file in "U:\sw".
  • 4- Run the Altera Max software and open the "sw.gdf" file you downloaded then click the FILE menu, select PROJECT, and then SET PROJECT TO CURRENT FILE.
  • 5- Complete the project work described on the project handout.
  • VHDL Listings.

  • Click here to view VHDL code for each project.