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.

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
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top