Interrupt Handling

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Sean Banan
Posts: 20
Joined: Wed Jan 22, 2014 9:48 pm

Interrupt Handling

Post by Sean Banan » Tue Feb 04, 2014 8:26 pm

Hello,
I have been using Timer interrupts in PBP3 for ages without any problems.
Right now I'm struggling with Swordfish. I can only go by the information given in the Help menu but there is a problem.

"Help" gives a nice long (appreciated) example of the code you should write, but I get a compile error.
Any help would really be useful.

Error:
Dim Timer1 as word(TMR1L)

Compiler: Error "," expected.

Now my project is hanging. Soon I will be hanging.
Help please. Am I missing something ?

(I am using the PIC18F4550)

bitfogav
Registered User
Registered User
Posts: 169
Joined: Sat Oct 09, 2010 1:39 pm
Location: United Kingdom

Re: Interrupt Handling

Post by bitfogav » Tue Feb 04, 2014 9:09 pm

You need to change the code to something like.

Code: Select all

Dim Timer1 as TMR1L.AsWord
Check out Alias and Modifiers in the help file.


I hope this helps.

Sean Banan
Posts: 20
Joined: Wed Jan 22, 2014 9:48 pm

Re: Interrupt Handling

Post by Sean Banan » Wed Feb 05, 2014 10:47 am

Thanks a million !!!!! It worked. I'm very grateful for your fast response.
:D

Post Reply