- This topic has 1 reply, 2 voices, and was last updated 10 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › PIC › USART in Proteus 8 for PIC16f877a : NO OUTPUT
i am just not getting an output on virtual terminal in proteus !! Can someone help me ?
thank u in advance !
#include <htc.h>
#define XTAL_FREQ 16000000
#define TX_pin_dir TRISC6
__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_OFF & BOREN_OFF & LVP_OFF & CPD_OFF & WRT_OFF & CP_OFF);
char name[]=”HELLO WORLD”;
void port_inti()
{
TX_pin_dir= 0;
}
void serial_inti()
{
BRGH=1;
SPBRG=103;
TX9D=0;
SYNC=0;
TXEN=0;
TXEN=1;
SPEN=1;
}
void serialsendchar (unsigned char val)
{
while(!TXIF);
TXREG=val;
}
void main()
{
unsigned int i;
port_inti();
serial_inti();
while(1)
{
for(i=0;i<11;i++)
{
serialsendchar(name);
}
}
}
Hi Sandeep,
Try the project in real hardware and use hyperterminal or Putty.