Low Power Under- and Over-Voltage Monitor

This voltage monitor has two  threshold, VTH for undervoltage and VTH’ for overvoltage. Using the component values shown in the schematic diagram below, this circuit give 6V for VTH and 15V for VTH1. Above 6V, the LED indicator of this voltage monitor  circuit will increase the flash rate until reach 15V.  This circuit will stop flashing at voltage below 6V and above 15 volts since there will be no current flowing through C1.  At threshold  boundary, the output of LM10 will saturate to negative below VTH and saturate to positive above VTH’. To customize circuit we can select the resistors values according to chosen...

5V FET Voltage Regulator

This voltage regulator circuit gives a stable 5V output from unregulated inputs (more than 5V). The stability of the output voltage is good enough, only change less than 0.1 volts when the load current changes about 60mA. Here is the schematic diagram of the circuit:  The basic principle of the voltage regulation rely on the mechanism of keeping the the FET’s gate voltage at the cut-off point. The FET’s gate volage is the voltage across R2. At zero volt (when there is no current flowing through R2), the FET will be conducting, and a small current at FET (Tr1) will cause much larger current to flow through Tr3. This current will flow ...

26V-to-5000V DC-DC Converter

This circuit can provide 5,000 VDC from 26 VDC. This circuit has ripple of under 0.01% due to Voltage-doubling capacitors. As sinusoidal oscillator, a 2N217 transistor is used. The diode and the capacitors at the output stage should be of high voltage type.  Here is the schematic diagram of the  circuit...

Transceiver Saver (Overvoltage Protector)

This is a transceiver saver circuit that protect  a transceiver device (applicable to other device as well)  from overvoltage of the power supply. This circuit is used to protect the device  by regulating the power supply,  avoiding damaging the device if overvoltage occurs.  If the transceiver transmits current of above 2A, a heatsink should be used for the transistor. The value of resistor must provide output of 12.6 V during normal operation, you can make trial and error through measurement when choosing this., you can start with value around 100R. It’s recommended to use a high wattage Zener diode. Here is...

Auto-Off 12V NiCd Battery Charger

NiCd/NiCad battery charger circuit is still needed since some application demanding high current is still rely on NiCd type, since this type is still superior in term of  high current output (low internal resistance) and low cost. This  battery charger circuit is used to charge 12V NiCd battery at  around 74 mA until battery is fully  charged. This circuit need  around 4 hours to fully recharge a totally empty/dead battery, depends on the battery capacity.  Here is the schematic diagram of the circuit  This circuit is basically a current source with auto cut-off. The current regulation is done by maintaining...

Foldback Current Limited High Voltage Regulator

This circuit is high voltage regulator which has foldback current limiter protection. This circuit uses LM10 comparator with voltage reference, and this core integrated circuit is connected directly to high voltage circuitry. This high voltage direct connection is possible since the IC is inserted to a bias network and directly drop the applied voltage, so this IC is only suffering small voltage across its supply pins.  The foldback current limiter is different with ordinary current limiter in the way the limiter responds to dynamic load. When we plot the regular current limiter, when the load draw a linearly increasing current, the...

1 KW Power (Watt) Meter

This watt-meter circuit has measurement range up to 1-KW. This circuit can give the complete (X)(Y) function although uses only one transistor. Actually, this circuit is used for 117 Vac±50 Vac operation. For lower or lower voltage, this circuit can be modified easily. This circuit only measure power on negative cycles. The advantages of this circuit is this circuit does not need external power supply. This circuit measures true power that is delivered to the load. Here is the schematic diagram of the  circuit:  At idle section, this circuit draw only 0.5W. This circuit has load current-sensing voltage of 10mV and load voltage...

Simple Theremin with Inverter Gates

This simple but complete Theremin circuit is constructed using only two inverter chip plus one regulator IC. This Theremin circuit consist of five functional blocks: power supply regulator, hand controlled oscillator, null oscillator, mixer, and filter The power supply regulator consist of LP2950 regulator IC, which stabilize the voltage from battery to 5V. You can use more popular 7805 IC for this, but since the power consumption of this Theremin circuit is very small, then you can use 78L05 which is smaller.  CR1 diode is used to protect from inappropriate battery polarity,  shorting the battery voltage together with R8 100...

