I will test the software on my development board and see if I get a sine wave of 50Hz or not. Maybe Proteus is not simulating the program at the right clock speed.
Thanks
Type: Posts; User: Cyborg; Keyword(s):
I will test the software on my development board and see if I get a sine wave of 50Hz or not. Maybe Proteus is not simulating the program at the right clock speed.
Thanks
There is no frequency in mind. I just want to learn more about TMR0 interrupt and the generation of sine wave using PWM technique. The only thing I didnt mention in my first post is that once TMR0...
My ADC value is 200 (50 Hz) and my new table has 72 entries from 0 to 350 in steps of 5.
I get 37.5 Hz
Hi again,
I changed my sine entries to 72 samples from 0 to 350 in steps of 5. According to calculations above, TMR0 interrupt is generated every 141us (88*1.6us) so for 142 samples the frequency...
Hi everyone,
I am trying to generate one sine wave using PCPWM of PIC18F4331. I have set the frequency of PWM to 20KHz (PTPER 249) and I am using 20MHz crystal. I have calculated the resolution...
All right. Thank you very much.
Hi,
I have been trying to figure out how the following equation works, i.e.
timer0 reload value = FFFFh - (Fosc/4)/ (2*(sine table entries - 1)(timer0 prescaler value/4)*frequency)
This...
You are right. So for 10 bits, thats 2 LSBs of PDCxH and 8 bits of PDCxL. Thanks.
Hi Bruce,
you mentioned above that the equation used to calculate the PWM resolution is
log(20MHz/19.455kHz) 3.01
Resolution = ------------------ = ----------- = 10 bits...