PHYSICS 358 Advanced Electronics Laboratory Manual Fall 2014 Dr. Adam T. Whitten

Size: px
Start display at page:

Download "PHYSICS 358 Advanced Electronics Laboratory Manual Fall 2014 Dr. Adam T. Whitten"

Transcription

1 PHYSICS 358 Advanced Electronics Laboratory Manual Fall 2014 Dr. Adam T. Whitten

2 Notes

3 Physics 358 Advanced Electronics Lab Manual Fall 2014 Preliminaries The Coridium ARMmite microcontroller (CAM) receives its power from the USB connection to your computer. The CAM has a 3.3V regulator to reduce the voltage to the LPC2103 microcontroller on the board. While inputs to the microcontroller are 5V tolerant, you can burn out the protection diodes for the LPC2103 inputs if 5V is applied while the CAM is powered down, rendering it useless. Because of this: 1. Never power up the protoboard unless the CAM is powered up first. 2. Protect inputs to the CAM IOs with 1kΩ resistors. 3. Never exceed 3.3V on an AD input. 4. Outputs from the CAM should be buffered with TTL chips. Connect your CAM board to the lab protoboard using the provided ribbon cable. One side of the ribbon cable plugs into the header on the CAM board while the other end has 2 DIP connectors allowing it to plug into the protoboard. The pinouts are as follows: Note the orientation of the ribbon cable connected to the microcontroller board and the protoboard. 1

4 Physics 358 Advanced Electronics Lab Manual Fall 2014 Operation Connect the USB cable to your CAM and logon to the PC with your username and password before powering on the Global Specialties protoboard. Connect the ribbon cable to the CAM and protoboard. Connect the protoboard s ground to the two ground wires on the ribbon cable. You need only power on the protoboard when you test your programs. Launch the BASICtools program on the desktop. When you are done with a lab session, always power off the protoboard and disconnect the ribbon cable from the CAM (a power outage may result in the protoboard having power on while the computer and CAM have power off). Dual Usage Pins Eight IO pins can be used by the hardware pulse width modulation (HWPWM) function and two pins can be used for external interrupts. Plan accordingly if you use either of these features. Hardware Pulse Width Modulation External Interrupts IO Pin IO Pin Channel EINT 0 2 Only HWPWM channels 1-4 use the LPC2103 s Timer2 and Timer3 modules, while channels 5-8 use the Timer2 and Timer1 modules. The Timer0 module is used in conjunction with the BASIC keyword TIMER. Therefore, if you want to use timed interrupts and HWPWM in the same program, you should use Timer1 for the timed interrupts which will limit you to HWPWM channels 1-4. IO15 is also connected through a 330Ω resistor to a LED which is tied to 3.3V. Anything connected to IO15 will be in parallel with this circuit, so design accordingly. The 10-bit analog to digital inputs (AD0-AD7) can also be configured as digital input/outputs (IO16-IO23). On reset or power up the AD pins are configured as AD inputs. To change those to digital IOs you must individually specify a control direction using INPUT(x), OUTPUT(x), DIR(x), or IO(x) commands. After that they will remain digital IOs until the next reset or power up. Lab Reports Record your lab report in an Ampad # (or equivalent). You should turn in your lab notebook at the beginning of class on Tuesday so that I may grade them. I will put your graded notebooks in your mailbox by Wednesday afternoon so you can prepare for the next lab. The labs build upon each other and are structured to prepare you to be able to complete a project during at the end of the course. Therefore timely completion and submission of your lab notebook is important. Include an introduction and conclusion for each lab. Sketch all oscilloscope waveforms and record all numerical data in your lab book. Output to the computer can be cut and pasted into a text document for printing and then taped in your lab book if necessary. Include flowcharts used for program design and diagrams for electronic circuits. Programs should be written using Notepad (using a.bas extension), fully documented, and printed out for inclusion in your lab book. 2

5 Lab 1 Basic Input and Output Introduction In this lab you will take keyboard and digital inputs and display them on 7-segment common anode LEDs. In part 1 you will read a hexadecimal digit from the keyboard and display it. In part 2 you will display a counting loop of hexadecimal numbers 0-F. In part 3 you will decode a 4-bit binary number and display it as a hexadecimal digit. In part 4 you will decode an 8-bit binary number and display it as two hexadecimal digits. While there are several ways to drive 7-segment displays, in this lab you will use 8 digital outputs from the CAM to turn on and off the seven segments plus decimal point. Make sure to buffer your outputs to the 7-segment display with a TTL device (e.g., 7404 Hex Inverter). Also limit the current into the display with a 330Ω resistor between the common anode and the 5V supply. By the end of the lab you will end up using 8 digital inputs and 10 digital outputs, so plan accordingly. Since you will use this LED display in subsequent labs, avoid using pins 0-3 (HWPWM), 14 (EINT0), and 15 (EINT2). Additional Components Needed (quantity): 7-segment common anode LED displays (2) 330Ω resistors (2) appropriate TTL devices for output buffers (enough for 10 outputs) limiting resistors for CAM inputs (number depends on design) 2N3904 NPN switching transistors (2) side-board SPDT switches (1 bank of 8 switches) Common Anode 7-Segment Display Pin Assignment Pin Assignment 1 Cathode a 14 Common Anode 2 Cathode f 13 Cathode b 3 Common Anode 12 N. C. 4 N. C. 11 Cathode g 5 N. C. 10 Cathode c 6 N. C. 9 Cathode dp 7 Cathode e 8 Cathode d 2N3904 Transistor Pin Description 1 collector 2 base 3 emitter The convention for displaying hexadecimal digits beyond 9 is: A, b, C, d, E, F. To distinguish 6 from b, segment a is lit for 6 and dark for b. Part 1 Terminal input and 7-segment displays Using the DEBUGIN command, read a hexadecimal digit (0-F) and display it on a 7-segment display. Perform a check on the input to make sure it is in the proper range. You should first decide which eight pins you will use to control the display. Using consecutively numbered pins will make your code easier to write and faster to execute. DIM and initialize a 16 element integer array with 8-bit values corresponding to the 8 outputs that turn on and off the segments necessary to display a digit. These values will depend on which pin is controlling each segment, so document your connections at the beginning of your program. Remember to buffer your outputs with TTL gates. Use a FUNCTION or SUB to set the levels of the outputs to the display so that it can be reused later. After your program works make sure to save it and print it out for inclusion in your 3

6 Lab 1 Basic Input and Output lab report. Show your working system to the instructor. Part 2 Simple counting Instead of displaying a hexadecimal digit typed in on the keyboard, create a counter that counts from 0 to F and displays each digit for 1 second. After the count reaches F it should roll over back to 0 and repeat. Use the same displaying function as in Part 1. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 3 Digital inputs Now for your input use 4 SPDT switches to input a high or low signal to the CAM and display the corresponding 4-bit number in hexadecimal. Use the same displaying function as in Part 1. The output should remain on the display until a switch is changed. Since the protoboard operates at 5V and the CAM operates at 3.3V, you must protect the CAM inputs with at least 1kΩ limiting resistors. This can be done by using two 1.0 kω resistors to make a voltage divider to supply the high side of the SPDT switches with 2.5 V. Explain why this works in your lab notebook! Decide which inputs you will use and document them within your program. Keep in mind that in part 4 you will expand the number of inputs to 8 and that if the inputs are numbered consecutively it will make you code more compact and efficient. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 4 Strobing two 7-segment displays An 8-bit binary number requires two hexadecimal digits to display. Instead of using 16 outputs to control 2 displays, you can use 8 outputs to tell a display which segments to turn on and 2 additional outputs to control power to the displays. This way you can load the data for the low nibble, turn on its display for 1 ms, then load the data for the high nibble, turn on its display for 1 ms, and repeat this process indefinitely. A human eye will not notice the continual switching because of the persistence of vision effect. Use the two additional control lines to turn on and off 2N3904 transistors which control power to the Common Anode (CA) of the displays. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Do not dismantle your 7-segment LED display circuit when you are finished you will use it again in Labs 2 & 4. 4