True Stereo Indicator Detects L-R Signal Difference

This true stereo indicator is different from what we usually find on FM radio receiver, which is usually a pilot tone detector. A stereo broadcast from FM radio station contain pilot tone, but a presence of pilot tone doesn’t necessarily a stereo broadcast signal since a mono FM transmitter ca broadcast pilot tone as well.  Since this circuit detect the difference between left and right channel, this circuit can detect a real stereophonic programs. When there is no difference between R and L input signals, the output A1 and output A2 is at the same potential. That will make a a virtual ground rail at half the supply voltage. The A1...

53 dB Stereo Preamp for Tape or Phonographs

With the circuit shown in the following schematic diagram, both channels of this stereo preamp is constructed using  RCA CA3052 quad AC amplifier.  this pre-amplifier circuit is featured with tone control (bass – treble). Make a similar circuit to complete the other channel, since the circuit for left and right channel are similar. To be high-fidelity, total harmonic distortion should be kept minimum, this circuit gives less than 0.3% distortion level at  at 1-kHz testing signal with 1-V amplitude.  Gain or amplification at 1 kHz is 47 dB,  and the tone control will curve the response with 11.5-dB boost at 100...

Simple 9V Wireless Microphone FM Transmitter

This FM transmitter circuit can be used as a wireless microphone,  can be received by an ordinary 88- to 108-MHz FM broadcast receiver. For the power supply, this transmitter circuit is powered by a 9 V battery. To comply with the radiation limit of FCC rules, keep the antenna length under 12 inches. L1 is 6 turns of #24 wire wound around a pencil or a 1/4″ form, with turns spacing of 1 wire diameter. C6 is a gimmick capacitor which has value about 1 pF...

LM380, Simple 2 Watts Audio Amplifier

Small audio amplifier is useful for audio troubleshooting or simple audio projects. It should be a low cost and easy to build. Using integrated circuit for this purpose is the right choice. With LM380  audio amplifier integrated circuit, 2 Watts power can be delivered. For better thermal endurance, a large copper track can be printed in the board to provide heat sinking, this copper track should be soldered to pins 4, 3, 10, 5, 12 and 11...

Direct High Voltage DC Regulator

This regulator circuit stabilize the output voltage at 200V directly (without a transformer). Although the output voltage is high, this circuit only suffer a tension of the voltage drop (Vinput-Voutput), which is suffered mainly by the transistors. The op-amp suffers even less tension, since it regulate the applied voltage at their pins around the level of transistor’s bias voltage level...

Discrete Sliding Tone (Frequency Ramp) Doorbell

This doorbell circuit produces a low tone that will slide up to higher frequency. The equivalent total resistance connected between the base of Q1 and ground (Rbg) , and coupling capacitor  C1  determines the AF oscillator’s frequency. The resistance (Rbg) is equal to (R2+R1)R3.  The R2 is used to set the initial bias condition, adjusted to produce a pleasant low starting frequency doorbell tone. D1 will start to conduct when Capacitor C3 charge through R6 until it reaches D1 bias  voltage level. Then the value of Rbg is paralleled by R4 and D1, and R5-D2-D3, and the values of diode’s equivalent resistance is gradually...

LM3900 Audio Mixer

This audio mixer circuit doesn’t use a low impedance input to mix no ideal  sources, but use many amplifiers to provide  ideal sources before mixed through simple resistors. Ideal source means a sources with low impedances, make the interaction between signals in the output doesn’t affect the input.   Please note that this mixer circuit has high impedance output, so you’ll need an next processing equipment with appropriate  input specs. This audio mixer circuit is designed around an LM3900 quad op amp and combines 2 line and 2 mike inputs and sums them at the output terminal. To vary the gain (around +23 dB),...

Power Saver for Relays

