You are on page 1of 1

#include <pic.

h>
#include <stdio.h>
void config(void);
void setup(void);
void main(void)
{
config();
setup();
do
{
start();
}while(1);
}
void config(void)
{
STATUS |= 0x20;
TRISC6 = 0;
TRISC7 = 1;
STATUS &= 0xdf;
}
void setup(void)
{
BRGH = 1;
SPBRG = 25;
SYNC = 0;
SPEN = 1;
CREN = 1;
SREN = 0;
TXIE = 0;
RCIE = 0;
TX9 = 0;
RX9 = 0;
TXEN = 1;
}
void start(void)
{
printf("How are you?");
}

/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*

high baud rate */


set the baud rate */
asynchronous */
enable serial port pins */
enable reception */
no effect */
disable tx interrupts */
disable rx interrupts */
8- or 9-bit transmission */
8- or 9-bit reception */
enable the transmitter */

You might also like