7 Lab 2 Timing External Events and PWM Introduction In this lab you will investigate the various ways the CAM can generate frequencies and measure frequencies and pulse widths. In part 1 you will generate frequencies and examine them on an oscilloscope. In part 2 you will measure an externally applied frequency from a function generator and display the frequency to 2 significant digits. In part 3 you will generate a pulse width modulated (PWM) signal that could be used to control a stepper motor and view it on an oscilloscope. In part 4 you will use external interrupts to measure your reaction time. There are various methods for generating frequencies on the CAM. Usually an interrupt driven routine is used that runs continously in the background. Non-interrupt driven routines will monopolize the microprocessor until they are finished. The typical method for measuring a frequency is to count the number of pulses at an input for a set time period. You can then calculate the frequency of the signal. Another common task is to create and measure pulse widths. You generate a pulse as part of a method to measure a person s reaction time. Additional Components Needed: the 2 digit 7-segment LED display circuit from Lab 1 Part 4 capacitors and resistors for push button switch debouncing and voltage dividing appropriate TTL devices for output buffers limiting resistors for CAM inputs LED oscilloscope function generator digital multimeter Part 1 Frequency generation Write a short program that will use HWPWM to create a 1kHz signal on pin 0. Examine the signal on an oscilloscope, sketch it in your lab notebook, and measure its frequency. Now add code to generate a second 1kHz signal on pin 1 using PWM (you may have to continuously loop to generate the signal repeatedly). Examine both the HWPWM and PWM signals on an oscilloscope. Sketch the PWM signal in you lab book and measure its frequency. Are there any other differences between the two signals? Now add code (after the PWM code) to create a signal on pin 2 that is similar to the HWPWM signal on pin 0 using the PULSOUT routine (this may require some thought). Examine both the HWPWM and PULSOUT signals on an oscilloscope and describe/sketch them in you lab book. What are the differences between the two signals? What is the effect you observe on the oscilloscope that is a consequence of some signals being interrupt driven and others being non-interrupt driven? Save your program and print it out for inclusion in your lab report. Part 2 Frequency measurement Use the COUNT subroutine to measure a frequency from the function generator. Use the TTL (pulse out) on the function generator and make sure to limit the input to the CAM with a resistor. Display the frequency in khz on your 2 digit 7-segment LED display. Your program should accomodate signals from 0.1 to 99. khz and display the decimal point in the appropriate location, 5

8 Lab 2 Timing External Events and PWM updating the display every 0.5 seconds. For frequencies less than 0.1 khz display 0.0. and for frequencies greater than 99. khz display Note that there is a tradeoff between the accuracy of the measurement and the quality of the display. More time spent COUNTing gives more accuracy, but increases flicker on the display; less time spent COUNTing decreases both flicker and accuracy. Justify your choice of count time. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 3 Pulse width modulation with external interrupts Write a program that will create a 2kHz pulse width modulated signal. The duty cycle should be displayed on your 2 digit 7-segment LED display and use external interrupt routines with appropriately debounced push buttons (see figure below). Use one push button to increase the duty cycle by 10% (to a maximum of 100%) each time it is pressed and a second push button to decrease the duty cycle from it s current value to 0% over 2 seconds. View the waveform on an oscilloscope and measure the output voltage on a voltmeter. What happens to the output voltage as the duty cycle increases, remains constant, and decreases? Collect data for output voltage versus duty cycle and plot it using WAPP+. Is the graph linear? Explain. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 4 Measure reaction time Create a system to measure a person s reaction time using external interrupt routines with an appropriately debounced push button. When a push button is first pressed, turn on an LED for a random length of time between 3 and 6 seconds. When the LED goes off, time how long it takes for the person to press the button again. Display this time in seconds on your 2 digit 7-segment display putting the decimal point in the appropriate location, with times less than a second having no decimal point. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. 6

9 Lab 3 Analog to Digital Conversion Introduction In this lab you will check on the accuracy and precision of the CAM analog to digital converter. You will also use measurements of the decaying voltage on a capacitor to determine the capacitance of a RC circuit. The CAM can perform a 10-bit analog to digital conversion in approximately 6 µs and the result is stored as a 16-bit left justified number. To convert the 16-bit number to the appropriate 10-bit number shift it to the right 6 bits. To convert the count to a voltage you multiply by V max (in this case 3.3 V) and divide by the maximum count (2 10 ). Notes: You can copy output from the BASICtools terminal window and paste it into a spreadsheet or document. WAPP+ is limited to 99 data points. Additional Components Needed: the 2 digit 7-segment LED display circuit from Lab 1 Part 4 capacitors and resistors for push button switch debouncing and voltage dividing appropriate TTL devices for output buffers limiting resistors for CAM inputs digital multimeter 1.0 µf capacitor and 330 kω resistor for RC circuit Part 1 Analog to digital conversion Using the 10 kω potentiometer on the protoboard and suitable resistors create a circuit to provide a variable V input to the CAM. Use EINT0 to initiate a series of 10 analog to digital conversions and print out the resulting counts to the terminal. Also measure the voltage with a digital multimeter (V DMM ) during the conversion process and record the uncertainty δv DMM in this measurement. Collect data over the full range of voltage inputs (do not worry if your input does not go all the way up to 3.3 V or down to 0.0 V). Use a spreadsheet to find the average and standard deviation of the mean of the ten conversions of each voltage. Use WAPP+ to fit Counts vs. V DMM to a straight line and graph it. Put the fit report and graph in your lab notebook. Comment on the fit parameters. To how many bits is the conversion process accurate? What is the conversion factor for counts to voltage and how does it compare to the theoretical value? After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 2 Measure RC time constant Wire up the simple RC circuit pictured at the right. Measure and record the resistance in your lab notebook. Use the CAM to digitize the voltage on the capacitor and measure elapsed time during a discharge and send these values to the computer. Use EINT0 to trigger a discharge and start the measurement cycle. Note: the capacitor will charge when IO(0)=1 and discharge when IO(0)=0. You may use the CAM to convert the digitized counts to voltages and print the voltage and elapsed time to the terminal. Copy your data to a spreadsheet and use WAPP+ to fit Voltage vs. Time and graph it. Describe in your lab notebook how you found the uncertainties in the voltages. Put the fit report and graph in your lab notebook. Comment on the fit parameters. What is the RC time constant? Calculate the value of your capacitor. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. 7

10 Lab 3 Analog to Digital Conversion This page intentionally left blank. 8

