Hi I0,If you provide a bit more detail:
What is the device that produces the hardware interrupts?
What are the other devices from which you need to read?
Part numbers etc.
the someone might work out a solution.
but it doesn’t have an interrupt output???Hi I0,
As this type of thing crops up occasionally, I hoped to keep it none specific.
One example, that I'm working on uses a Ublox GPS module M9N.
I am trying to get it to talk using SPI, and after long threads like this, so far have failed, but I think it should work if I get it right.
The alternative is to READ it using the UART HW INTERRUPT.
The M9N outputs 'say' 5/sec to the UART.
This would run alongside 4ish SPI peripherals, and the MAIN CODE.
P.S The Ublox D/Ss are pretty long!
C
Hi I0,but it doesn’t have an interrupt output???
How?Hi I0,
No it doesn't, but it causes a HW INTERRUPT in the PIC 5/sec.
C.
Hi I0,How?
it doesn’t have an interrupt.
Yes. it mentions the UART interrupt.Hi I0,
Did you look at the attachment in the last post?
C
Hi I0,Yes. it mentions the UART interrupt.
It won’t generate a UART interrupt if you connect it to the SPI, now will it?
I’m not seeing what the problem is.Hi I0,
No, it would be a different routine.
RCREG would be copied to the SW BUFFER ARRAY in turn.
C
Hi I0,I’m not seeing what the problem is.
Just read the data from the GPS using the SPI interface whenever you want to know where you are.
Do you mean the UART interrupt? If so, then there is nothing preventing the SPI and UART operating at the same time. The next SPI data read will just be delayed until the UART interrupt service routine has been executed.Hi I0,
This is an example of a general question!
In this example can the PIC HW INTERRUPT work alongside a number of SW SPI routines, plus MAIN CODE?
Hi I0,Do you mean the UART interrupt? If so, then there is nothing preventing the SPI and UART operating at the same time. The next SPI data read will just be delayed until the UART interrupt service routine has been executed.
Hi I0,We would have got there sooner had you said you wanted to receive data from the UART! As recently as post #42 you said
“One example, that I'm working on uses a Ublox GPS module M9N.
I am trying to get it to talk using SPI”
by Jake Hertz
by Jake Hertz
by Don Wilcher