Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F877A serial port - virtual terminal problem

Status
Not open for further replies.

lignin

Junior Member level 2
Joined
Apr 27, 2013
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,436
I am learning rs232 serial communication and ı write code and ı simulate this code in proteus but not work. here is my code :
Code:
#include<pic.h>
#include<htc.h>
#include<PIC16F877A.h>

#define _XTAL_FREQ 4000000;

void init()
{
	BRGH=1;
	SPBRG=25;
	SYNC=0;
	SPEN=1;
	TXEN=1;
}

void characterarraywrite(char character[])
{
	int i=0;
	while(i<100)
	{
		if(character[i]!=0)
		{
			TXREG=character[i];
			_delay(100000);
			i++;
			continue;
		}
		break;
	}

}


void main()
{
	init();
	char array[] = "ahadir";
	characterarraywrite(array);
	while(1);
}

here is my proteus virtual terminal outcome :
Adsız.png

so why I cant see the "ahadir" in virtual terminal ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top