导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→ADC在startKIT(现在可以通过社区选项卡)

* 91925: ADC在startKIT(现在可以通过社区选项卡)

   liufengzhong 
liufengzhong发表的帖子 

 ADC在startKIT(现在可以通过社区选项卡)


项目概述

最后…… 这里是一些演示代码允许您轻松地使用startKIT adc。 我试图尽可能MCU-like API。

是一个简单的应用程序,包括灯相对应的发光二极管4 ADC输入成正比的ADC值。

驱动包含链接设置魔法,所以ADC功能/调试和运行时还在闪烁。

别忘了让xscope I / O(在GUI或运行配置——xscope提示)查看控制台输出。

享受与模拟世界! 我也会看得到这inetgarted例子. .

从adc.h:

//adc.h for startKIT written by infiniteimprobability (xcore.com) June 2014


//


//Contains ADC task and ADC interface definition


//


//Aims to present the U8A/startKIT ADC in an MCU-like manner by abstracting away


//channels, link setup (for startKIT FLASH boot) and trigger requirements.

//


//Enables all 4 channels and provides simple API for trigger, read and conversion complete event


//Practical fastest sample rate (to aquire all 4 channels) with all cores running flat-out


//is about 50us (to trigger, aquire, notify and read). So about 20KHz. Assumes core sharing with GPIO (slower)


//Ie. This module is built for comfort rather than speed. Give it it's own core and only run 4 cores total,


//and this number jumps to about 6us, or about 165KHz. Much closer to max theoritcal b/w of 1MHz/4 = 250KHz


//


//Runs in two modes (self tiggering periodically or trigger on request). Trigger function still callable


//in periodic mode and conversion finished notfication available in period mode if needed. Task is combinable


//so you can run it with other low speed tasks in the same logical core! (eg. GPIO)


//


//License = do what you like with it! But please post your projects on xcore


按此在新窗口浏览图片

按此在新窗口浏览图片




发表时间:2014年9月16日19:47:52

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:32 x32像素的RGB LED矩阵 /P P [url=https://g
[下一篇帖子]:niXmos线性数码管控制器[url=http://www.xcore.com/counter.ph