6206|1

5310

帖子

453

TA的资源

五彩晶圆(高级)

楼主
 

【玩转C2000 Launchpad】 四 TMS320F2802x外设指南 [复制链接]

学习了解 TMS320F2802x 少不了的数据手册
http://www.ti.com/lit/ds/sprs523i/sprs523i.pdf
PDF里面的结构框图有助理解

CPU User's Guides
SPRU430 TMS320C28x CPU and Instruction Set Reference Guide

Peripheral Guides
1.SPRUFN3 TMS320x2802x/TMS320F2802xx Piccolo System Control and Interrupts Reference Guide
http://www.ti.com/lit/ug/sprufn3c/sprufn3c.pdf

2.SPRU566 TMS320x28xx, 28xxx DSP Peripheral Reference Guide
http://www.ti.com/lit/ug/spru566j/spru566j.pdf

3.SPRUFN6 TMS320x2802x Piccolo Boot ROM Reference Guide
http://www.ti.com/lit/ug/sprufn6a/sprufn6a.pdf

4.SPRUGE5 TMS320x2802x, 2803x Piccolo Analog-to-Digital Converter (ADC) and Comparator Reference Guide
http://www.ti.com/lit/ug/spruge5f/spruge5f.pdf

5.SPRUGE9 TMS320x2802x, 2803x Piccolo Enhanced Pulse Width Modulator (ePWM) Module Reference Guide
http://www.ti.com/lit/ug/spruge9e/spruge9e.pdf

6.SPRUGE8 TMS320x2802x, 2803x Piccolo High-Resolution Pulse Width Modulator (HRPWM)
http://www.ti.com/lit/ug/spruge8e/spruge8e.pdf

7.SPRUGH1 TMS320x2802x, 2803x Piccolo Serial Communications Interface (SCI) Reference Guide
http://www.ti.com/lit/ug/sprugh1c/sprugh1c.pdf

8.SPRUFZ8 TMS320x2802x, 2803x Piccolo Enhanced Capture (eCAP) Module Reference Guide
http://www.ti.com/lit/ug/sprufz8a/sprufz8a.pdf

9.SPRUG71 TMS320x2802x, 2803x Piccolo Serial Peripheral Interface (SPI) Reference Guide
http://www.ti.com/lit/ug/sprug71b/sprug71b.pdf

10.SPRUFZ9 TMS320x2802x, 2803x Piccolo Inter-Integrated Circuit (I2C) Reference Guide
http://www.ti.com/lit/ug/sprufz9d/sprufz9d.pdf

[ 本帖最后由 蓝雨夜 于 2013-1-4 14:38 编辑 ]

最新回复

请教一个TSM320F28027比较器的问题,代码如下,测试时通过电位器调整comp1A,COMP1B的输出输入电压,COMP1OUT输出没变化,GPIO38也没有变化,请问程序中哪里有问题啊? void Comp1Test(void) {         EALLOW;         GpioCtrlRegs.GPBPUD.bit.GPIO38 = 0; //enable the internal pullup         GpioCtrlRegs.GPBMUX1.bit.GPIO38 = 0; //I/O         GpioCtrlRegs.GPBDIR.bit.GPIO38 = 1; //output         GpioCtrlRegs.GPAPUD.bit.GPIO1 = 1;            // Disable pull-up for GPIO1 (CMP1OUT)         GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 3;           // Configure GPIO1 for CMP1OUT operation         GpioCtrlRegs.GPADIR.bit.GPIO1 = 1;                 //output         GpioCtrlRegs.AIOMUX1.bit.AIO2 = 3;    //AIO2 disabled --- COMP1A         GpioCtrlRegs.AIOMUX1.bit.AIO10 = 3;   //AIO10 disabled --- COMP1B         SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 1;         SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 1;         SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;//the ADC module is clocked         AdcRegs.ADCCTL1.bit.ADCPWDN = 1;         //The analog circuitry inside the core is powered up         AdcRegs.ADCCTL1.bit.ADCBGPWD = 1;         //Bandgap buffer's curcuitry inside core is powered up         Comp1Regs.COMPCTL.bit.COMPDACEN  = 1; //comparator/DAC logic is powered up         Comp1Regs.COMPCTL.bit.COMPSOURCE = 1; //inverting input connected to exteranl pin         Comp1Regs.COMPCTL.bit.SYNCSEL = 0;   //asynchronous         Comp1Regs.COMPCTL.bit.QUALSEL = 0;         //Synchronized value of comparator is passed through         Comp1Regs.COMPCTL.bit.CMPINV = 1;         //Output of comparator is passed         EDIS;         for(;;)         {                 if(Comp1Regs.COMPSTS.bit.COMPSTS==1)                 {                         GpioDataRegs.GPBDAT.bit.GPIO38 = 1;                 }                 else                 {                         GpioDataRegs.GPBDAT.bit.GPIO38 = 0;                 }         } }  详情 回复 发表于 2014-11-27 08:55
 
点赞 关注

回复
举报

18

帖子

1

TA的资源

一粒金砂(中级)

沙发
 
请教一个TSM320F28027比较器的问题,代码如下,测试时通过电位器调整comp1A,COMP1B的输出输入电压,COMP1OUT输出没变化,GPIO38也没有变化,请问程序中哪里有问题啊?
void Comp1Test(void)
{
        EALLOW;

        GpioCtrlRegs.GPBPUD.bit.GPIO38 = 0; //enable the internal pullup
        GpioCtrlRegs.GPBMUX1.bit.GPIO38 = 0; //I/O
        GpioCtrlRegs.GPBDIR.bit.GPIO38 = 1; //output


        GpioCtrlRegs.GPAPUD.bit.GPIO1 = 1;            // Disable pull-up for GPIO1 (CMP1OUT)
        GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 3;           // Configure GPIO1 for CMP1OUT operation
        GpioCtrlRegs.GPADIR.bit.GPIO1 = 1;                 //output

        GpioCtrlRegs.AIOMUX1.bit.AIO2 = 3;    //AIO2 disabled --- COMP1A
        GpioCtrlRegs.AIOMUX1.bit.AIO10 = 3;   //AIO10 disabled --- COMP1B

        SysCtrlRegs.PCLKCR3.bit.COMP1ENCLK = 1;
        SysCtrlRegs.PCLKCR3.bit.COMP2ENCLK = 1;
        SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;//the ADC module is clocked

        AdcRegs.ADCCTL1.bit.ADCPWDN = 1;         //The analog circuitry inside the core is powered up
        AdcRegs.ADCCTL1.bit.ADCBGPWD = 1;         //Bandgap buffer's curcuitry inside core is powered up

        Comp1Regs.COMPCTL.bit.COMPDACEN  = 1; //comparator/DAC logic is powered up
        Comp1Regs.COMPCTL.bit.COMPSOURCE = 1; //inverting input connected to exteranl pin
        Comp1Regs.COMPCTL.bit.SYNCSEL = 0;   //asynchronous
        Comp1Regs.COMPCTL.bit.QUALSEL = 0;         //Synchronized value of comparator is passed through
        Comp1Regs.COMPCTL.bit.CMPINV = 1;         //Output of comparator is passed

        EDIS;

        for(;;)
        {
                if(Comp1Regs.COMPSTS.bit.COMPSTS==1)
                {
                        GpioDataRegs.GPBDAT.bit.GPIO38 = 1;
                }
                else
                {
                        GpioDataRegs.GPBDAT.bit.GPIO38 = 0;
                }
        }
}
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/9 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表