Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pwm using AT89C51 MICROCONTROLLER

Status
Not open for further replies.
Hai,
not at any point specifically when i send a pulse of 0% duty cycle the firing must be zero degrees so the conduction angle is 180 degrees so the output voltage must be 230V but I am getting some trigger so that means there is some firing angle and because of that there is some conduction angle hence 230 v is not obtained

I hope you understand my problem.....
Thanks
 

sir,
i m using a 12v dc motor, i want to change its speed in 4 steps, like slow,medium,high ,stop with one switch.....so how can i use this... tell me the assembly code for it,,,,,,,,,,,its so urjent for me..

thnk u sir
 

i m using a 12v dc motor, i want to change its speed in 4 steps, like slow,medium,high ,stop with one switch.....so how can i use this... tell me the assembly code for it

you would like to use only a single switch for stage transitions
 

yes sir i using only single key for speed variation but iwant to know about pwm method ,how does it work ,.............plz give me sample asm code for it to controll the speed of dc motor.....
 

yes sir i using only single key for speed variation but iwant to know about pwm method ,how does it work ,.............plz give me sample asm code for it to controll the speed of dc motor.....

I didn't check the code I am giving you but I hope this will give you an idea regarding using the one key for varying the duty cycle. The pwm all depends on varying the duty cycle.I hope it will work once check it out with simulator then go to the further steps

Code:
org 00h
mov p1,#00h
MOV TMOD,#01H
MOV SCON,#50H
mov p1,#00h
MAIN:
	mov a,p1
	cjne a,#00h,loop1	//IF IT GET HIGHPULSE THEN IT SWITCHES TO NEXT LEVEL OTHERWISE IT WILL STAY IN THE PARTICULAR LEVEL
	setb p2.1 //0.5ms on
		MOV TL0,#33H
		MOV TH0,#0feH
	call delay
	clr p2.1 //9.5ms off
		MOV TL0,#0CDH
		MOV TH0,#0DDH
	call delay
	sjmp main

loop1:
	mov a,p1
	cjne a,#00h,loop2
	setb p2.1	//4ms on
		MOV TL0,#09aH
		MOV TH0,#0F1H
	call delay
	clr p2.1	//6ms off
		MOV TL0,#066H
		MOV TH0,#0EAH
	call delay
	sjmp loop1

loop2:
	mov a,p1
	cjne a,#00h,loop3
	setb p2.1		//8ms on
		MOV TL0,#033H
		MOV TH0,#0E3H
	call delay
	clr p2.1	   //2ms off
		MOV TL0,#0CDH
		MOV TH0,#0F8H
	call delay
	sjmp loop2

loop3:
	mov a,p1
	cjne a,#00h,main
	setb p2.1	   //9.5ms on
		MOV TL0,#0CDH
		MOV TH0,#0DDH
	call delay
	clr p2.1	  //0.5 ms off
		MOV TL0,#033H
		MOV TH0,#0FEH
	call delay
	sjmp loop3

delay:
	SETB TR0	
	L1:JNB TF0,L1  	
	CLR TF0
	clr tr0
	RET
end

- - - Updated - - -

give the switch input to any port of the p1 and output will be taken from the p2.1 you can keep the multimeter and check it out whether it changing the voltage or not .......
 

Hi everyone,
At last found the solution for dimming we can use the 2 methods
1. The famous phase control firing where we give delay for some time before triggering which results in the chopping of the ac wave
2. Second is that we can simply just do the PWM(Pulse Width Modulation ) but we have to do a simple modifications in the circuit which can do the dimming the only thing we have to do is divide make the duty cycle for 10ms maximum and there by vary it . It is working tested with avr microcontrollers
Hope this helps to all the people who are under confusing that whether we can use the pwm or not but now got the clarification that we can even use the pwm for dimming
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top