SAMPLE TRANSMISSION PROGRAM FOR PIC16F877A
# include<pic.h>
#define _XTAL_FREQ 4000000
__CONFIG(WDTDIS & XT & UNPROTECT);
void main()
{
TXSTA=0X24;
RCSTA=0X90;
SPBRG=0X19;
TRISC=0X80;
while(1)
{
TXREG='k';
while(TXIF==0);
TXIF=0;
}
}
This is a sample program for transmitting character 'k' continuously.
# include<pic.h>
#define _XTAL_FREQ 4000000
__CONFIG(WDTDIS & XT & UNPROTECT);
void main()
{
TXSTA=0X24;
RCSTA=0X90;
SPBRG=0X19;
TRISC=0X80;
while(1)
{
TXREG='k';
while(TXIF==0);
TXIF=0;
}
}
This is a sample program for transmitting character 'k' continuously.
No comments:
Post a Comment