Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Trying to output a 'message' string with the uart, but I only get the first six bytes and then it goes silent.  I thought is may have been the TX buffer, so I increased it to 32 bytes, but that did not fix it.

   

 

   

Here is the UART setup:

   

clock - 3Mhz

   

Baud - 187.5k

   

parity - odd

   

tx buffer- 32bytes

   

rx buffer - 4 bytes

   

Full duplex

   

no interrupts

   

Here is the source code, it's not much:

   

#include <project.h>

   

#define Port3_1
#define Port3_2
char message[18]={"This is jgmDESIGNS"};

   

int main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
WaveDAC8_1_Start();
LCD_Char_1_Start();
LCD_Char_1_DisplayOn();
LCD_Char_1_PrintString("Hello World");
LCD_Char_1_Position(1,5);
LCD_Char_1_PrintString("Daniel!!");
UART_1_Start(); /* Enabling the UART */
UART_1_PutString(message);

   

/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;)
{
/* Set OutputPin state to the
inverse of the InputPin state */
Port3_2_Write( Port3_1_Read() );

}
}

   

 Also,

   

Is there a radio button to put source code in to keep indentation and formatting?

   

 

   

Thanks

   

Jim

0 Likes
11 Replies