Cypress技术论坛
直播中

张丽华

7年用户 168经验值
私信 关注
[问答]

CY8CKIT-046上的LED不闪烁

尝试在CY8CKIT-046上闪烁的LED程序。代码:
(;)
{
PixRead编写(!PixRead读取());
CyDelay(500);
}
我把硬件引脚设置为P0〔3〕。程序员显示“设备”。成功编程,但没有LED闪烁。
我应该设置一个不同的端口/引脚为-046工具包的车载LED?

以上来自于百度翻译


     以下为原文
  Trying the blinking LED program on the CY8CKIT-046.  The code:

    for(;;)
    {
        Pin_Red_Write( ! Pin_Red_Read() );
        CyDelay(500);
    }

I set the hardware pin to P0[3].  The programmer displays 'Device .... was successfully programmed' yet no LED is blinking.

Should I be setting a different port/pin for the -046 kit's onboard LED?

回帖(2)

李木木

2018-9-30 14:59:59
你好,
CY8CKIT-046有板上的RGB LED,您的代码似乎没有问题,但您的PIN分配是错误的。
在CY8CKIT-046套件中,RGB LED与P5.2(R)、P5.3(G)和P5.4(B)连接。您还可以在工具包指南页55中找到示意图。
请更改引脚分配和重新测试。
谢谢,
布兰登

以上来自于百度翻译


     以下为原文
  Hi,
 
CY8CKIT-046 has onboard RGB LED and your code seems no problem, but your pin assignment is wrong.
In CY8CKIT-046 kit, RGB LED is connected with P5.2(R), P5.3(G) and P5.4(B). You can also find the schematic in kit guide page 55.
 
Please change the pin assignment and re-test.
 
Thanks,
Brandon
举报

张丽华

2018-9-30 15:10:35
引用: sdfjaslkdjf1 发表于 2018-9-30 14:51
你好,
CY8CKIT-046有板上的RGB LED,您的代码似乎没有问题,但您的PIN分配是错误的。
在CY8CKIT-046套件中,RGB LED与P5.2(R)、P5.3(G)和P5.4(B)连接。您还可以在工具包指南页55中找到示意图。

谢谢你,布兰登!这使我陷入了困境。

以上来自于百度翻译


     以下为原文
  Thank you, Brandon!  That had me stuck - all good now.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分