[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
virt2real.ru Управляем чем угодно откуда угодно 2016-03-10T13:41:58+04:00 http://forum.virt2real.ru/feed.php?f=41&t=14663 2016-03-10T13:41:58+04:00 2016-03-10T13:41:58+04:00 http://forum.virt2real.ru/viewtopic.php?t=14663&p=23450#p23450 <![CDATA[Re: Осциллограф: proof-of-concept]]> Снимать напряжение, ток, мерить давление воздуха в нескольких местах.

Статистика: Добавлено pek — 10 мар 2016, 13:41


]]>
2015-02-05T02:28:37+04:00 2015-02-05T02:28:37+04:00 http://forum.virt2real.ru/viewtopic.php?t=14663&p=21510#p21510 <![CDATA[Осциллограф: proof-of-concept]]>
v2r_osciloscope_pwm_24000_60000_1.png

Пока аноанс, отчёт и код чуть позже.

Давно крутилась в голове идея организовать себе цифровой DIY осциллограф, да не было повода. Недавно повод появился, и вот что получилось за два вечера.

Маленькая прога на основе читает семплы с ADC, запаковывает в пакет и отправляет по UDP на адрес компа. Подключение USB-net

Сначала думал реализовать драйвер, для , но потом решил, что для proof-of-concept это будет перебор.

В итоге, визуальная часть написана на питоне + pygame за вечер. В коде присутсвует много желудей, спичек и синей изоленты.

На картинке - выхлоп pwm3 (echo pwm 3 24000 60000 > /dev/v2r_pins), что соответсвует ширине импульса 1 мс
Видно, что импульсы отображены с разной шириной. Пока я не понял, кто в этом виноват - ADC, прога на виртурилке или ядрёный драйвер.

В планах реализовать отображение остальных каналов, автоматическое определение sample-rate'а и нормальная сетка и определение фронта-сапада, что бы меандр по экрану не бегал.

По ходу ковыряния c ADC возникло пара вопросов.

Первый: на какой частоте работает ADC? В Вики что-то не нашёл этой инфы. В даташитах за час ковыряния не нашёл. Замеры показывают, что семплы валятся примерно с частотой 24кГц. но есть пдознение, что это ограничено производительностью CPU скорее, чем частотой ADC. Это вытекает из второго вопроса.

Второй вопрос возник после втыкания в даташит на ADC и в код ядрёного модуля

adc_read_block() вызывает () в цикле.

Каждый вызов adc_single() стартует цикл ADC, ждёт окончания и вычитывает значение одного канала.
В режиме free-run в регистрах ADC по идее уже должны быть какие-то значения. Вопрос собственно в том - вычитываются ли эти значения или каждый вызов adc_single стартует новый цикл ADC. Есть подозрение, что всё таки второе.

По идее, в режиме free-run драйвер должен ловить прерывания от ADC и устройство должно поддерживать poll/epoll.

Stay tuned!

Статистика: Добавлено eagafonov — 05 фев 2015, 02:28


]]>