?
Solved

Programming QUART SC28C94

Posted on 2003-11-11
6
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

771 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