11 Lab 4 I2C Interfacing Introduction In this lab you will interface an I/O expander and EEPROM memory with the CAM using the I2C protocol. Communication with I2C devices is via I2CIN and I2COUT: I2CIN(DATApin, CLKpin, addr, OUTcnt, OUTlist, INcnt, INlist) I2COUT(DATApin, CLKpin, addr, OUTcnt, OUTlist) The PCF8574A I/O expander is a simple slave device that runs at 100 khz, can drive LEDs directly, and has a device address 0111zyxR, where zyx are the logic levels on pins A2, A1, and A0 respectively. R is either 1 for a read operation or 0 for a write operation. It can also generate an interrupt signal with any rising or falling edge of the port inputs when in input mode. Data is sent to the I/O expander one byte at a time so OUTcnt is always 1 in the I2COUT command. Since it has only one internal memory location, data is received by setting OUTcnt to 1, OUTlist to null (i.e., ), and INcnt to 1. The 24LC512 is a 512 Kbit serial EEPROM, meaning that it has 64K bytes of storage. To randomly access this much storage a 16 bit (or 2 byte) address is needed. When using I2CIN with the 24LC512 you pass the desired read memory address in OUTlist. The 24LC512 has a device address of 1010zyxR, where zyx are the logic levels on pins A2, A1, and A0 respectively. R is either 1 for a read operation or 0 for a write operation. Operations on 24LC512 memory chips with the CAM that can be performed are: Operation OUTcnt value OUTlist Byte Write 3 {hiaddr,loaddr,data} Page Write 4 up to 130 {hiaddr,loaddr,data0,...,data127} Current Address Read 1 {} (blank) use Random Read 2 hiaddr,loaddr For read operations, setting INcnt to 1 will perform a byte read and any number greater than 1 will perform a sequential read. Refer to 24LC512 datasheet for restrictions on page writes and sequential reads. Additional Components Needed: the 2 digit 7-segment LED display circuit from Lab 1 Part 4 capacitors and resistors for push button switch debouncing and voltage dividing 2 PCF8574A remote 8-bit I/O expanders for I2C bus 24LC512 I2C bus serial EEPROM pullup resistors for clock, data, and interrupt lines Part 1 Using two 8574As for input and output Revisit Lab 1 Part 4 Strobing two 7-segment displays, but instead of using CAM I/O lines for input and output use A I/O expanders. Instead of using 8 I/O lines from the CAM to drive the segments of the displays, use a 8574A I/O expander with A2, A1, and A0 hardwired to ground so that its address is R (note: R will always be 0 for writes). Since the 8574A runs at 100 khz, you should include #define I2Cspeed100. You will still need 2 CAM I/O lines to control power to each 7-segment display. 9

12 Lab 4 I2C Interfacing Give the second 8574A and address of R (note: R will always be 1 for reads) and connect it to the side-board data switch. When the input changes, the 8574A should send an interrupt to the CAM so that it can read the new data and update the display. Use a delay at the beginning of the interrupt service routine and before reading the data in order to accommodate for switch bounce. The INT requires a pullup resistor (1.0 kω is fine) and goes low when any input pin changes. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 2 I2C memory interfacing Revisit Lab 3 Part 2 Measure RC time constant, but instead of sending data to the computer write it to a 24LC512 I2C bus serial EEPROM. Leave the 8574A used for the 7-segment display. Since the analog to digital converter is good to ten bits, it will take two bytes in the 24LC512 to store the digitized number. If the digitized number is converted to a single precision floating point value, that value will required 32 bits or 4 bytes of storage. Similarly, since TIMER is a 32-bit value it will take four bytes in the 24LC512 to store a single value. Reserve the first two memory locations to store the address high byte and address low byte of the last memory location used. Flash this memory location on the 7-segment display: high byte for 1 second, low byte for 1 second, then blank for 1 second. If you use page writes, be careful to not write across page boundaries (i.e., don t use page writes). For byte writes you may need to insert a delay after each write to allow the EEPROM to complete the writing process. Use EINT2 to tell the CAM to read the 24LC512 and send the data to you computer. Copy your data to a spreadsheet and use WAPP+ to fit Voltage vs. Time and graph it. Put the fit report in your lab notebook. Is the value for your RC time constant the same as what you found in Lab 3 Part 2? After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. 10

13 Lab 5 Matrix Keypads and Multidigit Displays Introduction In this lab you will interface more complex input output devices. A matrix keypad allows for greater flexibility in user input compared to simple pushbuttons or switches. Multidigit displays eliminate the need for software multiplexing, but require more I/O lines for interfacing. The matrix keypad requires 8 connections. All buttons in a common row are connected by a common wire available at pins 1-4 for rows 0-3. All buttons in a common column are connected by a common wire available at pins 5-8 for columns 0-3. In your textbook, the columns have an external 1 kω pull-up resistor, although the keypad will also work if the pull-up resistors are put on the rows instead. The keypad is read by sequentially setting the row lines to LOW and then reading the column lines. When a button in row, col = i, j is pressed, col j only reads LOW when row i is low, otherwise col j is high. The period for changing rows should be in the ms range. 1 GHI 4 PRS ABC 2 JKL 5 DEF 3 MNO 6 TUV WXY 8 9 OPER 0 * # A B C D 16 Button Keypad Top View Pinout Button Location Terminal Location A B C * 0 # D Faceplate Character 16 Button Code and Truth Table Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 (could connect to I/O expander) (could connect to I/O expander) Pull-up Resistors (could be on rows instead) Both polling and interrupt techniques can be used to interface the matrix keypad. Polling techniques require the microcontroller to spend time checking if a key is pressed (executing a loop every hundred milliseconds or so) and then decoding the matrix. Interrupt techniques wait until a key has been pressed before decoding the matrix, thereby freeing up the microcontroller to handle other tasks. Neither approach is superior to the other the best approach depends on the particular application (see pages of your text). If polling is used, 4 digital outputs from the microcontroller are connected to the row pins and are periodically driven low sequentially in order to test whether a button has been pressed. The column lines are connected to 4 digital inputs to the microcontroller and read to see if one of the inputs is LOW. Alternatively, the column lines could be connected to an I/O expander which can then be read after each row line goes low to check if a key has been pressed. These are pure polling techniques. There are several ways to make an interrupt driven keypad system, but I/O expanders with interrupt capabilities facilitate their design. Half the lines of an I/O port are connected to the rows and half are connected to the columns. In some application notes (e.g., AN1081 Interfacing a 4x4 Matrix Keypad with an 8-Bit GPIO Expander, by Mike Curran of Microchip Technology Inc., 2007) the functions of the rows and columns are reversed: columns are output pins and rows are input pins with external pull-up resistors to V DD. When a button is pressed a row input is changed from high to low generating an interrupt. The expander is read to determine the row number, the I/O directions are flipped, and the expander is re-read to determine the column number. 11

14 Lab 5 Matrix Keypads and Multidigit Displays Multidigit displays are nice because they can convey more information than one or two 7-segment displays. However, they have significantly more inputs, so I/O expanders may be necessary. The 4-1/2 digit LCD displays that are available are 40-pin devices with 38 segments that can be activated. Typically not every segment is required for every application (e.g., multimeters would not need the colons and clocks would not need all the decimal points or the ±). In this lab we will use 4 digits, so you will need 2 16-bit I/O expanders la a y x f g b x e d c dp1 dp2 dp3 dp4 DIG. 1 DIG. 2 DIG. 3 DIG. 4 DIG. 5 col2 col3 Pin Seg. COM y 1bc dp1 2e 2d 2c dp2 3e 3d Pin Seg. 3c dp3 4e 4d 4c dp4 5e 5d 5c 5b Pin Seg. 5a 5f 5g 4b 4a 4f 4g col3 3b 3a Pin Seg. 3f 3g col2 2b 2a 2f 2g la x COM 1 20 The MCP23017 is a 16-bit I/O expander with 22 individual registers. Its device address (i.e., control byte) is of the form 0100zyxR, where zyx are the logic levels on pins A2, A1, and A0 respectively. R is either 1 for a read operation or 0 for a write operation. Ten registers are associated with port A and ten are associated with port B. There is one shared register (IOCON). The port A registers are identical to the port B registers. They can be separated by bank (all port A registers at addresses 0x00-0x0A, all port B registers at addresses 0x10-0x1A) or can be paired (addressed sequentially by function first for port A and then for port B). To use these expanders you should first configure them with I2COUT commands before entering your MAIN: loop. I2CIN(DATApin, CLKpin, addr, OUTcnt, OUTlist, INcnt, INlist) I2COUT(DATApin, CLKpin, addr, OUTcnt, OUTlist) GPB0 GPB1 GPB2 GPB3 GPB4 GPB5 GPB6 GPB7 V DD V SS NC SCL SDA NC MCP GPA7 GPA6 GPA5 GPA4 GPA3 GPA2 GPA1 GPA0 INTA INTB RESET A2 16 A1 15 A0 For example, to separate the registers into two banks and disable sequential operation the address of the IOCON register (0x05) is sent followed by the desired data value (0xA0): OUTcnt= 2 and OUTlist=(0x05, 0xA0). Then to read the data present on port A, use I2CIN with OUTcnt=1, OUTlist=(0x09), and INcnt=1. At power on or after a reset the ports are configured as inputs by default. Additional Components Needed: 1 4x4 keypad 1 4-1/2 digit LCD display 1 PCF8574A remote 8-bit I/O expanders for I2C bus 2 MCP23017 remote 16-bit I/O expanders for I2C bus pullup resistors for keypad, clock, data, and interrupt lines capacitors and resistors for push button switch debouncing and voltage dividing Part 1 Polled matrix keypad Connect your matrix keypad directly to the microcontroller. Use the configuration outlined in your 12

