]> sigrok.org Git - sigrok-dumps.git/blame - pwm/alsa_test/README
Add a pwm dump.
[sigrok-dumps.git] / pwm / alsa_test / README
CommitLineData
31fd2ff2
TD
1Hardware used
2=============
3* Saleae clone
4* Olimex AT Mega32U4 "T" board
5 https://www.olimex.com/Products/Duino/AVR/AVR-T32U4/
6
7For "high speed" operation, the T32U4 must be jumpered to run on 5V!
8
9Software
10========
11* avr-gcc & companions
12* ALSA
13* LUFA
14 http://www.fourwalledcubicle.com/LUFA.php
15 in particular, the ClassDriver/AudioOutput demo
16 LUFA-140302/Demos/Device/ClassDriver/AudioOutput/
17
18Adapted the Makefile:
19
2014c14
21< MCU = at90usb1287
22---
23> MCU = atmega32u4
2416,17c16,17
25< BOARD = USBKEY
26< F_CPU = 8000000
27---
28> BOARD = OLIMEXT32U4
29> F_CPU = 16000000
30
31[make; avrdude ...]
32
33Left channel on OC3A (pin32) -> Olimex "D5" -> probe 4.
34
35Run "aplay -D front:CARD=Demo,DEV=0 /usr/share/sounds/alsa/test.wav"
36while the Saleae records for 8 seconds. The result is pwmtest.sr.
37Probe 5 was unterminated, see the crosstalk.
38
39You can test the PWM decoder via CLI and extract the raw values:
40sigrok-cli -i pwmtest.sr -P pwm:pwm=4 -B pwm=raw > PWM.raw
41
42Add e.g. some .wav header using sox:
43sox -t raw -e unsigned -b 8 -r 64000 PWM.raw PWM.wav