Relays are normally operated at current level where it can initiate the mechanical metal contactors movement. After contacts has been established, the current level needed to keep the conductor plates stay attached is actually smaller than the current to initiate it. This power saver circuit seems to have opposite mechanism of surge protector. This circuit provide surge current to initiate mechanical movement, but after that, this circuit throttle the current to save the power, provide lower current level just to keep the contacts stay attached The mechanism of this circuit is similar but done in opposite way with current surge protector....

TDA7056 3W BTL Mono Audio Power Amplifier

For mono output amplifier application,  TDA7056  IC can be your option. Compact but powerful, this integrated circuit is contained in a 9 pin medium power package. This device is designed for battery fed portable equipments such as mono recorders, radios and television. To attract the market, TDA7056 has many features such as low power consumption. For more reliable operation, TDA7056 also has short circuit proof and ESD (Electro Static Discharge) protected on all pins.  Designing application with this IC should be easy since no external components is needed. To make sure you’ll love this chip, this device also has no switch...

Compressor Circuit with 570/571 Compandor IC

Compressor circuit provide high gain for low amplitude input and provide low gain for high amplitude input. This action, in effect, produce a nearly constant amplitude even though the input has very high dynamic range (very high amplitude variation from time to time). The action of compression like this is needed in some situation, such as in maximizing modulation depth in broadcasting, or sustaining electric guitar signal which has very high variation between the plucking time and fading out.  The following circuit has complementary input/output characteristic and unity gain at 0.775 VRMS input. Voltage gain through compressor...

Sound-Activated Lamp (Relay/Switch)

This simple circuit shown int the schematic diagram actives the switch using sound. We can use this circuit for various applications, such as automatic (sound-controlled) disco light or car’s LED light show.  The Q1 amplify the audio from mic. The R1 is used to adjust the peak of signal to greater than about 0.7 volts, act as sensitivity adjuster. A certain level, the signal coming from microphone, after amplification by Q1, will trigger the SCR and light lamp I1. If we change the lamp with a relay, then we can get a sound-activated relay/switch, which can be used to control more powerful / high wattage high voltage lamps. If we use...

Basic Complementary (Push-Pull) Power Amplifier Circuit

This amplifier circuit is very popular audio power amplifier circuit type. We call it a complementary since the final transistors is an NPN-PNP pair, each with the same characteristics. This circuit produce an AB class amplifier, since each transistor works in slightly more than half cycle of the signal. There is overlap area when both transistor conduct a current, and this area will be around its stationary current (when the input signal is zero). This circuit is also known as push-pull amplifier circuit since each transistor in the pair is working alternative...

LM3900 Audio Mixer

This audio mixer circuit doesn’t use a low impedance input to mix no ideal  sources, but use many amplifiers to provide  ideal sources before mixed through simple resistors. Ideal source means a sources with low impedances, make the interaction between signals in the output doesn’t affect the input.   Please note that this mixer circuit has high impedance output, so you’ll need an next processing equipment with appropriate  input specs. This audio mixer circuit is designed around an LM3900 quad op amp and combines 2 line and 2 mike inputs and sums them at the output terminal. To vary the gain (around +23 dB),...

Ni-Cad Battery Zapper, A Rechargeable Battery Reconditioner

Ni-Cad (NiCd, NiCad) battery, sometimes doesn’t work as expected, gives no power and cannot be recharged. In this situation, the battery need to be reconditioned. It’ is possible that the battery is internally shorted, and we can get the battery into life again by recondition the Ni-Cad battery using a zapper circuit. This circuit restore the Ni-Cad battery from shorting by forcing a high current flow to burn the internal dirt. The current stored in the high capacitance capacitor is heavy discharged by the SCR when zapping, and the SCR is used to disconnect the battery connection when charging the capacitor. A 120 ohm 10W resistor is used...

Main Power-Battery Backup Switcher

The schematic diagram shown below is a battery backup regulator circuit, useful for memory or other low power (battery operated) but critical circuit (must continue operation on powerline failure). The one LT020 will not conduct in under line-powered condition, made possible by means of of feedback string’s arrangement. In case of main power failure, the battery-driven LT1020 will turn on and maintain the load, when the line LT1020 go off because the line goes do...

High-Voltage Generator with HEX FET