15 Lab 5 Matrix Keypads and Multidigit Displays textbook put 10 kω pull-up resistors on columns and periodically drive the rows sequentially low to test for a button being pressed. If you use consecutively numbered I/O lines, your programming code will be more compact. Print out to the terminal the location (0-15) of the button when it is pressed. You ll need to decide on an appropriate polling time so that you capture the button pressing event once and only once. Remember that the interval for changing the row should be in the millisecond range. Show your working system to the instructor. Clearly explain in your lab notebook why you chose the polling time and row interval you ended up using (i.e., what did you see happening that caused you to increase or decrease these times). Part 2 Interrupt-driven matrix keypad Use the INT feature of the 8574A I/O expander to make an interrupt driven keypad interface. Connect the keypad as shown in the diagram. Note that the pull-up resistors are now connected to the keypad rows. Not shown in the diagram are the pull-up resistors for SDA and SCL (2.2 kω) and INT (1.0 kω). The quasi-bidirectional port lines of the 8574A allow the pins to function as either inputs or outputs. An interrupt is generated (INT pulled low) if the data on the port changes. The 8574 is initialized by writing 0xF0 (binary ) to the port so that the rows are high and the columns are low. Matrix Keypad VDD 1 row 0 2 row 1 3 row 2 4 row 3 5 col 0 6 col 1 7 col 2 8 col 3 10kΩ P4 P5 P6 P7 P0 P1 P2 P3 8574A SDA SCL INT When a key is pressed it s corresponding row will go low, changing the data on the port and generating an interrupt. For example, if the 6 key is pressed the data on the port becomes 0xD0 (binary ). If you read the port (which clears the interrupt) and divide the value by 16, the resulting number has a 0 in the bit position corresponding to the row of the key that was pressed. Note that mechanical buttons suffer from switch bounce and that keypads are no exception. Pressing a button may cause multiple interrupts, so your interrupt service routine should wait for a millisecond before doing anything else. Next the direction of the I/O lines of the 8574A is flipped by writing 0x0F to the port making all rows low and all columns high. However, because a key is still pressed one of the columns will stay low (in this example with 6 pressed column 2 will be low). Reading the port gives a number that has a 0 in the bit position corresponding to the column of the key that was pressed. In this example, you would read 0x0B (binary ) from the port. The last step is to flip the I/O directions back to their original state by writing 0xF0 to the port. If this is done immediately then another interrupt will be generated when the button is released. You can test for button release by reading the port until its value goes back to 0x0F. After the port returns to this state, then flip the I/O directions back by writing 0xF0 to the port. To convert the bit positions to a number, you can use the compact code shown to the right. Once this is done for the row and column values, then the button location is obtained from key=4*row+col. Print this button location out to the terminal only if a button is pressed. j=16 FOR i=3 DOWNTO 0 j >>= 1 IF (row AND j)=0 THEN row=i EXIT ENDIF NEXT i Show your working system to the instructor. Do you ever see a button location outside the range 0-15? If so, when does it occur? Give an explanation of why it occurs. Do not dismantle this circuit you will use it in part 3. 13

16 Lab 5 Matrix Keypads and Multidigit Displays Part 3 Multidigit displays The multidigit displays have 4-1/2 LCD digits. To activate the segment of a digit its corresponding pin must be made high. Each digit has 7 segments and a leading decimal point, so it is convenient to use a single 8-bit port to drive them (e.g., one port can drive segments 5a-5g and dp4). Use 2 MCP23017s to drive digits 2-5 and dp1-dp4 in this manner. A single PCF8574A could then be used to drive digit 1, col2, col3, x, y, and la (only 6 bits are required), but we will not use them in this lab. Your goal is to start with a blank display and then scroll characters across the display as keypad buttons are pressed. You will need to map the button location to a byte that will be sent to the correct MCP23017 port to display a proper hexadecimal digit corresponding to the value on the keypad button (0-9, A-D). When the asterisk key (*) is pressed E should be displayed and when the pound key (#) is pressed F should be displayed. Make sure to check for button location values that are out of bounds and do not update the display if this event occurs. Only update the display when a valid key is pressed. For example, after starting the program if you press buttons 2-C-#-9-4-B-* the display should show: blank 2 2C 2CF 2CF 9 CF 94 F 94B 94BE Make sure the MCP23017s have different hardware addresses and that you connect their reset lines to V DD. Note that the default power-on state of the MCP23017s is to be in paired mode (IOCON.BANK=0) with port pins set as inputs (IODIRA=IODIRB=0xFF). Therefore, the only configuration you have to do is to set the port pins as outputs. Thereafter you send data to registers GPIOA (hex address 12) and GPIOB (hex address 13). Since the keypad is interrupt driven, have your main program continuously send data to the I/O expanders. View SCL and SDA on an oscilloscope. Sketch their waveforms in your lab notebook and identify each bit in the data sequence as well as the start and stop conditions. Show your working system to the instructor. 14

17 Lab 6 Device Interfacing Introduction In this lab you will interface various devices that are typically used in standalone microcontroller applications. In part 1 you will control a DC motor using interrupts to spin up and spin down the motor. These interrupts could be generated by other devices such light detectors and range finders, but we will use pushbuttons in this lab. In part 2 you will measure the output of a phototransistor circuit which is properly interfaced to the analog to digital converter. In part 3 you will modify your phototransistor circuit to provide a digital input to the microcontroller. Additional Components Needed: the 2 digit 7-segment LED display circuit from Lab 1 Part and 3.3 voltage regulators Lambda power supply, function generator, and oscilloscope various discrete components (see descriptions for each part below) Part 1 DC motor control You will use hardware pulse width modulation to bring a motor up to its maximum speed and then back down by activating push buttons as in Lab 2 Part 3 Pulse width modulation with external interrupts. You may use the same control program that you used in Lab 2 Part 3 with the exception that you will have to determine the best driving frequency. DC motors have intrinsic resistance, capacitance, and inductance that may change with the frequency of the applied driving current which is being switched on and off. You can quantitatively determine the best frequency by first driving the motor with a TTL pulse train (equivalent to a 50% duty cycle) and measuring the speed of the motor. In this lab you will not do a quatitative assessment, only a qualitative assessment of a good frequency by observing the speed of the motor. You should end up with a frequency between 100 Hz and 1 khz depending on which motor you use. The motors run at either 5 V, 12 V, or 27 V (check the label on the motor) so set up a Lambda power supply to provide this V s. You will also need to determine appropriate values for R 1 and R 2 based on maximum ratings for input and output current listed in the MCT272 datasheet. The diode is used to block current produced by back emf when the power switches off. Be sure to describe how you chose your driving frequency, R 1, and R 2 in you lab notebook. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. 15

18 Lab 6 Device Interfacing Part 2 Phototransistor analog interfacing Use a FPT5902 phototransistor and a LF356 opamp to generate an analog signal to be measured by the microprocessor. Choose feedback resistors that do not saturate the output when the phototransistor is illuminated with a flashlight. Use +3.3 and 3.3 voltage regulators to provide V CC and V EE to the opamp and bias to the phototransistor. You could end up with lots of data, so start and end the measurements with push buttons. Start a measurement, quickly pass the flashlight over the phototransistor, and end the measurement. Collect time and voltage data during the measurement cycle and print it to the screen so you can graph it and include it in your lab notebook. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. Part 3 Phototransistor digital interfacing Use the FPT5902 in a common-collector amplifier configuration to provide a digital input to the microcontroller. Be sure to use a high enough resistance so that the photodiode operates in switch mode. The microprocessor should continually read the output and display its status on a single LED (on if illuminated, off if not). Your circuit should also have an enable feature provided by the microprocessor so that when the circuit is disabled by the microprocessor the output is always low. Use a single push button to activate and deactivate the enable feature. After your program works make sure to save it and print it out for inclusion in your lab report. Show your working system to the instructor. 16

19 Lab 7 Project Using what you have learned in class design your own microcontroller circuit that meets the following requirements: 1. uses at least one interrupt 2. uses at least one analog or digital input 3. uses at least one output (digital, PWM, pulse) for control 4. incorporates at least one I2C device in some useful way 5. provides feedback to the user in the form of LEDs or 7-segment displays If a particular input or output device is not on hand you may simulate its presence with other electronics after first researching the device s specifications. For example, frequency inputs can be simulated with a function generator, digital inputs with switches, and analog inputs with potentiometers; outputs can be displayed on an oscilloscope or voltmeter. Your project must be pre-approved by the instructor before lecture on Tuesday, November 11. At the beginning of lab on November 13 you will turn in a copy of your Product Requirements Specification and top level design. Your second level and detailed designs are due at the beginning of class on Tuesday, November 18. All that will be left to do in lab is code the microcontroller and build the interface. Document your work in your lab notebook. Put a copy of your program in your lab notebook. Show your working system to the instructor. Write up your project in a short (3-10 pages) report that includes a copy of your control program at the end. 17

Alice EduPad Board. User s Guide Version /11/2017

Alice EduPad Board. User s Guide Version /11/2017 Alice EduPad Board User s Guide Version 1.02 08/11/2017 1 Table OF Contents Chapter 1. Overview... 3 1.1 Welcome... 3 1.2 Launchpad features... 4 1.3 Alice EduPad hardware features... 4 Chapter 2. Software

More information

ECE 372 Microcontroller Design

ECE 372 Microcontroller Design E.g. Port A, Port B Used to interface with many devices Switches LEDs LCD Keypads Relays Stepper Motors Interface with digital IO requires us to connect the devices correctly and write code to interface

More information

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore) Laboratory 11 Digital Displays and Logic (modified from lab text by Alciatore) Required Components: 2x lk resistors 1x 10M resistor 3x 0.1 F capacitor 1x 555 timer 1x 7490 decade counter 1x 7447 BCD to

