Works good!
Thanks Darrel
Would it be correct to say the maximum PWM frequency for a 40 MHz PIC is 152 Hz?
To slow for music.
Know of any > 10 bit PWM PIC's?
Norm
Yup, that's what mister-e's calculator says with 40mhz, 1:1, and 16-bit. 152 hz.
The PIC18F2331/2431/4331/4431 series has a bunch of 14-bit PWM modules. But they are completely different from the CCP module.
Bruce has done a few examples, but I don't think any of them were for music.
best regards,
DT
PIC18F2331/2431/4331/4431:
FOSC 40 MHz
MIPS 10
PWM Resolution 14 bits
PWM Frequency 2.4 kHz
14 bit to slow for CD quality music.
10 bit sounds good though.
A dsPIC would be ideal.
On my first post my code included saving the state of the critical registers.
Would this be required in a longer program?
Norm
Last edited by Normnet; - 14th December 2009 at 05:57.
Maybe you'd be better off with an R2R network as a Digital to Analog Converter.
Something like what Steven Wright did here (Not PBP).
SDMMCWavPlayer
http://www.sfcompiler.co.uk/wiki/pmw...SDMMCWavPlayer
And no, you won't need to save STATUS, WREG and BSR, unless you start using Low Priority interrupts.
The Shadow registers automatically save and restore them in hardware for High priority ints on 18F's.
<br>
DT
R2 ladder done here PIC iPod wav player
Now would like to port to PBP a basic PWM low pin count low part count wave player.
The code is 8,069 program bytes possibly less if optimized.
Are their < 28 pin 18F PICs supported by compiler 2.50C?
Norm
Bookmarks