You are on page 1of 9

GENERATE 5KHZ SQUARE WAVE ON PIN NO.

10 OF AT89C51

PREPARED BY: JANANI BRIJ H.

APPARTUS:

BRIDGE MC AT89C51 POWER SUPPLY(12-0V) CAPACITOR(1000f) VOLTAGE REGULATED IC 7805 CRYSTAL OSCILATOR RESISTER(8K2)

CIRCUIT DIAGRAM

THEORY:

The following project is based on to generate 5KHZ square wave on microcontroller AT89C51. This project consists of components like bridge, microcontroller AT89C51, transformer (12-0-12V), two different values of capacitor , the one is 1000mf, and the other is 10mf. And it is also consist of resistor of the value of8k2. Now when power supply is given to the circuit, the bridge converts the 230V ac supply into 12V dc. The reason behind use the supply of 12V is that, if we use the supply less than 12V, it may be possible that the circuit will be damaged. And it is also possible that if we use lower than 12V supply the circuit will not be able to run about several hours.

Now this power supply will pass through bridge, and then after it will goes towards the voltage regulated IC 7805, the main function of this ic is to control the supply which is passed through it, and it will accept only the required supply. And then, the microcontroller AT89C51, the capacity of this appartus is only 5v, so it just accept the required 5v from the supply .

Now its turn of the clock circuit, this little part consist of a crystal oscillator and the the two capacitor of the value of 3.3 pf. It is impossible to run this project without the clock circuit. It is also a reset circuit, this clock circuit will generate a frequency of 5KHZ. And then the output of this circuit will be taken from the pin no.10 where the output square wave can be taken. We take the output from any pin of that port but generally it is taken from the pin no. 10

PROGRAM:

org 0000h

back1: setb p1.0 mov tmod,#10h mov tl1,#00h mov th1,#0ddh setb tr1 again: jnb tf1,again clr tr1 clr p1.0

mov tmod,#10h mov tl1,#0bdh mov th1,#0ffh setb tr1 back: jnb tf1,back clr tr1 sjmp back1 end

THANK YOU

You might also like