The schematic diagram below show a circuit of high voltage generator. This circuit uses a 4049 hex inverter as an oscillator, and you can use ignition transformer from automotive engine. A fly-back transformer is possibly usable too. The 4049 will drive the IRF731 HEX FET. The Q1 must be heatsinked. Here is the schematic diagram of the circu...

Voltage-Controlled Attenuator (Volume Control) Using FET

Using the circuit shown in the schematic diagram below, we can control the low-level audio signals with ±3V variable DC voltage. This attenuator circuit uses a field effect transistor (FET) to shunt the signal to ground. The R2 is used to control the output level (the attenuation level), but you can use other source of voltage signal to control the grid of the FET, such as DAC output, just remember that this voltage is a negative going signal (you can use with DAC which uses symmetric power supply system). The minimum output of this circuit is when gate bias is zero. When the gate bias is set close to pinchoff value, the circuit will produce...

60-dB Range Compressor For Audio

A compressor circuit shown in the schematic diagram below can produce consistent output of 1.4V P-P over entire 60dB range that is very useful for audio level/volume stabilization.  As the main components, this circuit uses a 741 opamp and JFET. With input range of 20mV to 2oV, this circuit has delay time of 0.4s (decay time)  and response time of 1.2ms (attack time). The JFET is used as  voltage-controlled resistor in peak-detecting control loop of 741 opa...

Three Cells Produce Regulated 3V – 3.3V

Three NiCad and NiMH batteries can be used to produce 3V/3.3V supply voltage. This can be done by this linear regulator circuit. This circuit uses an ICL7611 micropower op amp and MAX872 voltage reference. This regulator can be used to replace the charge pump or a switching regulator. The dropout characteristics of this circuit depends on the characteristics of Q1. The Q1 must have a gate-threshold voltage below the lowest battery voltage when this circuit is used with low voltage like a three-cell battery. Here is the schematic diagram of the circuit: This circuit requires input voltage from 3V to 15V. This circuit has two mode, high power...

TLC497CN Negative Supply Generator

Negative supply from positive supply is needed if the circuit need both positive and negative supply while we have only positive supply. The circuit shown in the schematic diagram below is a negative supply generator, built using a TLC497CN integrated circuit. The TLC497CN is used as the main switching  circuit, and it can provide negative supply of up to 150mA. With an input supply of 10V, this circuit has efficiency about 50% but it is decreased under 50% when the input voltage is 5V. This circuit use resistor R1 to protect the IC1 from damage by limiting the current at the input to IC1 because this circuit is often be fed from...

Pulse-Train Triggering Circuit for Power Control

Typical circuit for welding equipment shown on the following circuit diagram. Turn on delay can be controlled accurately with Potentiometer P2. We can discharge C1 at each line zero voltage using DB1 diode bridge and R6-R7 resistors. The voltage charge will be reset at each new half line cycle and the turn-on delay will be maintained the same. Through both potentiometers, the Transil reduces power dissipation. Here’s the circuit diagram: Note: Transil is a transient voltage suppression diode trademarked by STMicroelectron...

2N3055 Variable Power Supply

This is simple 2N3055 Variable power supply circuit. This circuit has some advantages such as it it can deliver an output voltage between 1,5 V and 15 V with a 500 mA maximum current and low production cost. If the current consumption do not exceed 350 mA, the circuit has stabilization of better than 2%. Here is the circuit: The potentiometer is used to vary the output voltage. When overloading is happened, a buzzer will sound a alarm. This circuit use auto-oscillating buzzer, type 24. P1 slider voltage and the output voltage are compared by T4. The T3-T5 Darlington base current is stopped when the P1 slider voltage is 0,65 V higher...

Lab Power Supply

his bench power supply circuit is suitable for your electronic experiment lab. This circuit can be built no on a piece of copper-laminate. The Bench Power Supply was designed to use old lantern batteries, “D”, and “C”. This circuit can produce at least 12v -14v from  old batteries and cells. As a heat-sink, this  circuit uses a board. To connect the components, enamelled wire is used. To keep the transistor cool, it can be bolted. Here is the schematic diagram of the  circuit: The zener is used to regulate The output of this power supply. So, there is voltage approx 1.7v across a red LED and 8.2v between the base-emitter...

Selectable Voltages 6V, 9V, and 12V Linear Voltage Regulator

We can build a multiple voltage power supply 6, 9, and 12V  (AC-DC Adapter) with the circuit shown in the following schematic diagram.  Not only provide multiple voltage output with single voltage supply, this circuit add the benefit of regulating the voltage for better stability. The TIP31 transistor should be installed with proper heat-sink to prevent overheating. A transformer with rectifier diodes and filtering capacitor can be used to supply this circuit. You can use 1 A 15V transformer with 2200uF filtering capacitor for the AC to DC adapter....

Automotive/Car Power Adapter For 3V, 6V, or 9V DC Operated Devices

In automotive environment, it’s common that only single voltage power outlet is available. Using  the very popular LM317 voltage regulator IC, we can build a general purpose DC adapter to adapt car’s power outlet voltage (12-14 Volts) to supply small DC devices requiring lower voltage level. On the following schematic diagram for the car power adapter,  we can see that the output voltage depends on the value of R1, which is manipulated by connecting R3 or R4 via switch to program the output.  When connected through the switch, R1 will be in parallel with the selected resistor so the total resistance changes to affect the output...

Phase Delay Network for 3D Audio Enhancement

3D enhancement is needed to create a fully 3-dimensional sound for most stereo multimedia products. Usually, simple phase-delay circuits is used to produce a widening effect on the perceived sound field. However, there is transaural acoustic crosstalk effect. The following figure shows transaural acoustic crosstalk effect and schematic diagram of simple phase-delay circuits : Transaural acoustic crosstalk effect is a condition where some sound from the right-hand stereo speaker reaching the left ear, and vice-versa. This is an active circuit that uses first-order section to present a phase-shift filter with ft of 1kHz for the quadrature...

Video-Based Motion Sensor

The design is primarily based on an analog integrator circuit. The circuit integrates (i.e., sums) the input-voltage signal over a defined period of time. Based on an op-amp, the ideal circuit is shown in Figure 3. The factor –(1/RC) is constant, so the resulting output is inverted and proportional to the sum of the integrated values (i.e., proportional to the average of the signal in the integrated period of time). This is all it takes to “compress” the analog video signal. Although it seems complicated at first sight, it should be fairly simple by now (see Figure 4). The integrator is implemented by a National Semiconductor LM6134B, a...

LCD thermometer for engine of vehicle with IC-L7136 circuit

Many car product in thermo sensor ,so i would like to show you the LCD thermo sensor which can modify for your car. LCD car thermo circuit When the thermometer is the IC thermo sensor (S8100) or diode (1S1588) is used as thermal sensors. When using the IC thermo sensor, the thermometry to +100 ° C -40 ° C are possible. Also, when using the diode, measured at 150 ° C from -20 ° C are possible. Both sensors are contained in the set. This time I used the diode as a heat sensor to measure more than 100 ° C. ICL 7136 of Intersil (Harris) used for the thermometer and measure the voltage change minute by management before the temperature...

Automatic Intruder Burglar Alarm

This is a burglar alarm circuit written by Ron J. Its features include automatic Exit and Entry delays and a timed Bell/Siren Cut-Off. It’s designed to be used with the usual types of normally-closed input devices such as – magnetic reed contacts – micro switches – foil tape – and PIRs. But it can be Easily Modified to accept normally-open triggering devices – such as pressure mats. Hot It works This intruder burglar alarm is easy to use. First check that the building is secure and that the green LED is lit. Then move SW1 to the “set” position. The red LED will light. You now have about 30 seconds to leave the building. When you...

Program for Deadlock detection algorithm

INPUT: enter total no. of processes : 4 enter claim matrix : 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 enter allocation matrix : 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 enter resource vector : 2 1 1 2 1 enter the availability vector : 0 0 0 0 1 OUTPUT : deadlock causing processes are : 1 2 #include<stdio.h> #include<conio.h> void main() { int found,flag,l,p[4][5],tp,c[4][5],i,j,k=1,m[5],r[5],a[5],temp[5],sum=0; clrscr(); printf("enter total no of processes"); scanf("%d",&tp); printf("enter clain matrix"); for(i=1;i<=4;i++) for(j=1;j<=5;j++) { scanf("%d",&c[i][j]); } printf("enter allocation matrix"); for(i=1;i<=4;i++) for(j=1;j<=5;j++) { scanf("%d",&p[i][j]); } printf("enter resource vector:\n"); for(i=1;i<=5;i++) { scanf("%d",&r[i]); } printf("enter...

Types of Stepper Motors

Stepper motors come in two varieties: permanent magnet and variable reluctance. (The reader may be familiar with hybrid motors, which are indistinguishable from permanent magnet motors from the controller’s point of view.) Permanent magnet motors usually have two independent windings, with or without center taps. Center-tapped windings are used in uni polar permanent magnet motors. This can you see in the figure (1). Bipolar permanent magnet and hybrid motors are constructed with a mechanism similar to that used in uni polar motor, except that the two windings are wired without center taps in the Figure 2. The motor itself is simpler, but...

C program for Round Robin CPU Scheduling Algorithm

INPUT : enter the process name : aaa enter the processing time : 4 enter the process name : bbb enter the processing time : 3 enter the process name : ccc enter the processing time : 2 enter the process name : ddd enter the processing time : 5 enter the process name : eee enter the processing time : 1 OUTPUT : p_name p_time w_time aaa 4 9 bbb 3 3 ccc 2 6 ddd 5 10 eee 1 11 total waiting time : 39 average waiting time : 7.8000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 #include<stdio.h> #include<conio.h> #include<process.h> #include<string.h> void main() { char p[10][5]; int et[10],wt[10],timer=3,count,pt[10],rt,i,j,totwt=0,t,n=5,found=0,m; float...

Java applet program that allows the user to draw lines, rectangles and ovals

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import java.awt.*; import java.applet.*; /* <applet code="Sujith" width=200 height=200> </applet> */ public class Sujith extends Applet { public void paint(Graphics g) { for(int i=0;i<=250;i++) { Color c1=new Color(35-i,55-i,110-i); g.setColor(c1); g.drawRect(250+i,250+i,100+i,100+i); g.drawOval(100+i,100+i,50+i,50+i); g.drawLine(50+i,20+i,10+i,10+i); } } } Output: Java applet progrme for draw lines, circle, rectan...

