Physics 123: Final Exam: Laboratory Electronics. Spring 2013

Size: px
Start display at page:

Download "Physics 123: Final Exam: Laboratory Electronics. Spring 2013"

Transcription

1 Physics 123: Final Exam Spring Physics 123: Final Exam: Laboratory Electronics. Spring 2013 YOUR NAME: This is a mostly-closed-book test. You may use the following materials: 1. a one-page, one-sided handwritten cheat sheet 2. a schematic diagram of the big board lab computer; 3. the thick xeroxed handout labeled... References for Microcontroller, detailing the 8051 instruction set; 4. a calculator. Also, please notice that these exam papers include some information that may be useful: An appendix at the end of the papers show some odds and ends: Some sketchy device data sheets: 3 op amps: 411, 358 & LMC6482 (rail-to-rail) 3 Comparators LM317/337 adjustable voltage regulator power MOSFET 555 oscillator analog switch (DG403) 74HC393 dual 4-bit ripple counter 74HC16xx 4-bit synchronous counters, natural binary and BCD 8051 port specifications a two-sheet reminder of some details of 8051 assembly language Please remember to show your work, so that we can give partial credit for imperfect answers. Total time : 180 minutes. Total points: 158 (analog: 62; digital: 96)

2 Physics 123: Final Exam Spring Contents 1 Lowpass Filter (5 points ) 3 2 Adjustable Negative Voltage Supply (8 points, total) Unregulated negative supply (4 points) add regulator (4 points) Motor Driver (21 points) Design the Circuit (12 points) Stability Problems (9 points) What causes this oscillation? transistor or op amp instability? (3 points) What do you suggest, to solve this problem? (6 points). 5 4 Talk Detector (28 points, total) Amplifier (11 points) Averaging Peak Detector (7 points, total) Sketch: Skeleton Peak Detector (2 points) Detailed Peak Detector (5 points) Comparator Stage (10 points) Home-brew SPI Device (28 points, total of subsections) Receiver: the innards of an SPI-receiving peripheral (10 points, total) Version 1: 8-bit receiver (6 points) Version 2; Receiver that preserves fully-synchronous design (4 points) Additional Feature: Save Byte in Second Register (10 points, total) Count Eight SCK Cycles (8 points) Apply that edge to save the result (2 points) Use Verilog to count Eight SCK Cycles (8 points) Sampling (14 points, total) Sampling rate: no noise bursts (8 points, total) What filter attenuation do you need? (3 points) What sampling rate? (5 points) Effect of noise bursts, in such a scheme (3 points) How to protect against the noise bursts (3 points) PLL Loop Modifications (8 points, total) Modify loop to produce multiple of f IN (3 pts) Modify loop to handle narrow-pulse f IN (5 pts) Address and Control-Signal Decoder (21 points, total) Address of I/O Base (3 points) Draw the logic, using Gates (10 points) Finish the I/O decoding (2 points) Do the same task, using Verilog (6 points) Interfacing to micro, done two ways: with and without buses (9 points, total) Interface I: ADC to 8051 Using Built-in Ports (3 points) Interface II: ADC to 8051 Using External Buses (6 points) Code to Store Some ADC Samples (16 points) 19 With regret, we must remind you that you need to dismantle your computer. Unless you still are working on a project, we d like you to do it right after the exam : melancholy experience has shown

3 Physics 123: Final Exam Spring us that people rarely return to take apart a computer, despite their good intentions. It ll take you only about 10 minutes. ANALOG 1 Lowpass Filter (5 points ) Suppose you expect noise at frequencies 100kHz and up, and want to minimize it in an audio signal that includes frequencies from about 20Hz to 20kHz. (The 100kHz is inaudible, of course; but it can cause audible mischief in an audio amplifier.) Design this filter. Assume that you can tolerate about 10% attenuation of signal, and that R load 100kΩ. 2 Adjustable Negative Voltage Supply (8 points, total) 2.1 Unregulated negative supply (4 points) Show a skeleton circuit (no part values needed) for a full-wave unregulated negative power supply. Start with the 120V AC line voltage. Show switch, fuse, transformer, rectifier, filter capacitor (with polarity shown), and attach output to a box labelled regulator add regulator (4 points) Assume that your unregulated supply provides a negative 20V with 1 to 2V of ripple. Use an LM337 regulator to provide a regulated negative output voltage, adjustable in the range 5 to 15V. You ll find a sketchy 337 data sheet at the end of these papers.

