- #1
Alex_Sanders
- 73
- 0
Very simple MCU program,the purpose would be sending strings to the computer, but no footnotes, so I have to guess the intention:
void SendStr(unsigned char *s)
{
while(*s!='\0')
{
SendByte(*s);
s++;
}
}
/*Question No.1: How does SendByte interact with SendStr?
Here is the SendByte func:*/
void SendByte(unsigned char dat)
{
SBUF = dat; /* Question No.2: No idea what this does*/
while(!TI); /* Question No.3: No idea what this does*/
TI = 0; /* Question No.4: No idea what this does*/
}
Any help would be appreciated, thanks in advance!
void SendStr(unsigned char *s)
{
while(*s!='\0')
{
SendByte(*s);
s++;
}
}
/*Question No.1: How does SendByte interact with SendStr?
Here is the SendByte func:*/
void SendByte(unsigned char dat)
{
SBUF = dat; /* Question No.2: No idea what this does*/
while(!TI); /* Question No.3: No idea what this does*/
TI = 0; /* Question No.4: No idea what this does*/
}
Any help would be appreciated, thanks in advance!
Last edited: