- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include "project.h"
#include <string.h>
char datorecibido;
CY_ISR(InterrupRX)
{
datorecibido=UART_1_GetChar();
}
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
UART_1_Start();
isrRX_StartEx(InterrupRX);
for(;;)
{
if (datorecibido=='1')
{
LED_Write(1);
UART_1_PutString("LED encendido \n");
CyDelay(500);
}
if (datorecibido=='0')
{
LED_Write(0);
UART_1_PutString("LED apagado \n");
CyDelay(500);
}
}
}
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ernesto-69,
use example below as example of receiving command string with value from terminal into circular buffer
UART string reception garbage value
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ernesto-69,
use example below as example of receiving command string with value from terminal into circular buffer
UART string reception garbage value
/odissey1