4 Physics 123: Final Exam Spring Motor Driver (21 points) Here s a problem that occurred recently, when we set about to re-use an old printer mechanism to make a ruler-balancing machine (the old inverted-pendulum problem). The idea is to move the base that supports the ruler so as to keep the ruler from falling over. (These details don t matter at all to your design, but you might possibly be interested to hear of a practical use for this circuit.) The motor is to be controlled by the computer, through a DAC. The DAC is like the one used on your computer, and its output voltage ranges from 0 to 2.55V. The motor needs a larger voltage, symmetric about ground, and draws a lot of current: up to 1A. Your job is to design the driver that can link the DAC to the motor. Note that this circuit should work down to DC (and very low frequencies). We ll restate the specifications, here: Supplies, etc. DAC OUTPUT: MOTOR: power supply: ± 15V op amp output current limit: 25mA beta of power transistor: 50 voltage: 0 to 2.50V (8-bit converter: approximately 10mV/LSB) (Note that this output swing is not symmetric about ground.) current: sink or source up to 1 ma output impedance: 100Ω voltage range: -10V to +10V (these are the voltages your circuit should deliver to the motor, at the extremes of the DAC range, 0V to 2.50V, respectively (0V should drive motor to -10V; 2.5V should drive motor to +10V). current: the motor will draw (sink or source) up to ±1A (at the extreme drive voltages) 3.1 Design the Circuit (12 points)

5 Physics 123: Final Exam Spring Stability Problems (9 points) When we built this driver (using a 411 op amp), attached a motor as load, and input a low-frequency sine wave, here s what input and output looked like: Figure 1: motor noise, first view Evidently, the circuit is going crazy with what appears to be a parasitic oscillation. When we swept the scope faster, the fuzz on the output resolved into this image: Figure 2: noise detail, at higher sweep rate What causes this oscillation? transistor or op amp instability? (3 points) (Cite some evidence to support your answer) What do you suggest, to solve this problem? (6 points) (The more appropriate remedies you provide, the better. We ll charge, however, for inappropriate remedies those not likely to help.) You may sketch a solution, or you may use words; or combine the two.

6 Physics 123: Final Exam Spring Talk Detector (28 points, total) The talker-machine with which Tom attempted a dialog recently is meant to respond when spoken to. To do that trick (simulating intelligence; this is fake intelligence, to be distinguished from artificial intelligence). It needs a circuit to determine when someone is speaking to it (or, more precisely, to determine when sound is sufficiently loud and continuous). Here is a first sketch showing what the detector ought to do, and its two controls: Figure 3: Talk Detector Sketch: detects loud talk; offers two adjustments Fig 4 shows a block diagram of the circuit that you will design in stages: Figure 4: Block diagram of talk detector as multi-stage circuit 4.1 Amplifier (11 points) First, please design a microphone amplifier. Here are some specifications: power supply: 5V only microphone: wiring shown below, in fig.5. The microphone includes a FET buffer that behaves like a current sink. The 2k pullup resistor converts that varying current to a varying voltage signal. The blocking capacitor shown in fig.5is large: 1µF. gain: adjustable in the range 10 to 100 output quiescent voltage: 1.25V frequency range: from 50Hz and up (mic [or mike ] is good to about 15kHz, but no need to filter out higher frequencies) Specify which op amp you will use, of those described in the appendix to this exam. Figure 5: microphone awaits your amplifier

7 Physics 123: Final Exam Spring Averaging Peak Detector (7 points, total) In order to determine that someone is speaking to it loudly and persistently, the machine needs to output a voltage whose level changes are roughly proportional to changes in the amplitude fed it from the microphone. We ll ask you to do this design in 2 stages: a sketch, then details Sketch: Skeleton Peak Detector (2 points) First, please sketch a peak detector, without showing component values. This detector should put out a voltage whose level varies with the average amplitude of the input signal. Output amplitude need not equal the peak value of the input voltage. To say the same thing in other terms, the output of this circuit should roughly follow the envelope of the input signal. When the input signal amplitude shrinks, the detector output should gradually fall Detailed Peak Detector (5 points) Now that you ve shown the general scheme, let s add details, this time including component values. Here are the specifications: after talk ceases, the detector output should decline to its silence level in about 4 seconds (roughly: 4 seconds ± perhaps 50%) the detector ought to pretty-much ignore transient noise, such as a short cough; the output should move substantially only after an input signal has been present for about one second

8 Physics 123: Final Exam Spring Comparator Stage (10 points) The output of your peak-detector stage will rise and fall gradually, with the loudness of speech at the microphone. Now we need to add a comparator stage that will switch decisively in response to the gradual changes of peak-detector levels. Here are some specifications for this stage: power supply: 5V only comparator output should go low when loud talk is detected switching threshold voltage should be adjustable, in a range from close to 1V to close to 3V hysteresis: about 0.2V Specify which comparator you will use, of those described in the appendix to this exam. And here is a scope screen showing the circuit in action. The image shows mike amp output on top, then averaging peak detector output and threshold voltage level, then comparator output. Figure 6: Scope image showing amplifier output, threshold voltage, averaged audio level (peak-detector output), and comparator output

9 Physics 123: Final Exam Spring Home-brew SPI Device (28 points, total of subsections) SPI Serial Peripheral Interface is the simplest way to let a microcontroller communicate with peripherals on a few lines (fewer than if parallel connections are used). Sequential bits are clocked on the rising edge of CLK, while CS* is low. Here s the scheme: Figure 7: SPI block diagram, two peripherals shown We would like you to design the receiver first the innards of an SPI-receiving peripheral. Then, using an 8051, we d like you to design the master which in this case will transmit but not receive. Note on the strange signal names: The acronyms can be puzzling at first, but make sense once understood. The controller the 8051, here is called the master; the peripherals are called slaves. MOSI: Master Out, Slave In MISO: Master In, Slave Out 5.1 Receiver: the innards of an SPI-receiving peripheral (10 points, total) Version 1: 8-bit receiver (6 points) Show how to let the peripheral receive data from the Master, while its ENABLE* or CS* pin is asserted. Assume that the peripheral need receive just one byte of information. Show gates and flipflops, and show where the received byte is available (that is, show your receiver s byte output lines). The 8 bits are transmitted MSB first. Show the 8-bit parallel output on your diagram, indicating LSB and MSB. Show what signal drives the serial input Version 2; Receiver that preserves fully-synchronous design (4 points) If you did your design for the way we did, you spoiled the synchrony of the clock. Probably that s quite harmless. But it s nice to know how to avoid doing that. Please show a way to implement the receiver CS* in a way that does not gate the clock. Don t bother to redraw all 8 flops; show us just two adjacent flops.

10 Physics 123: Final Exam Spring Additional Feature: Save Byte in Second Register (10 points, total) Once the 8 serial bits have arrived, they should be saved. Show how to implement this arrangement. We will ask you to develop this circuitry in stages. This additional circuitry should work as follows: count the SCK s that occur after the assertion of the receiver s CS*. Assume that CS* comes at least 100ns before a clock edge.... when 8 rising edges have occurred, save the byte received by the Receiver of on the previous page..., using the falling edge of SCK Rather than start right in to draw your solution, please do this in two stages: Count Eight SCK Cycles (8 points) We need a rising edge to save the 8-bit value brought in by Receiver of on the preceding page. This rising edge will save the byte in a byte-wide register. Show how to generate a rising edge when 8 SCK s have come in following assertion of CS*. Let this rising-edge output be timed by the falling edge of SCK. The disassertion of CS* should clear this counter, to make it ready for the next input cycle. 1 You may design your circuit using D flip-flops plus gates, or use one of the five counters described in an appendix to these exam notes: 74HC393 dual 4-bit ripple counter, or 74HC bit synchronous counters. If you use one of the integrated devices, specify which counter you are using Apply that edge to save the result (2 points) Show how you would use that rising edge to save the receiver s input byte. You may draw this add your earlier drawing, in on the previous page, or you can give us a new sketch here. 1 We assume that we are to receive one byte per assertion of CS*. This is not always the case.

11 Physics 123: Final Exam Spring Use Verilog to count Eight SCK Cycles (8 points) Here is the start of a Verilog file to do the counting of incoming SCK s. You should tell us how many Q s you want in your counter by filling in the [ : 0] box below. You should also tell us what signal you would use to provide the rising edge required in on the preceding page. // Create Date: 17:57:04 05/05/2013 // Module Name: count_eight ////////////////////////////////////////////////////////////////////////////////// module count_eight( input SCK, input CS_bar, output reg [ :0] Q = 0 // YOU SHOULD FILL IN THE BOX TO DETERMINE HOW MANY Q S IN YOUR COUNTER ); always@( ) // YOU SHOULD DECIDE WHAT SIGNALS AND WHICH LEVELS // TO INCLUDE IN THE "alway@..." PARENTHESES endmodule

12 Physics 123: Final Exam Spring Sampling (14 points, total) We would like you to specify an analog-to-digital converter, to handle the signal shown below, taking 10-bit samples. Initially, we will ask you to ignore the noise; then we ll ask you to take it into account. The noise bursts are caused by a malfunctioning fluorescent lamp ballast. Figure 8: Audio signal and noise waveforms And here is the familiar MAX294 filter s rolloff (it is shown with f rolloff at 1kHz, but you can set f rolloff as you choose): Figure 9: Max294 filter response: relative to f rolloff, which is adjustable Given this information about the signal and about the reconstruction filter (the MAX294), which will be used to filter an analog output produced from the digital samples that your system acquires, please specify Sampling rate: no noise bursts (8 points, total) In two steps, we want to get your advice on what sampling rate you would recommend, if no noise bursts are present (and no anti-aliasing filter precedes the ADC). Your goal is, as usual, to acquire no more samples than necessary. Here, we ve split this question into two sub-queries: What filter attenuation do you need? (3 points) Approximately what filter attenuation do you need (in db), if the filter is to attenuate a full-scale artifact to under 1/2 LSB? (We ll be happy with an answer good to within 6dB or so).

13 Physics 123: Final Exam Spring What sampling rate? (5 points) Given the ADC s resolution and the filter s behavior (see fig. 9 on the previous page), what sampling rate do you suggest? Speak as quantitatively as you can. As usual, you want to take no more samples than you necessary Effect of noise bursts, in such a scheme (3 points) What would your ADC system do to the noise bursts, if they arrived after you had set up a sampling scheme that did not anticipate them (and assuming that there is no anti-aliasing filter)? Please speak quantitatively How to protect against the noise bursts (3 points) If you did anticipate the noise bursts, how would you modify your ADC system so that they would not interfere with acquiring the audio signal? Speak as quantitatively as you can, please.

14 Physics 123: Final Exam Spring PLL Loop Modifications (8 points, total) Below is a phase-locked-loop circuit (PLL) that generates f OUT = f IN. This circuit can be useful, providing a locally-produced signal at the frequency of an incoming signal (perhaps cleaner, less jittery). Here, assume the input waveform is a 50%-duty-cycle square wave. Figure 10: Phase-locked loop Modify loop to produce multiple of f IN (3 pts) Show how you would modify this loop in order to generate f OUT = 16 f IN. You can draw it below, or simply add to fig.10. You may use generic functional blocks, or consult the sketchy data sheets in appendix to these exam papers Modify loop to handle narrow-pulse f IN (5 pts) Show how you would modify the circuit if the input signal were not a square wave (which the phasedetector handles well) but a narrow pulse (a waveform that throws off the phase detector). Make any necessary modifications to the loop so as to continue to generate f OUT = 16 f IN, where f IN is the frequency of the original narrow input pulse.

15 Physics 123: Final Exam Spring Address and Control-Signal Decoder (21 points, total) For a microcomputer using external buses, we would like you to do some address decoding, in two ways. We want to attach an external 32K ROM and an external 32K RAM (not all its space usable) to the processor, and to allow some space for I/O as well. Here is a map of the address space allocation we would like: Figure 11: Map of address space, to be implemented by your decoding The processor signals you should consider using are these: RD* WR* PSEN* address lines A 0..A 15 You should generate enabling signals as follows: ROMEN* ROM should be enabled on a code read or a data read RAMEN* RAM should be enabled on a code read, data read or data write IORD* IOWR* We will ask you to apply the two IO enabling signals very soon ( 8.3). 8.1 Address of I/O Base (3 points) What is the hexadecimal address of the start of I/O space (its lowest address), given your decoding? 8.2 Draw the logic, using Gates (10 points) Note that in the highest piece of address space, I/O should be active, RAM inactive, so usable RAM space is less than the full 32K RAM size.

16 Physics 123: Final Exam Spring Finish the I/O decoding (2 points) Given the IORD* and IOWR* signals (assume they are available to you), add a little logic that will define ports IN0*, IN1* and OUT0*, OUT1*. 8.4 Do the same task, using Verilog (6 points) Below, we have started a Verilog file for this decoder. You may use or ignore the assign IO... line: use it if it seems helpful, ignore it if it s confusing. We have not defined active-high equivalents of active-low signals. You may do so if you like, of course; if so, show these new variables. Here are some reminders re Verilog forms: AND is & OR is XOR isˆ. To specify a particular address line, of the 16 defined by the A variable (declared as [15:0] A, bellow), write A[0] for the first line, for example; A[3] for the fourth line, and so on. ////////////////////////////////////////////////////////////////////////////////// module address_decode_508( // this shorthand takes care of listing signals, their in/out status, input RD_bar,// and their type as the default--"wire" input PSEN_bar, input WR_bar, input [15:0] A, output ROMEN_bar, output RAMEN_bar, output IORD_bar, output IOWR_bar ); assign IO = ; // this definition is not required, but may save a little writing, // if one wants to use an address definition more than once assign IOWR bar = assign IORD bar = assign ROMEN bar assign RAMEN bar = endmodule

17 Physics 123: Final Exam Spring Interfacing to micro, done two ways: with and without buses (9 points, total) Now that you ve done some decoding, let s use some of those decoded signals. A Particular ADC In two sub-questions below ( 9.1 and in 9.2 on the next page) we ask you to show the hardware interface between an ADC and an 8051 controller, done two ways: using the 8051 s built-in ports, and then using buses and the decoding you did in 8.3 on the preceding page The ADC needs a brief START* pulse to start a conversion; it issues a brief (1 µs) done* pulse when a new sample is ready, and provides a latched 8-bit output holding its last converted value. That latched output is linked to the ADC s 8 data pins through an internal 3-state buffer. That buffer is turned on when the ADC s OE* pin is asserted (low). Figure 12: A generic ADC 9.1 Interface I: ADC to 8051 Using Built-in Ports (3 points) Show how to interface the ADC to the 8051 using only the 8051 s built-in ports. Put ADC data at P2, START* at P1.0, and let DONE* drive interrupt INT0*. Be sure to take care of the OE* pin. Figure 13: ADC to 8051 interface, using built-in ports

18 Physics 123: Final Exam Spring Interface II: ADC to 8051 Using External Buses (6 points) Show how to interface the ADC to the 8051 using external buses and the I/O decoding you did in 8.3 on page 16. Put ADC data at port 0 (external bus, as decoded in 8.3 on page 16); put START* at port 1 (external bus) Build hardware that will convert the ADC s DONE* pulse into a flag named NEWSAMPLE which the 8051 should be able to poll at bit 1 of port 1 (external bus). (This interface does not use an interrupt.) Again, be sure to take care of the OE* pin. Figure 14: ADC to 8051 interface, using external buses

19 Physics 123: Final Exam Spring Code to Store Some ADC Samples (16 points) We d like you to write some code assuming the simpler hardware of 9.1 on page 17: there, the interface is done with the 8051 s built-in ports. Here s what we d like the code to do: get a sample using the following procedure: start the ADC with a START* pulse; when the DONE* signal interrupts the 8051 (edge-sensitive) your ISR should set a software flag named SAMPLED BIT; this flag lives in a bit-addressable on-chip location (it happens to live at bit zero, as defined below, but that doesn t matter to your code).... When the main program finds that the flag SAMPLED BIT is asserted, it reads one ADC sample and stores it in the external RAM table. This table is in (external-) RAM beginning at the first RAM location defined by your decoding of 8.3 on page 16. (This is RAM that often is described as MOVX RAM. It was on-chip for the SiLabs part, off-chip for the Dallas part). when 128 samples have been stored, let the program stop (it can do this by using a line that jumps to itself). On the next page we have written a framework for your code. We have tried to take care of boring details. We have written a routine, for example, that initializes interrupts. But you need to decide where to invoke that routine named INTENABLE. Your code should call the routine.

20 Physics 123: Final Exam Spring ; adc_store.a51 exam problem, P123 final: store 128 samples taken from ADC $INCLUDE (C:\TOM\MICRO\8051\RAISON\INC\REG320.INC) ;...this line should produce huge list $INCLUDE (C:\TOM\MICRO\8051\RAISON\INC\VECTORS320.INC) ; Tom s vectors definition file ORG 0 ; tells assembler the address at which to place this code SAMPLED_BIT EQU 0 ; gives a name to the soft flag (this is a bit address) ; port ass mts: ; ADC data: P2 (internally-defined 8051 port) ; START* on ADC: P1.0 (internally-defined 8051 port pin) AJMP STARTUP ; here code begins--with just a jump to start of ; real program. ALL our programs will start thus ORG 100h ;...and here the program starts STARTUP: MOV SP, #07Fh ; init stack pointer (not required, but helpful) MAIN: ORG INT0VECTOR ; HERE, WRITE YOUR ISR ISR: ; ----set up interrupts---- INTENABLE: SETB IT0 ; make INT0 Edge-sensitive SETB EX0 ;...and enable INT0 SETB EA ; Global int enable RET END End Exam Questions: Appendix follows 123final 7may13.tex; May 8, 2013

21 Physics 123: Final Exam Spring Appendix Sketchy Data Sheets 3 op amps: 411, 358 & LMC6482 (rail-to-rail) 3 Comparators LM317/337 adjustable voltage regulator power MOSFET 555 oscillator analog switch (DG403) 74HC393 dual 4-bit ripple counter 74HC16xx 4-bit synchronous counters, natural binary and BCD 8051 port specifications some common 8051 assembly language operations

22 Physics 123: Final Exam Spring (Very-) Abbreviated Data Sheets Figure 15: 3 Op Amps Figure 16: Three Comparators

23 Physics 123: Final Exam Spring Figure 17: LM317/337 adjustable voltage regulator Figure 18: Power MOSFETs: Sketchy Data Sheet Figure 19: 555 Sketchy Data Sheet

24 Physics 123: Final Exam Spring Figure 20: Analog Switch: Sketchy Data Sheet Figure 21: 74HC393 dual 4-bit ripple counter Figure 22: 74HC16xx synchronous 4-bit counters

25 Physics 123: Final Exam Spring Port Specifications Figure 23: 8051 port specifications [END WHOLE EXAM PAPER, except 2 pages re common 8051 operations]

26 8051: A few of our favorite things 5/7/2004, 12/8/05 inspired (one might say, 'shamed') by Carlos, who wrote another, better list--which we hope he'll share with you Addressing Modes example explanation Important 8051 Resources "@DPTR" "@R0" copies contents of A register (8051 on-chip) to location pointed to by DPTR: that is, to location whose address DPTR holds To use this instruction, one must first load the appropriate address into DPTR puts the value 8003h into DPTR: "#" means "immediate," or "use this MOV DPTR, #8003h value; don't go off to location 8003 to get something" copies contents of A to address whose low-byte is in register R0. The high-byte is provided by Port 2 (on-chip P2). DPTR DPS 16-bit register on micro. Used to define address of operations between micro and off-chip resources such as RAM or I/O. Dallas provides two DPTRS. They are distinguished only by whether a single bit, DPS, is high or low. MOV P2, #80h To use the instruction, one must first load the appropriate high-byte into P2. Code to left shows that operation. SP 8-bit stack pointer register: used in all forms of CALL, and in PUSH and POP Operations often used stack RAM area (on-chip RAM) pointed to by SP. Must be in 'indirectly-addressable' section of RAM. MOV MOVX MOV P2, R3 MOVX copies contents of register R3 into the on-chip port register P2 (8 flops that can drive Port 2's 8 lines) see above. The "X" in MOVX means "external," and appears in all transfers between the processor and the outside world, when using the external buses. This is in contrast to use of the built-in ports. The instruction on the line just above, MOV P2, R3 illustrates that contrasting case: a write to a built-in port. A the privileged 8-bit register: the only location used in MOVX operations. Most arithmetic and logical operations must work on A and another operand; result goes to A. Annoying detail: sometimes A must be referred to as "ACC". For example, in bit operations: "JNB ACC.7" and in "PUSH ACC." ADD ADDC ADDC A, R2 two flavors of ADD: one takes in the Carry flag, the other doesn't. forms sum of A and register R2 and the Carry bit (added in at LSB). Result goes into A (hence the name, "accumulator"). SUBB SUBB A, #80h subtracts the value 80h from A--including a borrow if Carry flag is set. (Carry and Borrow flag are the same bit: same thing.) Result goes to A. The result in A will NOT be a negative number (that would require use of 2's-complement). Use CY flag to determine whether A<#80h-- you must have cleared the CY flag before doing the SUBB, n.b., to make this an honest test. PUSH, POP stores register contents on stack (only bytes: there is no "PUSH PUSH ACC, POP ACC DPTR"). Note funny names: not "A" but "ACC". Bit Operations JB, JNB JB P3.4,hangup test the specified bit--here, bit 4 of built-in port 3--and hop to label "hangup" if that bit is High. This operation is permitted only on certain on-chip locations: so-called "bit-addressable" region, 128 bits between 20h and 2Fh, plus a few others including SFR locations ending in 8 or zero!. JC, JNC JNC greater_than same as JNB, but looks at the Carry bit SETB SETB ACC.1 forces a single bit high CLR CLR P3.0 forces a single bit low. Despite the lack of "B" in the mnemonic, this is a BIT operation, except for CLR A, which I think is the only 8-bit clear. CLR A CPL CPL P3.1 complement (flip) CPL A flips all 8 bits (but permitted only on A)

27 Carlos New Improved 8051-programming Reference Summary 5/18/04 COMMANDS What does it mean? THINGS Who the hell is that? INC [] Increments [] # Just the number, not the value DEC [] Decrements [] xxxxh A hex number CPL [] Complements [] (flips it 0 1) A Accumulator = privileged register CLR [] Clears [] (Makes it LOW (=00)) B Another privileged register SETB [] Sets this bit, [], HIGH At the address the thing points SJMP label Short Jump to a labeled section DPTR Data pointer AJMP label Absolute Jump to a labeled section. (Longer than SJMP but not as long as LJMP) DPL Main Data pointer low byte LJMP label Long Jump (the longest) to any section DPH Main Data pointer high byte ACALL label Absolute Call a labeled subroutine DPL1 Alt. data pointer low byte LCALL label Call a labeled subroutine that s a long way away DPH1 Alt. data pointer high byte JB [], label Jump to labeled section if this bit, [], is set HIGH. JB ACC.2, label Think: jump if (this thing is) high DPS Data Pointer Select; 0 gives 1 st, 1 gives 2 nd JNB [], label Jump to labeled section if this bit, [], is not HIGH. JNB ACC.4, label Think: jump if (this thing is) low SP Stack pointer JC label Jump to label if Carry/Borrow flag is set HIGH. Another way to say accumulator, used with ACC Jump if Carry (flag is) high. DJNZ, JB, JNB, PUSH, POP JNC label Jump to label if Carry/Borrow flag is Not set HIGH. Jump if Carry (flag is) low. Rx Register 0-7 MOV [d], [s] MOV DPTR, #8002h MOV R3, #93h MOVX [d], [s] MOVX A ADD A, [x] if A=81 & Cy=1 or 0 then ADD A, #82h gives A=03, Cy=1 ADDC A, [x] If Cy=1, A=81 then ADDC A, #82h gives A=04, Cy=1. If Cy was 0, then A=03, Cy=1 SUBB A, [x] If Cy is 0 & A=72 then SUBB A, #81 gives A=F1, Cy=1. If Cy was 1, then A=F1, Cy=0 DJNZ [], label First: MOV R6, #06h and later: DJNZ R6, label counts down from 06 PUSH [] PUSH ACC, PUSH DPH PUSH DPL POP [] POP ACC, POP DPH RRC A For A=05, Cy=0, RRC A gives A=2, Cy=1. Nice. RR A For A=04, RR A gives 02. Fine. If A=03, RR A gives 81. Weird. MUL AB A=06, B=02; MUL AB gives A=0C, B=00. DIV AB A=0D, B=03; DIV AB gives A=04, B=01. RET RETI Internal move, puts source into destination External move, puts source into destination, always into or out of Accumulator Add x to Acc, put sum into Acc. Does not add the Carry flag at the LSB the way ADDC does. Sets Carry flag HIGH if necessary, otherwise puts it LOW. Add x to Acc, put sum into Acc, and also add the Carry flag (whether HIGH or LOW) at the LSB. Sets Carry flag HIGH if necessary, otherwise LOW. Subtract x from Acc, put results into Acc. Sets the Carry/Borrow flag HIGH if a Borrow is needed for bit 7 (A<x), otherwise, clear Cy flag. Good to clear Cy flag before the first SUBB operation. Decrement [], and then jump to labeled section if result of decrement is not zero. Nice to first load a Rx register with a countdown value Pushes a copy of [] onto the top of the stack so it can be manipulated and thrown out, and the original recovered. Pull the original version of [] off the top of the stack, replacing whatever you ve been handling Rotates Acc Right thru the Carry flag. Divides Acc by two. Bit 0 goes to Cy flag; original Cy flag goes to bit 7. Px.x ACC.7 C ISR SETB EA SETB EX0 SETB IT0 PSW.1 EQU ORG [xxxx] Port 3, bit 1. These refer to 8051 s internally defined ports 7 th bit of accumulator The Carry/Borrow Flag. Sometimes it s Carry (like with Addition) and sometimes it s Borrow (like with subtraction) Interrupt Service Routine. On interrupt, program hops to interrupt address (03h for Int0) and executes ISR. Often, just LCALL a subroutine from here. To enable interrupts, do these three things. EA is global interrupt enable. EX0 enables External Interrupt 0. IT0 is a timer control thingy for ext. interrupt 0 that makes it edge sensitive. Could also use interrupt 1 (SETB EX1 and IT1) but let s keep things simple Program Status Word, can use this bit as a general purpose flag A FEW OTHER THINGS Gives a name to a location. FLAGNAME EQU 05h allows you to refer to 05h by the name FLAGNAME Origin. Just a start line Rotates Acc Right. Bit 0 goes to bit 7. This is a funny divide-bytwo where the remainder, if any, affects high digit. NOP No Operation. Does nothing, just takes up a line Multiply Acc times B, high byte of product into B, low byte into Acc. Cy flag cleared. Divides Acc by B. Integer of quotient into Acc, remainder into B. Cy flag cleared. Return from a subroutine to the next line in main code Return from an interrupt to the next line in main code DA END Decimal Adjust the accumulator End of a program

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. FreeSoC 8051 Board User s Manual

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. FreeSoC 8051 Board User s Manual Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science FreeSoC 8051 Board User s Manual This manual will help you get started using your FreeSoC as an 8051 emulator

More information

Fan in: The number of inputs of a logic gate can handle.

Fan in: The number of inputs of a logic gate can handle. Subject Code: 17333 Model Answer Page 1/ 29 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

More information

Unit-6 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION

Unit-6 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION M i c r o p r o c e s s o r s a n d M i c r o c o n t r o l l e r s P a g e 1 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION Microcomputer system design requires

More information

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016 Analog I/O ECE 153B Sensor & Peripheral Interface Design Introduction Anytime we need to monitor or control analog signals with a digital system, we require analogto-digital (ADC) and digital-to-analog

More information

IES Digital Mock Test

IES Digital Mock Test . The circuit given below work as IES Digital Mock Test - 4 Logic A B C x y z (a) Binary to Gray code converter (c) Binary to ECESS- converter (b) Gray code to Binary converter (d) ECESS- To Gray code

More information

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong. Department of Electrical Engineering Lecture 10 Analogue Interfacing 1 In this Lecture. Interface 8051 with the following Input/Output Devices Transducer/Sensors Analogue-to-Digital Conversion (ADC) Digital-to-Analogue

More information

The SOL-20 Computer s Cassette interface.

The SOL-20 Computer s Cassette interface. The SOL-20 Computer s Cassette interface. ( H. Holden. Dec. 2018 ) Introduction: The Cassette interface designed by Processor Technology (PT) for their SOL-20 was made to be compatible with the Kansas

More information

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory Published on Instrumentation LAB (http://instrumentationlab.berkeley.edu) Home > Lab Assignments > Digital Labs > Digital Circuits II Digital Circuits II Submitted by Nate.Physics on Tue, 07/08/2014-13:57

More information

Thursday 5 June 2014 Afternoon

Thursday 5 June 2014 Afternoon Thursday 5 June 214 Afternoon A2 GCE ELECTRONICS F614/1 Electronic Control Systems *3119659* Candidates answer on the Question Paper. OCR supplied materials: None Other materials required: Scientific calculator

More information

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

I hope you have completed Part 2 of the Experiment and is ready for Part 3. I hope you have completed Part 2 of the Experiment and is ready for Part 3. In part 3, you are going to use the FPGA to interface with the external world through a DAC and a ADC on the add-on card. You

More information

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam MIDTERM EXAMINATION 2011 (October-November) Q-21 Draw function table of a half adder circuit? (2) Answer: - Page

More information

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation

PC-OSCILLOSCOPE PCS500. Analog and digital circuit sections. Description of the operation PC-OSCILLOSCOPE PCS500 Analog and digital circuit sections Description of the operation Operation of the analog section This description concerns only channel 1 (CH1) input stages. The operation of CH2

More information

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE 113 CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE 5.1 INTRODUCTION This chapter describes hardware design and implementation of direct torque controlled induction motor drive with

More information

LINEAR IC APPLICATIONS

LINEAR IC APPLICATIONS 1 B.Tech III Year I Semester (R09) Regular & Supplementary Examinations December/January 2013/14 1 (a) Why is R e in an emitter-coupled differential amplifier replaced by a constant current source? (b)

More information

ANALOG TO DIGITAL CONVERTER

ANALOG TO DIGITAL CONVERTER Final Project ANALOG TO DIGITAL CONVERTER As preparation for the laboratory, examine the final circuit diagram at the end of these notes and write a brief plan for the project, including a list of the

More information

INTEGRATED CIRCUITS. AN109 Microprocessor-compatible DACs Dec

INTEGRATED CIRCUITS. AN109 Microprocessor-compatible DACs Dec INTEGRATED CIRCUITS 1988 Dec DAC products are designed to convert a digital code to an analog signal. Since a common source of digital signals is the data bus of a microprocessor, DAC circuits that are

More information

). The THRESHOLD works in exactly the opposite way; whenever the THRESHOLD input is above 2/3V CC

). The THRESHOLD works in exactly the opposite way; whenever the THRESHOLD input is above 2/3V CC ENGR 210 Lab 8 RC Oscillators and Measurements Purpose: In the previous lab you measured the exponential response of RC circuits. Typically, the exponential time response of a circuit becomes important

