[SOLVED] variable frequency in hex bridge via pic18F2431

Status
Not open for further replies.

zish wish

Newbie level 3
Joined
Apr 22, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Pakistan
Visit site
Activity points
33
Hi,
I am generating 6 pwms by pic18f2431 for three phase inverter (hex bridge for vfd). I am varying the frequency by varying the delay (counterL and counterH registers) which is the source of generating frequency.the problem which i am facing is that the value in these registers is not loaded by two registers (RESL and RESH). The value in RESL and RESH is coming after a multiplication and subtraction operation (implementing an equation of line). The value of RESL and RESH is not loaded in counterL and counterH because the value in these registers is changing every time (decsfz command is doing something that it starts decremening from some value which is greater than RESL and RESH).
I've attached the .asm file.
 

Attachments

  • pwm1.zip
    2.1 KB · Views: 91

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…