I have a pretty weird error trying to do a sample RS-232 transmision. This is the code that's hardly going to be bad as it's pretty short:
# include <p18F4620.h>
# include <usart.h>
#pragma config XINST=OFF
#pragma config OSC=XT
void main ()
{
TRISC = 0x00;
OpenUSART (USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE &
USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_LOW, 129);
while (1)
{
putrsUSART ("hola");
}
}
It should be showing on the hyperterminal window "holaholaholahola" and this way all the time, but instead it shows strange simbols like the ones shown in the screenshot:
Any idea of what can be happening? The error is so strange that I do not even know what to start checking
.
Thanks.
# include <p18F4620.h>
# include <usart.h>
#pragma config XINST=OFF
#pragma config OSC=XT
void main ()
{
TRISC = 0x00;
OpenUSART (USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE &
USART_EIGHT_BIT & USART_CONT_RX & USART_BRGH_LOW, 129);
while (1)
{
putrsUSART ("hola");
}
}
It should be showing on the hyperterminal window "holaholaholahola" and this way all the time, but instead it shows strange simbols like the ones shown in the screenshot:
Any idea of what can be happening? The error is so strange that I do not even know what to start checking
Thanks.