More information

Data Sheet. Electronic displays

Data Sheet. Electronic displays Data Pack F Issued November 0 029629 Data Sheet Electronic displays Three types of display are available; each has differences as far as the display appearance, operation and electrical characteristics

More information

16 Stage Bi-Directional LED Sequencer

16 Stage Bi-Directional LED Sequencer 16 Stage Bi-Directional LED Sequencer The bi-directional sequencer uses a 4 bit binary up/down counter (CD4516) and two "1 of 8 line decoders" (74HC138 or 74HCT138) to generate the popular "Night Rider"

More information

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM MDETS UCTECH's Modular Digital Electronics Training System is a modular course covering the fundamentals, concepts, theory and applications of digital electronics.

More information

Chapter 9 MSI Logic Circuits

Chapter 9 MSI Logic Circuits Chapter 9 MSI Logic Circuits Chapter 9 Objectives Selected areas covered in this chapter: Analyzing/using decoders & encoders in circuits. Advantages and disadvantages of LEDs and LCDs. Observation/analysis

More information

Laboratory 8. Digital Circuits - Counter and LED Display

Laboratory 8. Digital Circuits - Counter and LED Display Laboratory 8 Digital Circuits - Counter and Display Required Components: 2 1k resistors 1 10M resistor 3 0.1 F capacitor 1 555 timer 1 7490 decade counter 1 7447 BCD to decoder 1 MAN 6910 or LTD-482EC

More information

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver EM MICROELECTRONIC - MARIN SA 2, 4 and 8 Mutiplex LCD Driver Description The is a universal low multiplex LCD driver. The version 2 drives two ways multiplex (two blackplanes) LCD, the version 4, four

More information

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER ECB2212 - DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER SUBMITTED BY ASHRAF HUSSAIN (160051601105) S SAMIULLAH (160051601059) CONTENTS >AIM >INTRODUCTION

More information

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter page 1 of 5 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter Introduction In this lab, you will learn about the behavior of the D flip-flop, by employing it in 3 classic circuits:

More information

TV Character Generator

TV Character Generator TV Character Generator TV CHARACTER GENERATOR There are many ways to show the results of a microcontroller process in a visual manner, ranging from very simple and cheap, such as lighting an LED, to much

More information

Alice EduPad for Tiva or MSP432 TI ARM Launchpad. User s Guide Version /23/2017

Alice EduPad for Tiva or MSP432 TI ARM Launchpad. User s Guide Version /23/2017 Alice EduPad for Tiva or MSP432 TI ARM Launchpad User s Guide Version 1.02 08/23/2017 1 Table OF Contents Chapter 1. Overview... 3 1.1 Welcome... 3 1.2 Tiva Launchpad features... 4 1.3 Alice EduPad hardware

More information

Although the examples given in this application note are based on the ZX-24, the principles can be equally well applied to the other ZX processors.

Although the examples given in this application note are based on the ZX-24, the principles can be equally well applied to the other ZX processors. ZBasic Application Note Introduction On more complex projects it is often the case that more I/O lines are needed than the number that are available on the chosen processor. In this situation, you might

More information

University of Illinois at Urbana-Champaign

University of Illinois at Urbana-Champaign University of Illinois at Urbana-Champaign Digital Electronics Laboratory Physics Department Physics 40 Laboratory Experiment 3: CMOS Digital Logic. Introduction The purpose of this lab is to continue

More information

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual University of Victoria Department of Electrical and Computer Engineering CENG 290 Digital Design I Lab Manual INDEX Introduction to the labs Lab1: Digital Instrumentation Lab2: Basic Digital Components

More information

SDA 3302 Family. GHz PLL with I 2 C Bus and Four Chip Addresses

SDA 3302 Family. GHz PLL with I 2 C Bus and Four Chip Addresses GHz PLL with I 2 C Bus and Four Chip Addresses Preliminary Data Features 1-chip system for MPU control (I 2 C bus) 4 programmable chip addresses Short pull-in time for quick channel switch-over and optimized

More information

Embedded System Training Module ABLab Solutions

Embedded System Training Module ABLab Solutions Embedded System Training Module ABLab Solutions www.ablab.in Table of Contents Course Outline... 4 1. Introduction to Embedded Systems... 4 2. Overview of Basic Electronics... 4 3. Overview of Digital

More information

UNIT V 8051 Microcontroller based Systems Design

