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.

help about using string in keil C

Status
Not open for further replies.

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
232
Helped
25
Reputation
48
Reaction score
4
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,765
hello!
I use Keil C to code my Project which Dislay on LCD with AT89s52 !
Help me about How I use "string" in keil C. And which functions about String in Keil C I can use! I which libs I should declare to use that functions.

Can anybody send to me some example Code using Function to duel with String
thank for attension my topic
 

Take a look at the user's guide "c51.chm" in the HLP directory. All available functions are explained and you'll also find examples there.
 

Just Include String.h in your file and assign the
SCON = 0x52,

printf(" ur string");

this will help to send the string to serial port.
 

just play around with the SFRs, just as the Spec says...
Code:
#define Bauds 9600
#define Crystal 11059200

void Serial_Init()
{
	SCON=0x50;	//
UART:1 variable baudrate ,RX enable,
	TMOD=0x20;	//Timer 1: mode 2, autoreload
	PCON=0x80;	//SMOD = 1...
	TH1=256-(Crystal/(12*16))/Bauds;
	TL1=TH1;
	TR1=1;		//Timer ON,
	TI=1;	//TX enable...
	
}
call this Serial_Init(); at the beginnig and be nice...
 

I see, thank for your helping! In your Way I must output mydata thruogh SIPO IC (such as 74LS164) to communicate with my LCD .but my I want to output my data through parallel port directly (such as port0)!
And how can I use! And Which function about string on keil C I can use! may I use the Function of String like in ANSI C or not????( such as strcoll · strcpy · strcspn · strerror · strlen · strncat · strncmp · strncpy · strpbrk · strpbrk · strpbrk · strrchr · strrchr · strrchr · strspn · strstr · strstr · strstr · strtok · strxfrm .....)
thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top