Problem in UART. (multi-threading)

Status
Not open for further replies.

Vishal Sharma

Newbie level 1
Joined
Jun 6, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,292
Hi,
my program involves execution of multi-threads.. In my main(), I've enabled RCIE
my interrupt() looks something like this

void interrupt()
{
/**********************************************
timer part
**********************************************/

if(RCIE_bit == 1 && UART_read() == 'K')
{
TXIE_bit = 1; //enabling transmit bit to transfer data
}

}

and in a function named read() which is called at the start in main(), I've used the following things

void read()
{
if(TXIE_bit == 1) {
while(i < 3) {
snd = EEPROM_read(0x00+i);
}
snd = '\0'
if(UART_data_ready() == 1) {
UART_write_text(snd);
}
}
}


I get an error saying "unresolved extern TFT" , PS : I'm not at all using TFT , so why am I getting this error??

And before that, is this a correct approach???
 

Hi Vishal
I think information that you have provided is insufficient to resolve your issue.
BTW looking at your code I see that you have not incremented 'i' anywhere in read() and hence you are reading same EEPROM location again and again.
As a part of advice, I see that you want to save your processor time as much as possible for your other operations. I will suggest you to use DMA if its available in your controller. Yet again I do not have any information about your controller as of now, so cannot help you much over it. But most of the recent controllers are coming up with these features. You can dig more over it.
 

You are using mikroC PRO 8051 Compiler. Maybe there is an issue with library. See if Checking TFT library in the library manager solves the problem. If not, then try reinstalling the Compiler. If you use mikroC library then there is no need for Serial interrupt code.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…