UNIT V 8051 Microcontroller based Systems Design UNIT V 8051 Microcontroller based Systems Design INTERFACING TO ALPHANUMERIC DISPLAYS Many microprocessor-controlled instruments and machines need to display letters of the alphabet and numbers. Light

More information

Marks and Grades Project

Marks and Grades Project Marks and Grades Project This project uses the HCS12 to allow for user input of class grades to determine the letter grade and overall GPA for all classes. Interface: The left-most DIP switch (SW1) is

More information

Reaction Game Kit MitchElectronics 2019

Reaction Game Kit MitchElectronics 2019 Reaction Game Kit MitchElectronics 2019 www.mitchelectronics.co.uk CONTENTS Schematic 3 How It Works 4 Materials 6 Construction 8 Important Information 9 Page 2 SCHEMATIC Page 3 SCHEMATIC EXPLANATION The

More information

DRAFT Microprocessors B Lab 3 Spring PIC24 Inter-Integrated Circuit (I 2 C)

DRAFT Microprocessors B Lab 3 Spring PIC24 Inter-Integrated Circuit (I 2 C) PIC24 Inter-Integrated Circuit (I 2 C) Lab Report Objectives Materials See separate report form located on the course webpage. This form should be completed during the performance of this lab. 1) To utilize

More information

Table of Contents Introduction

Table of Contents Introduction Page 1/9 Waveforms 2015 tutorial 3-Jan-18 Table of Contents Introduction Introduction to DAD/NAD and Waveforms 2015... 2 Digital Functions Static I/O... 2 LEDs... 2 Buttons... 2 Switches... 2 Pattern Generator...

More information

Chapter 3: Sequential Logic Systems

Chapter 3: Sequential Logic Systems Chapter 3: Sequential Logic Systems 1. The S-R Latch Learning Objectives: At the end of this topic you should be able to: design a Set-Reset latch based on NAND gates; complete a sequential truth table

More information

WINTER 15 EXAMINATION Model Answer

WINTER 15 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

The Micropython Microcontroller

The Micropython Microcontroller Please do not remove this manual from the lab. It is available via Canvas Electronics Aims of this experiment Explore the capabilities of a modern microcontroller and some peripheral devices. Understand

More information

7 SEGMENT LED DISPLAY KIT

7 SEGMENT LED DISPLAY KIT ESSENTIAL INFORMATION BUILD INSTRUCTIONS CHECKING YOUR PCB & FAULT-FINDING MECHANICAL DETAILS HOW THE KIT WORKS CREATE YOUR OWN SCORE BOARD WITH THIS 7 SEGMENT LED DISPLAY KIT Version 2.0 Which pages of

More information

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

DIGITAL ELECTRONICS: LOGIC AND CLOCKS DIGITL ELECTRONICS: LOGIC ND CLOCKS L 6 INTRO: INTRODUCTION TO DISCRETE DIGITL LOGIC, MEMORY, ND CLOCKS GOLS In this experiment, we will learn about the most basic elements of digital electronics, from

More information

Sequential Logic Basics

Sequential Logic Basics Sequential Logic Basics Unlike Combinational Logic circuits that change state depending upon the actual signals being applied to their inputs at that time, Sequential Logic circuits have some form of inherent

More information

Vorne Industries. 87/719 Analog Input Module User's Manual Industrial Drive Itasca, IL (630) Telefax (630)

Vorne Industries. 87/719 Analog Input Module User's Manual Industrial Drive Itasca, IL (630) Telefax (630) Vorne Industries 87/719 Analog Input Module User's Manual 1445 Industrial Drive Itasca, IL 60143-1849 (630) 875-3600 Telefax (630) 875-3609 . 3 Chapter 1 Introduction... 1.1 Accessing Wiring Connections

More information

LABORATORY # 1 LAB MANUAL. Digital Signals

LABORATORY # 1 LAB MANUAL. Digital Signals Department of Electrical Engineering University of California Riverside Laboratory #1 EE 120 A LABORATORY # 1 LAB MANUAL Digital Signals 2 Objectives Lab 1 contains 3 (three) parts and the objectives are

More information

EECS 140 Laboratory Exercise 7 PLD Programming

EECS 140 Laboratory Exercise 7 PLD Programming 1. Objectives EECS 140 Laboratory Exercise 7 PLD Programming A. Become familiar with the capabilities of Programmable Logic Devices (PLDs) B. Implement a simple combinational logic circuit using a PLD.

More information

uresearch GRAVITECH.US GRAVITECH GROUP Copyright 2007 MicroResearch GRAVITECH GROUP

uresearch GRAVITECH.US GRAVITECH GROUP Copyright 2007 MicroResearch GRAVITECH GROUP GRAVITECH.US uresearch GRAVITECH GROUP Description The I2C-7SEG board is a 5-pin CMOS device that provides 4-digit of 7-segment display using I 2 C bus. There are no external components required. Only

More information

Experiment # 4 Counters and Logic Analyzer

Experiment # 4 Counters and Logic Analyzer EE20L - Introduction to Digital Circuits Experiment # 4. Synopsis: Experiment # 4 Counters and Logic Analyzer In this lab we will build an up-counter and a down-counter using 74LS76A - Flip Flops. The

More information

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

SWITCH: Microcontroller Touch-switch Design & Test (Part 2) SWITCH: Microcontroller Touch-switch Design & Test (Part 2) 2 nd Year Electronics Lab IMPERIAL COLLEGE LONDON v2.09 Table of Contents Equipment... 2 Aims... 2 Objectives... 2 Recommended Timetable... 2

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Nate Pihlstrom, npihlstr@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

PB-507. Advanced Analog & Digital Electronic Design Workstation Instruction Manual. Revision: 2/2014

PB-507. Advanced Analog & Digital Electronic Design Workstation Instruction Manual. Revision: 2/2014 PB-507 Advanced Analog & Digital Electronic Design Workstation Instruction Manual Revision: 2/2014 Test Equipment Depot - 800.517.8431-99 Washington Street Melrose, MA 02176 TestEquipmentDepot.com 1 1

More information

Contents Circuits... 1

Contents Circuits... 1 Contents Circuits... 1 Categories of Circuits... 1 Description of the operations of circuits... 2 Classification of Combinational Logic... 2 1. Adder... 3 2. Decoder:... 3 Memory Address Decoder... 5 Encoder...

More information

PHYS 3322 Modern Laboratory Methods I Digital Devices

PHYS 3322 Modern Laboratory Methods I Digital Devices PHYS 3322 Modern Laboratory Methods I Digital Devices Purpose This experiment will introduce you to the basic operating principles of digital electronic devices. Background These circuits are called digital

More information

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University EECTRICA ENGINEERING DEPARTMENT California Polytechnic State University EE 361 NAND ogic Gate, RS Flip-Flop & JK Flip-Flop Pre-lab 7 1. Draw the logic symbol and construct the truth table for a NAND gate.

More information

DX-10 tm Digital Interface User s Guide

DX-10 tm Digital Interface User s Guide DX-10 tm Digital Interface User s Guide GPIO Communications Revision B Copyright Component Engineering, All Rights Reserved Table of Contents Foreword... 2 Introduction... 3 What s in the Box... 3 What

More information

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE Y Y Y Y Y 82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE Compatible with all Intel and Most Other Microprocessors High Speed Zero Wait State Operation with 8 MHz 8086 88 and 80186 188 24 Programmable I

More information

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Design and Implementation of Timer, GPIO, and 7-segment Peripherals Design and Implementation of Timer, GPIO, and 7-segment Peripherals 1 Module Overview Learn about timers, GPIO and 7-segment display; Design and implement an AHB timer, a GPIO peripheral, and a 7-segment