More information

ME 461 Laboratory #3 Analog-to-Digital Conversion

ME 461 Laboratory #3 Analog-to-Digital Conversion ME 461 Laboratory #3 Analog-to-Digital Conversion Goals: 1. Learn how to configure and use the MSP430 s 10-bit SAR ADC. 2. Measure the output voltage of your home-made DAC and compare it to the expected

More information

Thursday 6 June 2013 Afternoon

Thursday 6 June 2013 Afternoon Thursday 6 June 2013 Afternoon A2 GCE ELECTRONICS F614/01 Electronics Control Systems *F628070613* Candidates answer on the Question Paper. OCR supplied materials: None Other materials required: Scientific

More information

A2 Electronics Project: DARPS: A Digital Audio Recorder and Playback System. Name: Andrew Cottrell Year: 2011

A2 Electronics Project: DARPS: A Digital Audio Recorder and Playback System. Name: Andrew Cottrell Year: 2011 A2 Electronics Project: DARPS: A Digital Audio Recorder and Playback System. Name: Year: 2011 System Overview: I will design and create a system that will record a variable amount of audio data and then

More information

AB-44 APPLICATION BRIEF. Using the 87C51GB SHARON LOPEZ APPLICATIONS ENGINEER. March Order Number

AB-44 APPLICATION BRIEF. Using the 87C51GB SHARON LOPEZ APPLICATIONS ENGINEER. March Order Number APPLICATION BRIEF Using the 87C51GB SHARON LOPEZ APPLICATIONS ENGINEER March 1991 Order Number 270957-001 Information in this document is provided in connection with Intel products Intel assumes no liability

