I will draw a block diagram and I will post it here.
Hi mat,
That would be of great help to all the pic-ers here.
Regards
Sougata
Here is the block diagram for the output stage.
When you use the SG3524 at the inputstage to make the 320V dc out of the 24Volts.
I will also make a block diagram for the sw but that will take a while.
It is very hard for me to make a flowchart of the program without telling how the programm works. So here is a small tekst.
There is a table of 200 numbers what is the pulse width of the pwm.
Timer 1 is loaded with a 16 bit number eg $FE5F.
every interrupt the PWM gets int new number out of the table.
The table number is set to the new number (old number + 1)
if number => 200 then number = 0..
I will look if it is a problem to post the table. If not then I will post the data of the table.
Hi Matt,
I will work the other way round. Rather I would try to post a flow chart (I am not so good at it) so that you and other members can go through it to detect any possible flaws or betterment suggestions. BTW thanks for the block. I was out-of town hence the delay in reply
Regards
Sougata
Normaly I also make the flowdiagram first and then write the program and when it is a simple aplication i don't make a flowdiagram.This program was made a few years ago so I have to look to the comment and in that time I did not make a flowchart.
Here is the data of the pwm of a sine wave in 200 steps.
128,132,136,139,143,147,150,154,158,161,165,169,17 2,176,179,182,186,189,192,195,
199,202,204,207,210,213,215,218,220,223,225,227,22 9,231,233,235,237,238,240,241,
242,243,244,245,246,247,247,247,248,248,248,248,24 8,247,247,247,246,245,244,243,
242,241,240,238,237,235,233,231,229,227,225,223,22 0,218,215,213,210,207,204,202,
199,195,192,189,186,182,179,176,172,169,165,161,15 8,154,150,147,143,139,136,132,
128,124,120,117,113,109,106,102, 98, 95, 91, 87, 84, 80, 77, 74, 70, 67, 64, 61,
57, 54, 52, 49, 46, 43, 41, 38, 36, 33, 31, 29, 27, 25, 23, 21, 19, 18, 16, 15,
14, 13, 12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 10, 11, 12, 13,
14, 15, 16, 18, 19, 21, 23, 25, 27, 29, 31, 33, 36, 38, 41, 43, 46, 49, 52, 54,
57, 61, 64, 67, 70, 74, 77, 80, 84, 87, 91, 95, 98,102,106,109,113,117,120,124
The data is the on period of the pwm.
I disassembled a DOA APC ES500 UPS the other day, and found that it contained a 28bit PIC (can't remember which). There were other ICs between the PIC and the output FETs (SG????'s).
Bookmarks