Lab 4: Advanced Counters Physics 352L Section: 450 Friday, February 31st, 2014 Dr. Hugon Harris Pharr I have neither given nor received any unauthorized aid on this assignment: Introduction: This lab proved to be a very intense investigation into the functions of a counter and the various methods available to control the counter such as through LABVIEW. The lab started with a brief explanation of bouncing and investigated the various means of debouncing a circuit. The lab utilizes the 74193 counter that with a variety of drivers from personal YOCKLs and even LABVIEW.vi’s. This lab also investigates the multiple controls of this counter which will be controlled via the LABVIEW’s front panel. Section A: Birthday Counter: Figure 1: Birthday counter circuit using 74193N chip and an LCD display my X XM The figure above disaplys the circuit we constructed in part A of the lab. Using a 74193 counter and a digital clock set at 100Hz as an input, I displayed the output on a Blue LCD panel on the right. My birthday is August 7th, 1992 and the closest odd integer I chose was 7 hence why the LCD counter reset when set to 7. A video and the VI simuation file was sent to the TA. In the lab I constructed this same mod-7 counter used my personal YOCLK as the clock input on the 74193 chip. The 4 outputs were connected to LCDs on the black box which displayed the binary output from the 74193 chip. In order to make the LCDs reset at binary 7 (0111) the 4th output was connected to the clear output causing binary 8 (1000) to clear which caused the counter to reset and recount to 7. A video of this was emailed to the TA. When I added the JK making the circuit a mod 16+7=23=mod23 counter, I kept J and K high causing the counter to toggle once last out was inserted into the clock of the JK. A video of this was also emailed to the TA also. Figure 2: Circuit diagram for the 74193 counter. Section B: Reading the out of the 74193 counter. The purpose of this section of the lab was to demonstrate out ability to use our Counter.vi to operate and control the 74193 counter. I connected the outputs Q0-Q3 to P0-P3 on the DAQ. I then read the outputs of from Q0-Q3 on the DAQ through inputs P0-P3 and displayed their values in binary, decimal, and hexadecimal through the VI displayed below along with a digital graph. I sent a video of the circuit and the display of the VI to the TA. I then used a clock output from the DAQ I programed into the VI as I was unable to get my clock on my BB to function. I was able to adjust the frequency and read it so that when the clock was delay 500ms, the frequency was 2Hz. The frequency was then adjusted on my VI to determine the maximum frequency obtained from the digital line of the DAQ and found to be around 200Hz. A video of this was also sent to the TA. Displayed below is the block diagram from my VI, it was a very large VI and required multiple screenshots. I also sent the VI to the TA and will upload to my website (https://harrispharr.web.unc.edu/). Figure 3: Labview Front Panel and Block Diagram for sections B-E Section C: Basic LABVIEW controls of the 74193 counter. Using the clock signal from a digital line from my DAQ board, I adjusted the frequency using the control panel of my VI to determine the max frequency that the digital line could output. I found this max frequency to be around 250Hz and any output other than that cause the graph which displayed the output to not display correctly. A video of this was sent to the TA. I then modified the COUNTER.vi to allowed loading set into the register of the 74193 counter. I counted the P0-P3 data inputs and LOAD into the digital lines. I connected the CLEAR and TCup to the DAQ hardware to communicate with the VI (I sent the file to the TA). I used inputs P0 and P1 for parrellel data. When P0 and P1 were held low, the counter held at 0111 and would start counting at 1100 when the output was at 1110; the output would then connect to reset and start counting back at 01111. The master reset and Toggle input functions were also implemented along with the master switch to the front panel so they could be toggled via the .VI. Figure 4: Front Panel of VI for section C & D Section D: Advanced LabVIEW controls: In section D I made the VI allow the 74193 only to count when the GATE signal from the front panel was high. I also added two more fancy functions of allowed to either make the counter up or down along with a frequency dial for both up/down outputs. A video and the VI file was sent to the TA with the screenshots displayed the in the figures above. Section E: Debouncing a switch. In this section we debounced 2 switches; debouncing of a switch was observed for these two switched attached to a voltage source and observed on an oscilloscope TDS1012C. Debouncing is an effort to reduce the “rough” transfer of a signal from high to low or low to high on a small time scale. The first step taken in debouncin a swich was to observe the bouncing. This was done described above and the bouncing was deserved in these pictures of the oscilloscope. When bouncing occurred, a difference between the flipping the switch ON and flipping OFF was observed as seen in the oscilloscope photos above. When flipping on, the signal would shoot up to HIGH, then fall about half of the pulse down, and then rise and fall once more; (sometimes more than 2 but usually twice). When flipping OFF, the signal would round down to below low, then level out back to a low status. In this particular case, only once bounce was observed. The switch took time to stabilize as seen in the figures above. For the ON switch, the pulse required 320 ± 4 μs to settle. As for switching OFF, the signal required 790 ± 4us to settle. I then used a MC14043 chip as an RS latch. This debouncing was observed above; it used logic gates which flipped and lock the following transition so effects of multiple rapid switches were negated. Conclusion: This lab introduced me to various ways of controlling a counter. I was introduced to bouncing and the means of debouncing a circuit and learned how to provide a much cleaner clock within various counting circuits. I used a birthday counter to count to 7 and reset with the next pulse to 0 which displayed the connections and sync between the 74193 chip and LED display. I used LABVIEW controls the output to the 74193 counter and added the function to control the count up and count down using in LabVIEW which taught me LabVIEW’s ability to replace manual controls within a circuit. I also learned how not only to count up and down, but also reset the whole circuit via a Master Reset toggle within the VI and apply a parallel load through P0 and P1.