Solved

Programming QUART SC28C94

Posted on 2003-11-11
6
263 Views
Last Modified: 2011-08-18
I´d lik to know if someone can get me a C example code for programming the SC28C94 QUART.

I'm having some trouble in controlling the internal interrupt system for this UART, specially when I'm detecting the Tx and Rx interrupt.

My problem is that I can attend both interrupts, but after this the interrupt line wont disable and stays active even after I attend the Rx and the Tx interrupt, even though I can see (read the CIR register) that there are no interrupts to be attended to.

If someone can help me in this matter I'd be much obliged


Thank you.

My best regards.

Abel Cunha.
0
Comment
Question by:abelcunha
  • 2
  • 2
6 Comments
 
LVL 22

Expert Comment

by:grg99
ID: 9723332
What other chips are in this system?    

Quite often you have to send an interrupt acknowledge to the interrupt controller chip,
which then sends an interrupt clear signal to the UART.  Or in other architectures you directly clear to the UART.

0
 

Author Comment

by:abelcunha
ID: 9723617
The interrupt line of the QUART is directly connected to the IRQ5 input line of a PC104 board, via some hardware that I've developed to control RS232 equipment.

The QUART Datasheet indicates that we can substitute the assert of the IACKN line by the command UPDATECIR (outport(0x2A,0xValue)), and I'm doing this whenever I want to see wich of the ocurrences is responsable for the activation of the interrupt line.

I only run out of the Interrupt Service Routine after I can assure that no other interrupt needs to be attended (inport(ISR_address)=0x00).

Despite all this the IRQn line of the QUART remains at low state, wich means that it's still active and waiting to be attended.
0
 

Author Comment

by:abelcunha
ID: 9724519
The interrupt line of the QUART is directly connected to the IRQ5 input line of a PC104 board, via some hardware that I've developed to control RS232 equipment.

The QUART Datasheet indicates that we can substitute the assert of the IACKN line by the command UPDATECIR (outport(0x2A,0xValue)), and I'm doing this whenever I want to see wich of the ocurrences is responsable for the activation of the interrupt line.

I only run out of the Interrupt Service Routine after I can assure that no other interrupt needs to be attended (inport(ISR_address)=0x00).

Despite all this the IRQn line of the QUART remains at low state, wich means that it's still active and waiting to be attended.
0
 
LVL 22

Accepted Solution

by:
grg99 earned 125 total points
ID: 9725131
Time to get out the scope or logic analyzer I guess.  Check to make sure you're acking the interrupt, and at the right time, for the right duration.
On the other scope channel watch the interrupt request line to see if it goes low.

0
 
LVL 9

Expert Comment

by:tinchos
ID: 10248995
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: grg99 {http:#9725131}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now