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 me - what is the library of keilC support functions

Status
Not open for further replies.

chanh018

Newbie level 4
Joined
Apr 19, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,327
help me about KeilC!

hello everybody!
i'm a new member. i have a proplem and i need your assistance. i program by KeilC for 8051. But i don't know what the library of keilC support funtions. For examble, in the stdio.h support "puts" funtion but don't support "putchar".i'm hurry.thanks for your assistance.
 

Re: help me about KeilC!

ok. But i don't agree with you. because it doesn't explain my proplem. but thanks for assistance. please help me, everyone!
 

Re: help me about KeilC!

First you clearly mention what your problem is..
which library of keil you are talking of...?
You should put some effort from your side..
 

help me about KeilC!

better u devop the putchar function.

void InitSerial(void)
{
ET1 = 0; /* TIMER1 INT DISABLE */
TMOD = 0x20;
PCON |= 0x80;

TH1 = 0xFD; /* X2 57600(SMOD=1) at 16 MHZ */

TR1 = 1; /* START THE TIMER1 */
SCON = 0x52; /* SERIAL MODE 1, REN=1, TI=1, RI=0 */

/* Interrupt */
ES = 0; /* Serial interrupt disable */
RI = 0;
TI = 0;
while(TI && RI);
}

/*###############################################################################
Function Implementation Part
/*
Description : Output 1 character through Serial Port
Argument : byData - character to output(INPUT)
Return Value :
Note :
###############################################################################
*/

void PutByte(UCHAR byData)
{
// Write data into serial-buffer.
SBUF = byData;
// Wait till data recording is finished.
while(!TI);
TI = 0;
}
/*###############################################################################
/*
Description : Output to Serial.
Argument : Str - Character Stream to output (INPUT)
Return Value :
###############################################################################
*/
void PutString(char *Str) reentrant
{
UINT i;
for (i = 0; Str != '\0'; i++) PutByte(Str);

}

/*###############################################################################
/*
Description : Output to Serial and then specific character,'Carrage Return & New Line'.
Argument : Str - Character Stream to output(INPUT)
Return Value :
###############################################################################
*/
void PutStringLn(char * Str) reentrant
{
PutString(Str);
PutByte(0x0a);
PutByte(0x0d);
}

/*###############################################################################
/*
Description : Read 1 character from Serial.
Argument :
Return Value : Read 1 character from Serial and Return.
Note :
###############################################################################
*/
unsigned char GetByte(void)
{
unsigned char byData;
// Wait till data is received.
while( !RI );
RI = 0;
// Read data.
byData = SBUF;
return byData;
}
 

Re: help me about KeilC!

putchar function is there in stdio.h in keil
its there in my keil
which version you are using
 

Re: help me about KeilC!

You can search for the folder INC.

**broken link removed**

That's all you need for your job.

Good luck!
 

help me about KeilC!

ok. thanks a lot for everyone. i understand my proplem.
good luck to all!
 

Re: help me about KeilC!

chanh018 said:
i understand my proplem.
good luck to all!
Has very little to do with "luck" but everything to do with studying. You were really lucky that you found such nice guys here in the forum.
Bob
 

Re: help me about KeilC!

i m new user of keil software &
i want to know how to run files with .asm extensions .
so sir please give me reply as soon as possible.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top