More information

Physics 123: Homework 4: Op Amps II

Physics 123: Homework 4: Op Amps II P123 HW 4: op amps II 1 Physics 123: Homework 4: Op Amps II Total points: 23.5; DUE Monday, Mar. 2, 2015 Contents 1 Review?: Capacitive coupling (5 pts) 2 1.1 Idealized next stage: R INX =, C INX =0.........

More information

8XC51FA FB FC PCA Cookbook

8XC51FA FB FC PCA Cookbook APPLICATION NOTE 8XC51FAFBFC PCA Cookbook February 1990 Order Number 270851-001 Information in this document is provided in connection with Intel products Intel assumes no liability whatsoever including

More information

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver LABORATORY EXPERIMENT Infrared Transmitter/Receiver (Note to Teaching Assistant: The week before this experiment is performed, place students into groups of two and assign each group a specific frequency

More information

Micro Controller Based Ac Power Controller

Micro Controller Based Ac Power Controller Wireless Sensor Network, 9, 2, 61-121 doi:1.4236/wsn.9.112 Published Online July 9 (http://www.scirp.org/journal/wsn/). Micro Controller Based Ac Power Controller S. A. HARI PRASAD 1, B. S. KARIYAPPA 1,

More information

Auto-Chromatic Instrument Tuner Electrical Engineering Senior Design Project. Prepared By: Erin M. Smith. Prepared For:

Auto-Chromatic Instrument Tuner Electrical Engineering Senior Design Project. Prepared By: Erin M. Smith. Prepared For: Auto-Chromatic Instrument Tuner Electrical Engineering Senior Design Project Prepared By: Erin M. Smith Prepared For: Dr. James Irwin, Senior Project Faculty Advisor and Dr. Winfred Anakwa, Senior Project

More information

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control EEE34 Microcontroller Applications Department of Electrical Engineering Lecture Motor Control Week 3 EEE34 Microcontroller Applications In this Lecture. Interface 85 with the following output Devices Optoisolator

More information

MICROPROCESSORS AND MICROCONTROLLER 1

MICROPROCESSORS AND MICROCONTROLLER 1 MICROPROCESSORS AND MICROCONTROLLER 1 Microprocessor Applications Data Acquisition System Data acquisition is the process of sampling signals that measure real world physical conditions ( such as temperature,

More information

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28 Subject Code: 17333 Model Answer P a g e 1/28 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

More information

AN1730. Digital Amplification Control of an Analog Signal Using the MC68HC705J1A. Introduction

AN1730. Digital Amplification Control of an Analog Signal Using the MC68HC705J1A. Introduction Order this document by /D Digital Amplification Control of an Analog Signal Using the MC68HC705JA By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction This application note describes the

More information

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter EE283 Electrical Measurement Laboratory Laboratory Exercise #7: al Counter Objectives: 1. To familiarize students with sequential digital circuits. 2. To show how digital devices can be used for measurement

More information

MM58174A Microprocessor-Compatible Real-Time Clock

MM58174A Microprocessor-Compatible Real-Time Clock MM58174A Microprocessor-Compatible Real-Time Clock General Description The MM58174A is a low-threshold metal-gate CMOS circuit that functions as a real-time clock and calendar in bus-oriented microprocessor

More information

Designing Information Devices and Systems I Spring 2015 Homework 6

Designing Information Devices and Systems I Spring 2015 Homework 6 EECS 16A Designing Information Devices and Systems I Spring 2015 Homework 6 This homework is due March 19, 2015 at 5PM. Note that unless explicitly stated otherwise, you can assume that all op-amps in

More information

Laboratory 8 Operational Amplifiers and Analog Computers

Laboratory 8 Operational Amplifiers and Analog Computers Laboratory 8 Operational Amplifiers and Analog Computers Introduction Laboratory 8 page 1 of 6 Parts List LM324 dual op amp Various resistors and caps Pushbutton switch (SPST, NO) In this lab, you will

More information

ML PCM Codec Filter Mono Circuit

ML PCM Codec Filter Mono Circuit PCM Codec Filter Mono Circuit Legacy Device: Motorola MC145506 The ML145506 is a per channel codec filter PCM mono circuit. This device performs the voice digitization and reconstruction, as well as the

More information

Tel: Fax:

Tel: Fax: B Tel: 78.39.4700 Fax: 78.46.33 SPECIFICATIONS (T A = +5 C, V+ = +5 V, V = V or 5 V, all voltages measured with respect to digital common, unless otherwise noted) AD57J AD57K AD57S Model Min Typ Max Min

More information

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics Sr. No. Date TITLE To From Marks Sign 1 To verify the application of op-amp as an Inverting Amplifier 2 To

More information

Chapter 5: Signal conversion

Chapter 5: Signal conversion Chapter 5: Signal conversion Learning Objectives: At the end of this topic you will be able to: explain the need for signal conversion between analogue and digital form in communications and microprocessors

More information

ML4818 Phase Modulation/Soft Switching Controller

ML4818 Phase Modulation/Soft Switching Controller Phase Modulation/Soft Switching Controller www.fairchildsemi.com Features Full bridge phase modulation zero voltage switching circuit with programmable ZV transition times Constant frequency operation

More information

DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS

DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS EXPERIMENT : 4 TITLE : 555 TIMERS OUTCOME : Upon completion of this unit, the student should be able to: 1. gain experience with

More information

Lecture 6: Digital/Analog Techniques

Lecture 6: Digital/Analog Techniques Lecture 6: Digital/Analog Techniques The electronics signals that we ve looked at so far have been analog that means the information is continuous. A voltage of 5.3V represents different information that

More information

Activity 4: Due before the lab during the week of Feb

Activity 4: Due before the lab during the week of Feb Today's Plan Announcements: Lecture Test 2 programming in C Activity 4 Serial interfaces Analog output Driving external loads Motors: dc motors, stepper motors, servos Lecture Test Activity 4: Due before

More information

Analog-to-Digital Conversion

Analog-to-Digital Conversion CHEM 411L Instrumental Analysis Laboratory Revision 1.0 Analog-to-Digital Conversion In this laboratory exercise we will construct an Analog-to-Digital Converter (ADC) using the staircase technique. In

More information

READ THIS FIRST: *One physical piece of 8.5x11 paper (you may use both sides). Notes must be handwritten.

READ THIS FIRST: *One physical piece of 8.5x11 paper (you may use both sides). Notes must be handwritten. READ THIS FIRST: We recommend first trying this assignment in a single sitting. The midterm exam time period is 80 minutes long. Find a quiet place, grab your cheat sheet* and a pencil, and set a timer.

More information

ASTABLE MULTIVIBRATOR

ASTABLE MULTIVIBRATOR 555 TIMER ASTABLE MULTIIBRATOR MONOSTABLE MULTIIBRATOR 555 TIMER PHYSICS (LAB MANUAL) PHYSICS (LAB MANUAL) 555 TIMER Introduction The 555 timer is an integrated circuit (chip) implementing a variety of

More information

Figure 1: Functional Block Diagram

Figure 1: Functional Block Diagram MagAlpha MA120 Angular Sensor for 3-Phase Brushless Motor Key features U V W signals for block commutation Adjustable zero 500 khz refresh rate Ultra low latency: 3 µs Serial interface for settings 8.5

More information

GCE A level 1145/01 ELECTRONICS ET5. P.M. THURSDAY, 31 May hours. Centre Number. Candidate Number. Surname. Other Names

GCE A level 1145/01 ELECTRONICS ET5. P.M. THURSDAY, 31 May hours. Centre Number. Candidate Number. Surname. Other Names Surname Other Names Centre Number 0 Candidate Number GCE A level 1145/01 ELECTRONICS ET5 P.M. THURSDAY, 31 May 2012 1 1 2 hours For s use Question Maximum Mark Mark Awarded 1. 6 2. 9 3. 8 4. 6 1145 010001

More information

Chapter 7: From Digital-to-Analog and Back Again

Chapter 7: From Digital-to-Analog and Back Again Chapter 7: From Digital-to-Analog and Back Again Overview Often the information you want to capture in an experiment originates in the laboratory as an analog voltage or a current. Sometimes you want to

More information

Input/Output Control Using Interrupt Service Routines to Establish a Time base

Input/Output Control Using Interrupt Service Routines to Establish a Time base CSUS EEE174 Lab Input/Output Control Using Interrupt Service Routines to Establish a Time base 599 Menlo Drive, Suite 100 Rocklin, California 95765, USA Office/Tech Support: (916) 624-8333 Fax: (916) 624-8003

More information

8-Bit A/D Converter AD673 REV. A FUNCTIONAL BLOCK DIAGRAM

8-Bit A/D Converter AD673 REV. A FUNCTIONAL BLOCK DIAGRAM a FEATURES Complete 8-Bit A/D Converter with Reference, Clock and Comparator 30 s Maximum Conversion Time Full 8- or 16-Bit Microprocessor Bus Interface Unipolar and Bipolar Inputs No Missing Codes Over

More information

MAINTENANCE MANUAL AUDIO MATRIX BOARD P29/

MAINTENANCE MANUAL AUDIO MATRIX BOARD P29/ MAINTENANCE MANUAL AUDIO MATRIX BOARD P29/5000056000 TABLE OF CONTENTS Page DESCRIPTION................................................ Front Cover CIRCUIT ANALYSIS.............................................

More information

Learning Objectives:

Learning Objectives: Learning Objectives: At the end of this topic you will be able to; Analyse and design a DAC based on an op-amp summing amplifier to meet a given specification. 1 Digital and Analogue Information Module

More information

Topics Introduction to Microprocessors

Topics Introduction to Microprocessors Topics 2244 Introduction to Microprocessors Chapter 8253 Programmable Interval Timer/Counter Suree Pumrin,, Ph.D. Interfacing with 886/888 Programming Mode 2244 Introduction to Microprocessors 2 8253/54

More information

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff Hardware Flags and the RTI system 1 Need for hardware flag Often a microcontroller needs to test whether some event has occurred, and then take an action For example A sensor outputs a pulse when a model

More information

Lab Exercise 6: Digital/Analog conversion

Lab Exercise 6: Digital/Analog conversion Lab Exercise 6: Digital/Analog conversion Introduction In this lab exercise, you will study circuits for analog-to-digital and digital-to-analog conversion Preparation Before arriving at the lab, you should

More information

Control of Electrical Lights and Fans using TV Remote

Control of Electrical Lights and Fans using TV Remote EE 389 Electronic Design Lab -II, Project Report, EE Dept., IIT Bombay, October 2005 Control of Electrical Lights and Fans using TV Remote Group No. D10 Liji Jayaprakash (02d07021)

More information

EE 314 Spring 2003 Microprocessor Systems

EE 314 Spring 2003 Microprocessor Systems EE 314 Spring 2003 Microprocessor Systems Laboratory Project #9 Closed Loop Control Overview and Introduction This project will bring together several pieces of software and draw on knowledge gained in

More information

Data Logger by Carsten Kristiansen Napier University. November 2004

Data Logger by Carsten Kristiansen Napier University. November 2004 Data Logger by Carsten Kristiansen Napier University November 2004 Title page Author: Carsten Kristiansen. Napier No: 04007712. Assignment title: Data Logger. Education: Electronic and Computer Engineering.

More information

Automatic Railway Gate Control & Track Switching

Automatic Railway Gate Control & Track Switching Automatic Railway Gate Control & Track Switching ABSTRACT: Present project is designed using 8051 microcontroller to avoid railway accidents happening at unattended railway gates, if implemented in spirit.

More information

GCE A level 1145/01 ELECTRONICS ET5

GCE A level 1145/01 ELECTRONICS ET5 Surname Other Names Centre Number 2 Candidate Number GCE A level 1145/01 ELECTRONICS ET5 A.M. WEDNESDAY, 12 June 2013 1½ hours ADDITIONAL MATERIALS In addition to this examination paper, you will need

More information

Digitally Controlled 8 2 Audio Mixer SSM2163

Digitally Controlled 8 2 Audio Mixer SSM2163 a Digitally Controlled 8 2 Audio Mixer SSM263 FEATURES Each of 8 Inputs Can Be Assigned to Either or Both Outputs Voltage Inputs and Outputs No Need For External Amplifiers Each Input Provides 63 db of

More information

MICROCONTROLLER PRODUCTS. AN428 Using the ADC and PWM of the 83C752/87C752. Author: Greg Goodhue December Philips Semiconductors

MICROCONTROLLER PRODUCTS. AN428 Using the ADC and PWM of the 83C752/87C752. Author: Greg Goodhue December Philips Semiconductors MICROCONTROLLER PRODUCTS Using the ADC and PWM of the 83C752/87C752 Author: Greg Goodhue December 1990 Philips Semiconductors The Philips 83C752/87C752 is a single-chip control-oriented microcontroller.

More information

Spec. Instructor: Center

Spec. Instructor: Center PDHonline Course E379 (5 PDH) Digital Logic Circuits Volume III Spec ial Logic Circuits Instructor: Lee Layton, P.E 2012 PDH Online PDH Center 5272 Meadow Estatess Drive Fairfax, VA 22030-6658 Phone &

More information

4/30/2012. General Class Element 3 Course Presentation. Practical Circuits. Practical Circuits. Subelement G7. 2 Exam Questions, 2 Groups

4/30/2012. General Class Element 3 Course Presentation. Practical Circuits. Practical Circuits. Subelement G7. 2 Exam Questions, 2 Groups General Class Element 3 Course Presentation ti ELEMENT 3 SUB ELEMENTS General Licensing Class Subelement G7 2 Exam Questions, 2 Groups G1 Commission s Rules G2 Operating Procedures G3 Radio Wave Propagation

More information

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as BioE 1310 - Review 5 - Digital 1/16/2017 Instructions: On the Answer Sheet, enter your 2-digit ID number (with a leading 0 if needed) in the boxes of the ID section. Fill in the corresponding numbered

More information

Review for Final Exam

Review for Final Exam Review for Final Exam Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed and unsigned) Binary to Hex Hex to Binary Addition and subtraction of fixed-length hex numbers Overflow, Carry,

More information

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820 8-Bit, high-speed, µp-compatible A/D converter with DESCRIPTION By using a half-flash conversion technique, the 8-bit CMOS A/D offers a 1.5µs conversion time while dissipating a maximum 75mW of power.

More information

Review for Final Exam

Review for Final Exam Review for Final Exam Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed and unsigned) Binary to Hex Hex to Binary Addition and subtraction of fixed-length hex numbers Overflow, Carry,

More information

UMAINE ECE Morse Code ROM and Transmitter at ISM Band Frequency

UMAINE ECE Morse Code ROM and Transmitter at ISM Band Frequency UMAINE ECE Morse Code ROM and Transmitter at ISM Band Frequency Jamie E. Reinhold December 15, 2011 Abstract The design, simulation and layout of a UMAINE ECE Morse code Read Only Memory and transmitter

More information

HIGH LOW Astable multivibrators HIGH LOW 1:1

HIGH LOW Astable multivibrators HIGH LOW 1:1 1. Multivibrators A multivibrator circuit oscillates between a HIGH state and a LOW state producing a continuous output. Astable multivibrators generally have an even 50% duty cycle, that is that 50% of

More information

VCC. Digital 16 Frequency Divider Digital-to-Analog Converter Butterworth Active Filter Sample-and-Hold Amplifier (part 2) Last Update: 03/19/14

VCC. Digital 16 Frequency Divider Digital-to-Analog Converter Butterworth Active Filter Sample-and-Hold Amplifier (part 2) Last Update: 03/19/14 Digital 16 Frequency Divider Digital-to-Analog Converter Butterworth Active Filter Sample-and-Hold Amplifier (part 2) ECE3204 Lab 5 Objective The purpose of this lab is to design and test an active Butterworth

More information

DS1075. EconOscillator/Divider PRELIMINARY FEATURES PIN ASSIGNMENT FREQUENCY OPTIONS

DS1075. EconOscillator/Divider PRELIMINARY FEATURES PIN ASSIGNMENT FREQUENCY OPTIONS PRELIMINARY EconOscillator/Divider FEATURES Dual Fixed frequency outputs (200 KHz 100 MHz) User programmable on chip dividers (from 1 513) User programmable on chip prescaler (1, 2, 4) No external components

More information

Chapter 2 Signal Conditioning, Propagation, and Conversion

Chapter 2 Signal Conditioning, Propagation, and Conversion 09/0 PHY 4330 Instrumentation I Chapter Signal Conditioning, Propagation, and Conversion. Amplification (Review of Op-amps) Reference: D. A. Bell, Operational Amplifiers Applications, Troubleshooting,

More information

11 Counters and Oscillators

11 Counters and Oscillators 11 OUNTERS AND OSILLATORS 11 ounters and Oscillators Though specialized, the counter is one of the most likely digital circuits that you will use. We will see how typical counters work, and also how to

More information

CMOS Schmitt Trigger A Uniquely Versatile Design Component

CMOS Schmitt Trigger A Uniquely Versatile Design Component CMOS Schmitt Trigger A Uniquely Versatile Design Component INTRODUCTION The Schmitt trigger has found many applications in numerous circuits, both analog and digital. The versatility of a TTL Schmitt is

More information

PESIT BANGALORE SOUTH CAMPUS BASIC ELECTRONICS

PESIT BANGALORE SOUTH CAMPUS BASIC ELECTRONICS PESIT BANGALORE SOUTH CAMPUS QUESTION BANK BASIC ELECTRONICS Sub Code: 17ELN15 / 17ELN25 IA Marks: 20 Hrs/ Week: 04 Exam Marks: 80 Total Hours: 50 Exam Hours: 03 Name of Faculty: Mr. Udoshi Basavaraj Module

More information

Wednesday 7 June 2017 Afternoon Time allowed: 1 hour 30 minutes

Wednesday 7 June 2017 Afternoon Time allowed: 1 hour 30 minutes Please write clearly in block capitals. Centre number Candidate number Surname Forename(s) Candidate signature A-level ELECTRONICS Unit 4 Programmable Control Systems Wednesday 7 June 2017 Afternoon Time

More information

Gechstudentszone.wordpress.com

Gechstudentszone.wordpress.com 8.1 Operational Amplifier (Op-Amp) UNIT 8: Operational Amplifier An operational amplifier ("op-amp") is a DC-coupled high-gain electronic voltage amplifier with a differential input and, usually, a single-ended

More information

a8259 Features General Description Programmable Interrupt Controller

a8259 Features General Description Programmable Interrupt Controller a8259 Programmable Interrupt Controller July 1997, ver. 1 Data Sheet Features Optimized for FLEX and MAX architectures Offers eight levels of individually maskable interrupts Expandable to 64 interrupts

More information

CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS

CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS Q1. Distinguish between vectored and non-vectored interrupts

More information

Combinational Logic Circuits. Combinational Logic

Combinational Logic Circuits. Combinational Logic Combinational Logic Circuits The outputs of Combinational Logic Circuits are only determined by the logical function of their current input state, logic 0 or logic 1, at any given instant in time. The

More information

III/IV B.Tech (Regular) DEGREE EXAMINATION-Schema. Answer ONE question from each unit.

III/IV B.Tech (Regular) DEGREE EXAMINATION-Schema. Answer ONE question from each unit. April, 2018 Sixth Semester Time: Three Hours Answer Question No1 compulsorily Answer ONE question from each unit 1 Answer all questions a Draw the symbol of Zener diode III/IV BTech (Regular) DEGREE EXAMINATION-Schema

More information

9 Feedback and Control

9 Feedback and Control 9 Feedback and Control Due date: Tuesday, October 20 (midnight) Reading: none An important application of analog electronics, particularly in physics research, is the servomechanical control system. Here

More information

Module -18 Flip flops

Module -18 Flip flops 1 Module -18 Flip flops 1. Introduction 2. Comparison of latches and flip flops. 3. Clock the trigger signal 4. Flip flops 4.1. Level triggered flip flops SR, D and JK flip flops 4.2. Edge triggered flip

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad 1 P a g e INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 ELECTRONICS AND COMMUNICATION ENGINEERING TUTORIAL QUESTION BANK Name : INTEGRATED CIRCUITS APPLICATIONS Code

More information

EE445L Fall 2011 Quiz 2A Page 1 of 6

EE445L Fall 2011 Quiz 2A Page 1 of 6 EE445L Fall 2011 Quiz 2A Page 1 of 6 Jonathan W. Valvano First: Last: November 18, 2011, 2:00pm-2:50pm. Open book, open notes, calculator (no laptops, phones, devices with screens larger than a TI-89 calculator,

More information

JUMA-TRX2 DDS / Control Board description OH2NLT

JUMA-TRX2 DDS / Control Board description OH2NLT JUMA-TRX2 DDS / Control Board description OH2NLT 22.08.2007 General Key functions of the JUMA-TRX2 DDS / Control board are: - provide user interface functions with LCD display, buttons, potentiometers

More information

EE 308 Apr. 24, 2002 Review for Final Exam

EE 308 Apr. 24, 2002 Review for Final Exam Review for Final Exam Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed and unsigned) Binary to Hex Hex to Binary Addition and subtraction of fixed-length hex numbers Overflow, Carry,

More information

DEPARTMENT OF ELECTRONICS

DEPARTMENT OF ELECTRONICS DEPARTMENT OF ELECTRONICS Academic Planner for odd Semesters Semester : I Subject : Electronics(ELT1). Course: B.Sc. (PME) Introduction to Number systems B Construction and types, working Review of P type

More information

EECS 452 Midterm Exam Winter 2012

EECS 452 Midterm Exam Winter 2012 EECS 452 Midterm Exam Winter 2012 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Points Section I /40 Section II

More information

F4 16DA 2 16-Channel Analog Voltage Output

F4 16DA 2 16-Channel Analog Voltage Output F46DA2 6-Channel Analog Voltage In This Chapter.... Module Specifications Setting Module Jumpers Connecting the Field Wiring Module Operation Writing the Control Program 22 F46DA2 6-Ch. Analog Voltage

More information

EE 308 Spring 2006 FINAL PROJECT: INTERFACING AND MOTOR CONTROL WEEK 1 PORT EXPANSION FOR THE MC9S12

EE 308 Spring 2006 FINAL PROJECT: INTERFACING AND MOTOR CONTROL WEEK 1 PORT EXPANSION FOR THE MC9S12 FINAL PROJECT: INTERFACING AND MOTOR CONTROL In this sequence of labs you will learn how to interface with additional hardware and implement a motor speed control system. WEEK 1 PORT EXPANSION FOR THE

More information

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design PH-315 COMINATIONAL and SEUENTIAL LOGIC CIRCUITS Hardware implementation and software design A La Rosa I PURPOSE: To familiarize with combinational and sequential logic circuits Combinational circuits

More information

Question Paper Code: 21398

Question Paper Code: 21398 Reg. No. : Question Paper Code: 21398 B.E./B.Tech. DEGREE EXAMINATION, MAY/JUNE 2013 Fourth Semester Electrical and Electronics Engineering EE2254 LINEAR INTEGRATED CIRCUITS AND APPLICATIONS (Regulation

More information

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013 Exercise 1: PWM Modulator University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013 Lab 3: Power-System Components and

More information

Need Analog Output from the Stamp? Dial it in with a Digital Potentiometer Using the DS1267 potentiometer as a versatile digital-to-analog converter

Need Analog Output from the Stamp? Dial it in with a Digital Potentiometer Using the DS1267 potentiometer as a versatile digital-to-analog converter Column #18, August 1996 by Scott Edwards: Need Analog Output from the Stamp? Dial it in with a Digital Potentiometer Using the DS1267 potentiometer as a versatile digital-to-analog converter GETTING AN

More information

The SOL-20 Computer s Cassette interface.

The SOL-20 Computer s Cassette interface. The SOL-20 Computer s Cassette interface. ( H. Holden. Dec. 2018 ) Introduction: The Cassette interface designed by Processor Technology (PT) for their SOL-20 was made to be compatible with the Kansas

More information

Fig 1: The symbol for a comparator

Fig 1: The symbol for a comparator INTRODUCTION A comparator is a device that compares two voltages or currents and switches its output to indicate which is larger. They are commonly used in devices such as They are commonly used in devices

More information

Design Document. Analog PWM Amplifier. Reference: DD00004

Design Document. Analog PWM Amplifier. Reference: DD00004 Grainger Center for Electric Machinery and Electromechanics Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign 1406 W. Green St. Urbana, IL 61801 Design Document

More information

ADC Bit µp Compatible A/D Converter

ADC Bit µp Compatible A/D Converter ADC1001 10-Bit µp Compatible A/D Converter General Description The ADC1001 is a CMOS, 10-bit successive approximation A/D converter. The 20-pin ADC1001 is pin compatible with the ADC0801 8-bit A/D family.

More information