More information

Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010

Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010 Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010 Andrew C. and Julia A. DLD Final Project Spring 2010 Abstract For our final project, we created a game on a grid of 72 LED s (9 rows

More information

SPI Serial Communication and Nokia 5110 LCD Screen

SPI Serial Communication and Nokia 5110 LCD Screen 8 SPI Serial Communication and Nokia 5110 LCD Screen 8.1 Objectives: Many devices use Serial Communication to communicate with each other. The advantage of serial communication is that it uses relatively

More information

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD 64 CH SEGMENT DRIVER FOR DOT MATRIX LCD June. 2000. Ver. 0.0 Contents in this document are subject to change without notice. No part of this document may be reproduced or transmitted in any form or by

More information

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of applications such as home appliances, medical, automotive,

More information

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops Objective Construct a two-bit binary decoder. Study multiplexers (MUX) and demultiplexers (DEMUX). Construct an RS flip-flop from discrete gates.

More information

PHY 351/651 LABORATORY 9 Digital Electronics The Basics

PHY 351/651 LABORATORY 9 Digital Electronics The Basics PHY 351/651 LABORATORY 9 Digital Electronics The Basics Reading Assignment Horowitz, Hill Chap. 8 Data sheets 74HC10N, 74HC86N, 74HC04N, 74HC03N, 74HC32N, 74HC08N, CD4007UBE, 74HC76N, LM555 Overview Over

More information

WINTER 14 EXAMINATION

WINTER 14 EXAMINATION Subject Code: 17320 WINTER 14 EXAMINATION Model Answer Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2)

More information

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH CPE 200L LABORATORY 3: SEUENTIAL LOGIC CIRCUITS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOALS: Learn to use Function Generator and Oscilloscope on the breadboard.

More information

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST Program of Study Accelerated Digital Electronics TJHSST Dave Bell Course Selection Guide Description: Students learn the basics of digital electronics technology as they engineer a complex electronic system.

More information

EE292: Fundamentals of ECE

EE292: Fundamentals of ECE EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 23 121120 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Combinatorial Logic Sequential Logic 3 Combinatorial Logic Circuits

More information

NS8050U MICROWIRE PLUSTM Interface

NS8050U MICROWIRE PLUSTM Interface NS8050U MICROWIRE PLUSTM Interface National Semiconductor Application Note 358 Rao Gobburu James Murashige April 1984 FIGURE 1 Microwire Mode Functional Configuration TRI-STATE is a registered trademark

More information

Point System (for instructor and TA use only)

Point System (for instructor and TA use only) EEL 4744C - Drs. George and Gugel Spring Semester 2002 Final Exam NAME SS# Closed book and closed notes examination to be done in pencil. Calculators are permitted. All work and solutions are to be written

More information

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533 Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop Course project for ECE533 I. Objective: REPORT-I The objective of this project is to design a 4-bit counter and implement it into a chip

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus SOLUTIONS TO INTERNAL ASSESSMENT TEST 3 Date : 8/11/2016 Max Marks: 40 Subject & Code : Analog and Digital Electronics (15CS32) Section: III A and B Name of faculty: Deepti.C Time : 11:30 am-1:00 pm Note:

More information

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum Arif Sirinterlikci Ohio Northern University Background Ohio Northern University Technological Studies Department

More information

Chapter 7 Memory and Programmable Logic

Chapter 7 Memory and Programmable Logic EEA091 - Digital Logic 數位邏輯 Chapter 7 Memory and Programmable Logic 吳俊興國立高雄大學資訊工程學系 2006 Chapter 7 Memory and Programmable Logic 7-1 Introduction 7-2 Random-Access Memory 7-3 Memory Decoding 7-4 Error

More information

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs 7-Segment Decoder/Driver/Latch with Constant Current Source Outputs General Description The DM9368 is a 7-segment decoder driver incorporating input latches and constant current output circuits to drive

More information

Physics 323. Experiment # 10 - Digital Circuits

Physics 323. Experiment # 10 - Digital Circuits Physics 323 Experiment # 10 - Digital Circuits Purpose This is a brief introduction to digital (logic) circuits using both combinational and sequential logic. The basic building blocks will be the Transistor

More information

Digital Delay / Pulse Generator DG535 Digital delay and pulse generator (4-channel)

Digital Delay / Pulse Generator DG535 Digital delay and pulse generator (4-channel) Digital Delay / Pulse Generator Digital delay and pulse generator (4-channel) Digital Delay/Pulse Generator Four independent delay channels Two fully defined pulse channels 5 ps delay resolution 50 ps

More information

Chapter 9 Introduction to Sequential Logic

Chapter 9 Introduction to Sequential Logic Chapter 9 Introduction to Sequential Logic Chapter Objectives Upon successful completion of this chapter, you will be able to: Explain the difference between combinational and sequential circuits. Define

More information

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory RPI Rensselaer Polytechnic Institute Computer Hardware Design ECSE 4770 Report Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory Name: Walter Dearing Group: Brad Stephenson David Bang

More information

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

64CH SEGMENT DRIVER FOR DOT MATRIX LCD 64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION The (TQFP type: S6B2108) is a LCD driver LSI with 64 channel output for dot matrix liquid crystal graphic display systems. This device consists of the

More information

Due date: Sunday, December 5 (midnight) Reading: HH section (pgs ), mbed tour

Due date: Sunday, December 5 (midnight) Reading: HH section (pgs ), mbed tour 13 Microcontroller Due date: Sunday, December 5 (midnight) Reading: HH section 10.01 (pgs. 673 678), mbed tour http://mbed.org/handbook/tour A microcontroller is a tiny computer system, complete with microprocessor,

More information

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9 Digilent DIO4 Peripheral Board Reference Manual www.digilentinc.com Revision: August 11, 2004 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The DIO4 circuit board provides

More information

Lab 17: Building a 4-Digit 7-Segment LED Decoder

Lab 17: Building a 4-Digit 7-Segment LED Decoder Phys2303 L.A. Bumm [Basys3 1.2.1] Lab 17 (p1) Lab 17: Building a 4-Digit 7-Segment LED Decoder In this lab you will make 5 test circuits in addition to the 4-digit 7-segment decoder. The test circuits

More information

4.9 BEAM BLANKING AND PULSING OPTIONS

4.9 BEAM BLANKING AND PULSING OPTIONS 4.9 BEAM BLANKING AND PULSING OPTIONS Beam Blanker BNC DESCRIPTION OF BLANKER CONTROLS Beam Blanker assembly Electron Gun Controls Blanker BNC: An input BNC on one of the 1⅓ CF flanges on the Flange Multiplexer

More information

Solutions to Embedded System Design Challenges Part II

Solutions to Embedded System Design Challenges Part II Solutions to Embedded System Design Challenges Part II Time-Saving Tips to Improve Productivity In Embedded System Design, Validation and Debug Hi, my name is Mike Juliana. Welcome to today s elearning.

More information

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur SEQUENTIAL LOGIC Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur www.satish0402.weebly.com OSCILLATORS Oscillators is an amplifier which derives its input from output. Oscillators

More information

INTRODUCTION (EE2499_Introduction.doc revised 1/1/18)

INTRODUCTION (EE2499_Introduction.doc revised 1/1/18) INTRODUCTION (EE2499_Introduction.doc revised 1/1/18) A. PARTS AND TOOLS: This lab involves designing, building, and testing circuits using design concepts from the Digital Logic course EE-2440. A locker

More information

FLIP-FLOPS AND RELATED DEVICES

FLIP-FLOPS AND RELATED DEVICES C H A P T E R 5 FLIP-FLOPS AND RELATED DEVICES OUTLINE 5- NAND Gate Latch 5-2 NOR Gate Latch 5-3 Troubleshooting Case Study 5-4 Digital Pulses 5-5 Clock Signals and Clocked Flip-Flops 5-6 Clocked S-R Flip-Flop

