I disagree with you Frank... your posted code above CANNOT look like your code that doesn't work...
Your Subroutine MUST be positioned correctly...
(1) It must be located AFTER an ON INTERRUPT statement and...
(2) It must be located AFTER an ENABLE statement
I have tested all four examples below to double-check...
Example 1. This will Not work...
Jump to Start
Subroutine
ISR (Interrupt Service Routine with Disable/Enable)
Start:
On Interrupt Statement
Enable Statement
Main Program Loop
Example 2. This will not work
Jump to Start
Subroutine (with Enable)
ISR (with Disable/Enable)
Start:
On Interrupt Statement
Enable Statement
Main Program Loop
Example 3. This WILL work
Jump to Start
ISR (with Disable/Enable)
Start:
On Intterrupt Statement
Enable Statement
Main Program Loop
Subroutine
Example 4. This WILL work
On Interrupt Statement
Enable Statement
Jump to Start
Subroutine
ISR (with Disable/Enable)
Start:
Main Program Loop
Basically, the physical location of the Subroutine within your code MUST be AFTER the ON Interrupt Statement (which comes first) and after an ENABLE Statement (which comes second). Do not place the subroutine BEFORE an On Interrupt/Enable... it doesn't compile correctly.
Melanie
btw... forgot to say... Don't give up Music class... *smiles*
Bookmarks