Java applet program for handling mouse events

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 import java.awt.*; import java.awt.event.*; import java.applet.*; /* <applet code="Mouse" width=500 height=500> </applet> */ public class Mouse extends Applet implements MouseListener,MouseMotionListener { int X=0,Y=20; String msg="MouseEvents"; public void init() { addMouseListener(this); addMouseMotionListener(this); setBackground(Color.black); setForeground(Color.red); } public void mouseEntered(MouseEvent...

C program to find the Shortest path for a given graph

OUTPUT: enter the cost matrix : 0 1 4 2 0 0 0 0 2 3 0 0 0 3 0 0 0 0 0 5 0 0 0 0 0 enter number of paths : 4 enter possible paths : 1 2 4 5 0 1 2 5 0 0 1 4 5 0 0 1 3 4 5 0 minimum cost : 4 minimum cost path : 1–>2–>5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #include<stdio.h> #include<conio.h> void main() { int path[5][5],i,j,min,a[5][5],p,st=1,ed=5,stp,edp,t[5],index; clrscr(); printf("enter the cost matrix\n"); for(i=1;i<=5;i++) for(j=1;j<=5;j++) scanf("%d",&a[i][j]); printf("enter number of paths\n"); scanf("%d",&p); printf("enter possible paths\n"); for(i=1;i<=p;i++) for(j=1;j<=5;j++) scanf("%d",&path[i][j]); for(i=1;i<=p;i++) { t[i]=0; stp=st; for(j=1;j<=5;j++) { edp=path[i][j+1]; t[i]=t[i]+a[stp][edp]; if(edp==ed) break; else stp=edp; } } min=t[st];index=st; for(i=1;i<=p;i++) { if(min>t[i]) { min=t[i]; index=i; } } printf("minimum...

C program for finding remainder

OUTPUT: enter frame: 1 0 1 1 0 1 0 0 enter generator: 1 0 1 0 remainder is: 0 0 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #include<stdio.h> #include<conio.h> void main() { int i,j,gen[4],rem[4],frl=8,genl=4,k,k1,fr[11]; clrscr(); printf("enter frame:"); for(i=0;i<frl;i++) { scanf("%d",&fr[i]); } for(i=frl;i<11;i++) { fr[i]=0; } printf("enter generator:"); for(i=0;i<4;i++) scanf("%d",&gen[i]); for(k=0;k<frl;k++) { if(fr[k]==1) { k1=k; for(i=0,j=k;i<genl;i++,j++) { rem[i]=fr[j]^gen[i]; }   for(i=0;i<genl;i++) { fr[k1]=rem[i]; k1++; } } } printf("\nremainder is: "); for(i=0;i<4;i++) printf("%d",rem[i]); ...

Java program for creating multiple threads

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 class NewThread implements Runnable { String name; Thread t; NewThread(String threadname) { name=threadname; t=new Thread(this,name); System.out.println("New Thread:"+t); t.start(); } public void run() { try { for(int i=5;i>0;i--) { System.out.println(name+ ":"+i); Thread.sleep(1000); } } catch(InterruptedException e) { System.out.println(name+" Interrupted"); } System.out.println(name+" exiting"); } } class MultiThreadDemo {   public static void main(String[] args) { new NewThread("One"); new NewThread("Two"); new NewThread("Three"); try { Thread.sleep(10000); } catch(InterruptedException...

Java program that finds the area of a circle using Client-Server network

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 import java.net.*; import java.io.*; public class server { public static void main(String args[]) throws Exception { ServerSocket ss=new ServerSocket(2000); Socket s=ss.accept(); BufferedReader br=new BufferedReader(newInputStreamReader(s.getInputStream())); double rad,area; String result; rad=Double.parseDouble(br.readLine()); System.out.println("From Client : "+rad); area=Math.PI*rad*rad; result="Area is "+area; PrintStream ps=new PrintStream(s.getOutputStream()); ps.println(result); br.close(); ps.close(); s.close(); ss.close(); } } public class client { public static void main(String args[]) throws Exception {   Socket...

Java program for implentation of consumer problem using inter thread communication

Write a Java program that correctly implements producer consumer problem using the concept of inter thread communication. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 class Q { int n; boolean valueSet=false; synchronized int get() { if(!valueSet) try { wait(); } catch(InterruptedException e) { System.out.println("Interrupted Exception caught"); } System.out.println("Got:"+n); valueSet=false; notify(); return n; } synchronized void put(int n) { if(valueSet) try { wait(); } catch(InterruptedException e) { System.out.println("Interrupted Exception caught"); ...

Java program that illustrates how run time polymorphism is achieved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 class figure { double d1,d2; figure(double a,double b) { d1=a; d2=b; } double area() { System.out.println("Area of the figure"); return 0; } } class rectangle extends figure { rectangle(double a,double b) { super(a,b); } double area() { System.out.println("Area of rectangle"); return d1*d2; } } class triangle extends figure { triangle(double a,double b) { super(a,b); } double area() { System.out.println("Area of triangle"); return d1*d2/2; } } class runpoly { public static void main(String[] args) { figure f=new figure(45,6); rectangle r=new rectangle(10,30); triangle t=new triangle(10,20); ...

PCI Signal Descriptions

2 PCI Signal Descriptions 2.1 System Pins CLK Clock provides the timing reference for all transfers on the PCI bus. All PCI signals except reset and interrupts are sampled on the rising edge of the CLK signal. All bus timing specifications are defined relative to the rising edge. For most PCI systems the CLK signal operates at a maximum frequency of 33 MHz. To operate at 66MHz, both the PCI system and the PCI add-in board must be specifically designed to support the higher CLK frequency. A 66 MHz system will supply a 66 MHz CLK if the add-in board supports it, and supply a default 33 MHz CLK if the add-in board does not support the...
Page 1 of 6912345Next

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls