点我头像,有所发视频
接上一篇:【瑞萨FPB-RA6E1快速原型板】+机器人游戏主控项目(1)开源 - 瑞萨单片机william hill官网
- 电子技术william hill官网
- 广受欢迎的专业电子william hill官网
! https://bbs.elecfans.com/jishu_2359052_1_1.html
这一篇是:分步实验,搭建原型机。
源代码:
int v;
R_BSP_PinAccessEnable();
while(1) {
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_13 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(2, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_01_PIN_13 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(18, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_03_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_03_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(19, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_04_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_04_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(19, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_01_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(19, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_13 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(1, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_01_PIN_13 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(19, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_04_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(2, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_04_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(18, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_01_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(2, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_01_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(18, BSP_DELAY_UNITS_MILLISECONDS);
}
for ( v = 80; v > 40 ; v-- )
{
R_BSP_PinWrite(BSP_IO_PORT_03_PIN_02 , BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(2, BSP_DELAY_UNITS_MILLISECONDS);
R_BSP_PinWrite( BSP_IO_PORT_03_PIN_02 , BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(18, BSP_DELAY_UNITS_MILLISECONDS);
}
}
瑞萨开发板
|