Cut the code to something we can work with please. So, just the essential code that you think will show the issue. I am currently confused - lots of stuff commented out including the interrupt.
This will help us help you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just a quick look, but it seems like your ' On Interrupt UsartRX1Ready Call readUSART is commented out, so it won't cause an interrupt. Aslo I don't think you need the
if pir1.5 Then
end if
You don't need to check the RCIF in this subroutine because it was called by the On Interrupt already.
As usual, I could be wrong, but...
Let us know...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried the On Interrupt with the "If pir1.5 then.. Commented.
tried Sub Interrupt with the "If pir.5 then..
Added the line ansel = 0 to disaable ADCs
changed the RX pin to default pin RA1
nothing work.
ill just set aside this chip and use an old and tested PIC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please help! tried on interrupt ans sub interrupt, but both not working..what is missing on my code?
Yes, what are you trying to achieve?
Are you wanting timer event interrupt?
Are you wanting a USART event interrupt?
The https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/tree/master/Vendor%20Boards/Great%20Cow%20Basic%20Demo%20Board/16f18326%20ChipRange%20Demonstrations are the demons for the 18326 part - same part family and the interrupt examples will work for you.
my timer 0 is working fter some debugging, harware TX also OK, but RX is the problem.
Thanks,
I am looking at the code.
Cut the code to something we can work with please. So, just the essential code that you think will show the issue. I am currently confused - lots of stuff commented out including the interrupt.
This will help us help you.
The problem is the RX interrupt doesn't triggerrs.
Have you looked at the Help?
https://github.com/Anobium/Great-Cow-BASIC-Help/blob/master/source/serialrs232bufferring.adoc
Ok ill try those sample program.
Thanks you.
Just a quick look, but it seems like your ' On Interrupt UsartRX1Ready Call readUSART is commented out, so it won't cause an interrupt. Aslo I don't think you need the
if pir1.5 Then
end if
You don't need to check the RCIF in this subroutine because it was called by the On Interrupt already.
As usual, I could be wrong, but...
Let us know...
I tried the On Interrupt with the "If pir1.5 then.. Commented.
tried Sub Interrupt with the "If pir.5 then..
Added the line ansel = 0 to disaable ADCs
changed the RX pin to default pin RA1
nothing work.
ill just set aside this chip and use an old and tested PIC.
The code in the Help) - did that work? We should ensure the serial RX is working first - which was the issue you started with.
Also try changing the name of the RX subroutine from "Interrupt" to "readUSART".
maybe???