More information

EECS145M 2000 Midterm #1 Page 1 Derenzo

EECS145M 2000 Midterm #1 Page 1 Derenzo UNIVERSITY OF CALIFORNIA College of Engineering Electrical Engineering and Computer Sciences Department EECS 145M: Microcomputer Interfacing Laboratory Spring Midterm #1 (Closed book- calculators OK) Wednesday,

More information

Lab #10: Building Output Ports with the 6811

Lab #10: Building Output Ports with the 6811 1 Tiffany Q. Liu April 11, 2011 CSC 270 Lab #10 Lab #10: Building Output Ports with the 6811 Introduction The purpose of this lab was to build a 1-bit as well as a 2-bit output port with the 6811 training

More information

Combo Board.

Combo Board. Combo Board www.matrixtsl.com EB083 Contents About This Document 2 General Information 3 Board Layout 4 Testing This Product 5 Circuit Diagram 6 Liquid Crystal Display 7 Sensors 9 Circuit Diagram 10 About

More information

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus Part I 0. In this part of the lab you investigate the 164 a serial-in, 8-bit-parallel-out, shift register. 1. Press in (near the LEDs) a 164.

More information

DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201)

DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201) DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201) Instructor Name: Student Name: Roll Number: Semester: Batch: Year: Department:

More information

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs DM9368 7-Segment Decoder/Driver/Latch with Constant Current Source Outputs General Description The DM9368 is a 7-segment decoder driver incorporating input latches and constant current output circuits

More information

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science at UCF What is the DAC? The DAC is an array of

More information

Engineering College. Electrical Engineering Department. Digital Electronics Lab

Engineering College. Electrical Engineering Department. Digital Electronics Lab Engineering College Electrical Engineering Department Digital Electronics Lab Prepared by: Dr. Samer Mayaleh Eng. Nuha Odeh 2009/2010-1 - CONTENTS Experiment Name Page 1- Measurement of Basic Logic Gates

More information

ECE 2274 Pre-Lab for Experiment Timer Chip

ECE 2274 Pre-Lab for Experiment Timer Chip ECE 2274 Pre-Lab for Experiment 6 555 Timer Chip Introduction to the 555 Timer The 555 IC is a popular chip for acting as multivibrators. Go to the web to obtain a data sheet to be turn-in with the pre-lab.

More information

Overview of All Pixel Circuits for Active Matrix Organic Light Emitting Diode (AMOLED)

Overview of All Pixel Circuits for Active Matrix Organic Light Emitting Diode (AMOLED) Chapter 2 Overview of All Pixel Circuits for Active Matrix Organic Light Emitting Diode (AMOLED) ---------------------------------------------------------------------------------------------------------------

More information

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit) Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6. - Introductory Digital Systems Laboratory (Spring 006) Laboratory - Introduction to Digital Electronics

More information

Data Acquisition Using LabVIEW

Data Acquisition Using LabVIEW Experiment-0 Data Acquisition Using LabVIEW Introduction The objectives of this experiment are to become acquainted with using computer-conrolled instrumentation for data acquisition. LabVIEW, a program

More information

LED Array Board.

LED Array Board. LED Array Board www.matrixtsl.com EB087 Contents About This Document 2 General Information 3 Board Layout 4 Testing This Product 5 Circuit Description 6 Circuit Diagram 7 About This Document This document

More information

Light Emitting Diodes and Digital Circuits I

Light Emitting Diodes and Digital Circuits I LED s and Digital Circuits I. p. 1 Light Emitting Diodes and Digital Circuits I Tasks marked by an asterisk (*) may be carried out before coming to the lab. The Light Emitting Diode: The light emitting

More information

Decade Counters Mod-5 counter: Decade Counter:

Decade Counters Mod-5 counter: Decade Counter: Decade Counters We can design a decade counter using cascade of mod-5 and mod-2 counters. Mod-2 counter is just a single flip-flop with the two stable states as 0 and 1. Mod-5 counter: A typical mod-5

More information

Combinational vs Sequential

Combinational vs Sequential Combinational vs Sequential inputs X Combinational Circuits outputs Z A combinational circuit: At any time, outputs depends only on inputs Changing inputs changes outputs No regard for previous inputs

More information

Microcontrollers and Interfacing week 7 exercises

Microcontrollers and Interfacing week 7 exercises SERIL TO PRLLEL CONVERSION Serial to parallel conversion Microcontrollers and Interfacing week exercises Using many LEs (e.g., several seven-segment displays or bar graphs) is difficult, because only a

More information

Mission. Lab Project B

Mission. Lab Project B Mission You have been contracted to build a Launch Sequencer (LS) for the Space Shuttle. The purpose of the LS is to control the final sequence of events starting 15 seconds prior to launch. The LS must

More information

Part No. ENC-LAB01 Users Manual Introduction EncoderLAB

Part No. ENC-LAB01 Users Manual Introduction EncoderLAB PCA Incremental Encoder Laboratory For Testing and Simulating Incremental Encoder signals Part No. ENC-LAB01 Users Manual The Encoder Laboratory combines into the one housing and updates two separate encoder

More information

Spring 2011 Microprocessors B Course Project (30% of your course Grade)

Spring 2011 Microprocessors B Course Project (30% of your course Grade) Course Project guidelines Spring 2011 Microprocessors B 17.384 Course Project (30% of your course Grade) Overall Guidelines Design a fairly complex system that contains at least one microcontroller (the

More information

ET-REMOTE DISTANCE. Manual of ET-REMOTE DISTANCE

ET-REMOTE DISTANCE. Manual of ET-REMOTE DISTANCE ET-REMOTE DISTANCE ET-REMOTE DISTANCE is Distance Measurement Module by Ultrasonic Waves; it consists of 2 important parts. Firstly, it is the part of Board Ultrasonic (HC-SR04) that includes sender and

More information

Chapter 5 Flip-Flops and Related Devices

Chapter 5 Flip-Flops and Related Devices Chapter 5 Flip-Flops and Related Devices Chapter 5 Objectives Selected areas covered in this chapter: Constructing/analyzing operation of latch flip-flops made from NAND or NOR gates. Differences of synchronous/asynchronous

More information

Digital Circuits I and II Nov. 17, 1999

Digital Circuits I and II Nov. 17, 1999 Physics 623 Digital Circuits I and II Nov. 17, 1999 Digital Circuits I 1 Purpose To introduce the basic principles of digital circuitry. To understand the small signal response of various gates and circuits

More information

A 400MHz Direct Digital Synthesizer with the AD9912

A 400MHz Direct Digital Synthesizer with the AD9912 A MHz Direct Digital Synthesizer with the AD991 Daniel Da Costa danieljdacosta@gmail.com Brendan Mulholland firemulholland@gmail.com Project Sponser: Dr. Kirk W. Madison Project 11 Engineering Physics

More information

MODULE 3. Combinational & Sequential logic

MODULE 3. Combinational & Sequential logic MODULE 3 Combinational & Sequential logic Combinational Logic Introduction Logic circuit may be classified into two categories. Combinational logic circuits 2. Sequential logic circuits A combinational

More information

CSE 352 Laboratory Assignment 3

CSE 352 Laboratory Assignment 3 CSE 352 Laboratory Assignment 3 Introduction to Registers The objective of this lab is to introduce you to edge-trigged D-type flip-flops as well as linear feedback shift registers. Chapter 3 of the Harris&Harris

More information

Nuvoton Touch Key Series NT086D Datasheet

Nuvoton Touch Key Series NT086D Datasheet DATASHEET Touch Key Series Nuvoton Touch Key Series Datasheet The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced

More information