hemanth919
Newbie level 3
PIC 18f1452 USART
hi i'm doing a project using pic 18f452..i need to interface it to pc for serial communiction with 9600 baud rate...i'm trying to dispaly a character on hyper terminal but i'm not able to see a character on hyper terminal.can any1 pls help me
i here by attaching my c code...i'm using Mplab IDE n microchip C18 compiler....
#include <p18f4620.h>
#include <usart.h>
void main (void)
{
// Open the USART configured as 8N1, 9600 baud
OpenUSART ( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_LOW,17);
// write to the USART
WriteUSART('a');
CloseUSART();
while (1)
;
}
Thank you
hi i'm doing a project using pic 18f452..i need to interface it to pc for serial communiction with 9600 baud rate...i'm trying to dispaly a character on hyper terminal but i'm not able to see a character on hyper terminal.can any1 pls help me
i here by attaching my c code...i'm using Mplab IDE n microchip C18 compiler....
#include <p18f4620.h>
#include <usart.h>
void main (void)
{
// Open the USART configured as 8N1, 9600 baud
OpenUSART ( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_LOW,17);
// write to the USART
WriteUSART('a');
CloseUSART();
while (1)
;
}
Thank you