完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
F28335威廉希尔官方网站
手册上面说,内部ADC最高采样率顺序采样可达到8M左右,同步采样可以达到4M左右,我采用的PWM触发其ADC同步采样,只读取一个通道的值,最高采样率可以达到750K,却提高不上去了,ADC时钟设置最高和采样保持时间设置最短,请问F28335威廉希尔官方网站
手册上面说的那么高的采样率怎么达到哈?或者F28335威廉希尔官方网站
手册上面的几M采样率是几个通道合起来的采样率?请各位大神帮忙解决,谢谢!
|
|
相关推荐
11 个讨论
|
|
手册上也没有具体说明采样率是不是用其他触发方式触发的 ,不知道您可不可以提高采样率呢? 我得到的750K是指的触发ADC的PWM频率,同时也是ADC进中断和出中断的频率,我是通过拉高拉低一个IO口来观察ADC的采样率的;当我提高触发ADC的PWM频率大于750K时,发现不能有效触发ADC去采样,意思是触发频率太高有的触发信号是无效的。如果不用PWM触发,那么还有什么好的办法来提高采样率呢,有改过的例程那就最好啦,我试过很多次都没成功,希望您能帮我解决,谢谢! |
|
|
|
|
|
yhxcsf 发表于 2018-10-4 15:06 手册标识的采样频率是指ADC采样保持器的速度,你用的测试方法其中会涉及转换时间已经进出中断时间都会有CPU Clock的delay。所以并不是准确的数据。 |
|
|
|
|
|
muuwfwr 发表于 2018-10-4 15:16 你好,我还是想问一下您,那我该如何更好地测试我的ADC真实的采样速率呢?我只是保证了基本的取ADC寄存器的值得几段语句再加上IO口拉高拉低的语句,这几句我看了一下系统运行时间,远小于1/750K的时间哈,您的意思还有出中断和进中断的时间,那也很小哈,是不是触发ADC的方式不对?还有,我想问一下您,您在实际中能够达到的最高采样率到多少呢?谢谢您的回答! |
|
|
|
|
|
yhxcsf 发表于 2018-10-4 15:33 AD实测采样率我最高是3M不到。 最简单的方法:一般的示波器都有一个基准方波信号,1KHZ(周期1ms),你让28335采这个信号,CCS里用数组存下来,导入EXCEL,画个图(插入->折线图),看1个周期有多少个数据,再除以1ms,就是采样率。如图 SAMPLE RATE = 168 SAMPLS/ 1ms = 168 000 Samples/s = 168K. |
|
|
|
2 条评论
|
|
谢璐晨123 发表于 2018-10-4 15:40 你好,试了您的方法,可以看出采样率。但是我的最高采样率还是750kHz,我采用的是PWM触发采样的,同步采样模式,在ADC中断中将数据存入数组。能不能把您的ADC采样率3M的那个ADC初始化程序发给我学习一下不?真的纠结了好久啦,谢谢您。 |
|
|
|
|
|
yhxcsf 发表于 2018-10-4 15:52 我这里是采4个通道,每个通道 600多K,和你的采用PWM方式不一样,我采用的方法是用一个脉冲产生AD转换,然后AD自动转换,DMA送到内存。 /*************************************************************************** If the cascaded SEQ was executed, the results would go to the following ADCRESULT registers: ADCINA0 -> ADCRESULT0 ADCINB0 -> ADCRESULT1 ADCINA1 -> ADCRESULT2 ADCINB1 -> ADCRESULT3 ADCINA2 -> ADCRESULT4 ADCINB2 -> ADCRESULT5 ADCINA3 -> ADCRESULT6 ADCINB3 -> ADCRESULT7 ADCINA4 -> ADCRESULT8 ADCINB4 -> ADCRESULT9 ADCINA5 -> ADCRESULT10 ADCINB5 -> ADCRESULT11 ADCINA6 -> ADCRESULT12 ADCINB6 -> ADCRESULT13 ADCINA7 -> ADCRESULT14 ADCINB7 -> ADCRESULT15 ****************************************************************************/ void ADCConfig(void) [ //InitAdc(); //AdcRegs.ADCREFSEL.bit.REF_SEL = 0x0; // 00,Internal reference selected (default) //AdcRegs.ADCTRL1.bit.ACQ_PS = 0xF; // This bit field controls the width of SOC pulse, //AdcRegs.ADCTRL1.bit.CONT_RUN = 0; // 0/1:Start-stop mode/Continuous conversion mode //AdcRegs.ADCTRL1.bit.SEQ_OVRD = 0; // Sequencer override Disabled,Allows the sequencer to wrap around at the end of conversions set by MAX_CONVn //AdcRegs.ADCTRL1.bit.SEQ_CASC = 1; // Cascaded mode. SEQ1 and SEQ2 operate as a single 16-state sequencer (SEQ). //AdcRegs.ADCTRL1.bit.CPS = 0; // 0:ADCCLK = Fclk/1; 1:ADCCLK = Fclk/2; Fclk = Prescaled HISPCLK; NOTE: HISPCLK = SYSCLKOUT/2, //AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = 1; // Setting this bit allows the cascaded sequencer to be started by an ePWM SOCB signal //AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1; // Immediately reset sequencer to state CONV00 //AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1; // Interrupt request by INT_SEQ1 is enabled. //AdcRegs.ADCTRL3.bit.ADCCLKPS = 0x3; // Core clock divider, HISPCLK = SYSCLKOUT/2, 75M/6 = 12.5Mhz, 12.5M/(0+1) = 12.5Mhz, //AdcRegs.ADCTRL3.bit.SMODE_SEL = 1; // 0/1,Sequential/Simultaneous sampling mode is selected //AdcRegs.ADCMAXCONV.all = 0; //AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0; // ADC Input Channel Selected InitAdc(); AdcRegs.ADCTRL3.bit.SMODE_SEL = 1; // 0/1,Sequential/Simultaneous sampling mode is selected AdcRegs.ADCTRL1.bit.SEQ_CASC = 1; // 0/1,separate mode/ Cascaded mode. SEQ1 and SEQ2 operate as a single 16-state sequencer (SEQ). AdcRegs.ADCMAXCONV.all = 0x07; // 8 double conv's (4 total),The sequence naturally wraps around at the end of the MAX_CONVn setting. AdcRegs.ADCREFSEL.bit.REF_SEL = 0x0; // 00,Internal reference selected (default) AdcRegs.ADCTRL1.bit.ACQ_PS = 0x1; // This bit field controls the width of SOC pulse,0x0F AdcRegs.ADCTRL1.bit.CONT_RUN = 1; // 0/1:Start-stop mode/Continuous conversion mode AdcRegs.ADCTRL1.bit.SEQ_OVRD = 0; // Sequencer override Disabled,Allows the sequencer to wrap around at the end of conversions set by MAX_CONVn AdcRegs.ADCTRL1.bit.CPS = 0; // 0:ADCCLK = Fclk/1; 1:ADCCLK = Fclk/2; Fclk = Prescaled HISPCLK; NOTE: HISPCLK = SYSCLKOUT/2, //AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = 0; // Setting this bit allows the cascaded sequencer to be started by an ePWM SOCA signal AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1; // Immediately reset sequencer to state CONV00 AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1; // Interrupt request by INT_SEQ1 is enabled to trigger DMA transfer, no need to implement SEQ1 ISA AdcRegs.ADCTRL3.bit.ADCCLKPS = 0x2; // Core clock divider, HISPCLK = SYSCLKOUT/2, 75M/6 = 12.5Mhz, 12.5M/(0+1) = 12.5Mhz // ACQ_PS = 0x01, ADCCLKPS = 0x0 can not convert analog correctly // ACQ_PS = 0x01, ADCCLKPS = 0x1 615k samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x2 590K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x3 390K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x4 290K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x5 232K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x6 194K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x7 164K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x8 143K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0x9 130K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0xA 114K samples /second // ACQ_PS = 0x01, ADCCLKPS = 0xB 104K samples /second // ACQ_PS = 0xF, ADCCLKPS = 0x3 15K samples /second AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x0; // ADC Input Channel Selected,ADCINA0/ADCINB0 AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 0x1; // ADC Input Channel Selected,ADCINA1/ADCINB1 AdcRegs.ADCCHSELSEQ1.bit.CONV02 = 0x0; // ADC Input Channel Selected,ADCINA0/ADCINB0 AdcRegs.ADCCHSELSEQ1.bit.CONV03 = 0x1; // ADC Input Channel Selected,ADCINA1/ADCINB1 AdcRegs.ADCCHSELSEQ2.bit.CONV04 = 0x0; // ADC Input Channel Selected,ADCINA0/ADCINB0 AdcRegs.ADCCHSELSEQ2.bit.CONV05 = 0x1; // ADC Input Channel Selected,ADCINA1/ADCINB1 AdcRegs.ADCCHSELSEQ2.bit.CONV06 = 0x0; // ADC Input Channel Selected,ADCINA0/ADCINB0 AdcRegs.ADCCHSELSEQ2.bit.CONV07 = 0x1; // ADC Input Channel Selected,ADCINA1/ADCINB1 ] 希望对你有帮助 |
|
|
|
|
|
谢璐晨123 发表于 2018-10-4 16:12 您好,很高兴收到您的回复,我有时间来验证一下哈。还有我想问一下您,您是不是拿600k乘以4得到2.4M的采样率哈,那如果我只采集一个通道,可不可以达到2.4M采样率呢?希望您百忙之中能回复我一下,谢谢您。 |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
513 浏览 1 评论
386 浏览 1 评论
583 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
830 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
688 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
128浏览 29评论
699浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
294浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
243浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
100浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-11 07:34 , Processed in 1.249613 second(s), Total 82, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号