OK thanks for writing that all up Darrel, it all seems to make sense now.
You are right in that it is probably the best solution for everybody for me just to export the sound data already in the formats you need for PBP. So I need to add 3 export options to the BTc Encoder export menu!
Lets see if I got this right;
(with all formats bits are played from left to right)
1. retlw format for 14 bit core PICs;
Ok so if I understand you right you want NO ORG statements at all and the sound data formatted vertically like this;
retlw 0x55 ;
retlw 0x46 ; (etc)
2. DA (or DW which do you prefer?) for 14 bit core PICs;
DA 0x1551, (x8 words per line?)
(where there are 14 bits from the BTc data stream, and left padded with 2 zeros)
2. DW (or DB ?) for 16 bit core PICs;
DW 0x5546, (how many per line?)
(or) DB 0x55, 0x46 (etc)
(obviously 16 bits of sound data or 8 bits of sound data)
I have time over the next 2 weeks to add these 3 export options, if you could just answer the above queries that would be great!
Re the "small" 14 bit core PICs, the 16F876/877 are still very popular with the hobby crowd and with 15625 Hz playback they will fit about 4 seconds of sound in internal rom which is quite a lot, plenty for talking remote controls and simple user feedback systems etc.
To Bruce- I agree totally that a cut down int driven version is a good thing. Part of the reason I added freq resampling to the BTc Encode was so people can play sound at any bitrate their int uses, ie like 4mHz/inst and 256 inst/int gives 15,625 Hz which has been a popular playback freq. All the int needs to do it output one bit every int, as you can image that suits low power PIC projects. I have some .asm code of my own for cut down apps which is crude but I will put it up on my page soon anyway. Believe me it has nothing like the elegance of Darrel's code above!
Also re sound quality, I think maximising volume of Darrel's samples would have given even better sound quality. As the PCM noise is of a fixed amplitude, pumping the signal volume to the max BEFORE encoding yields a major improvement in sound quality.
Bookmarks