Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

AT89S52 inverter need help

Status
Not open for further replies.

jayM

Newbie level 2
Joined
Apr 15, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
i try to program AT89S52 to generate PWM for my inverter but it not work....
can somebody help me to write asm code.
 

jayM

Newbie level 2
Joined
Apr 15, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
PWMPIN EQU P3.0
PWMPIN EQU P3.1
PWM_SETUP:
MOV TMOD,#00H
MOV R7, #160
SETB EA
SETB ET0
SETB TR0
RET

TIMER_0_INTERRUPT:
JB F0, HIGH_DONE
LOW_DONE:
SETB F0
SETB PWMPIN
MOV TH0, R7

CLR TF0
RETI

HIGH_DONE:
CLR F0
CLR PWMPIN
MOV A, #0FFH
CLR C
SUBB A, R7
MOV TH0, A
CLR TF0
RETI

i use this code to generate PWM for inverter....
can some one give a comment or suggestion about this code
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top