Chameleon-AVR Nurve Networks, Chameleon-AVR Datasheet - Page 74
Chameleon-AVR
Manufacturer Part Number
Chameleon-AVR
Description
MCU, MPU & DSP Development Tools AVR8 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet
1.CHAMELEON-AVR.pdf
(268 pages)
Specifications of Chameleon-AVR
Processor To Be Evaluated
AVR 328P
Data Bus Width
8 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 74 of 268
- Download datasheet (17Mb)
I think I can live with that! Table 14.3 shows the results of the synthesis algorithm running once again.
As you can see in this case, each cycle the sine table is accessed by skipping an entry or two causing a bit of distortion,
but since the table has 256 entries the amount of distortion is 1-2% at most, so once again we see that the technique
works perfectly. Also, notice that it takes only 100 cycles of the PWM clock to iterate thru one complete cycle of the sine
table which makes sense as well.
In conclusion, the software is where the magic is here. The PWM audio circuitry couldn’t be simpler as shown in Figure
14.5. Additionally, you can synthesize multiple channels by simply having multiple phase accumulators and phase
increments, in fact to synthesize a 64 channel system you would just need something like:
And you simply run a loop over everything and at sum up all the phase accumulators each cycle and use the sum as the
index into the sine table. Of course, the sine table itself has to scaled in the amplitude axis and you must do a auto-scale,
so that the sum doesn’t overflow, but you get the idea. Moreover, you can store other waveforms like square, triangle,
sawtooth, and so on and then mix various waveforms. Finally, you can easily overlay a ADSR (attack – decay – sustain –
release) envelope to a note based system and create just about anything. The only downside to PWM is that it must be
VERY accurate, your ears are VERY sensitive to frequency shifts, so the timing loops must be perfect, thus a hardware
timer or a tight loop needs to be used that doesn’t vary otherwise, you will hear it.
In conclusion, that’s a taste of what goes into generating sounds on the Propeller chip. Then there is the whole other
process of creating a sound engine on top of these techniques to play “music” such as MIDI or MOD.
Truncation error = 100*(0.8 / 652.8) = 0.12%
Iteration
0
1
2
3
4
5
6
7
.
.
100
Table 14.3 – Test of PWM algorithm at 2500 Hz with PHASE_INC of 652.
PHASE_INC
652
652
652
652
652
652
652
652
652
PHASE_ACC PHASE_ACC (upper 8-bits)
0
652
1304
1956
2608
3260
3912
4564
65000
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
0
2
5
7
10
12
15
17
253
74
Related parts for Chameleon-AVR
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
MCU, MPU & DSP Development Tools PIC24 & PROPELLER DEV SYSTEM (SBC)
Manufacturer:
Nurve Networks
Datasheet:
Part Number:
Description:
MCU, MPU & DSP Development Tools AVR8 VIDEO GAME DEV SYSTEM (SBC)
Manufacturer:
Nurve Networks
Part Number:
Description:
MCU, MPU & DSP Development Tools PIC24 VIDEO GAME DEV SYSTEM (SBC)
Manufacturer:
Nurve Networks