Menu

Interrupts on the 16F84

Help
2008-11-13
2013-05-30
  • Nobody/Anonymous

    Has anyone succeeded in using this chip , in particular the Timer overflow interrupt using GCbasic.
    Ive had success with the later chips , but the assembler complains everytime about a missing
    variable called PEIE which the 16F84 doesnt have , and its not in the chips include file.
    I cant figure out where or why the Compiler is getting this variable name from or even why its needed.
    These are the lines of code that are involved.

    InitTimer0 Osc, PS0_0/256 
    StartTimer 0 
    On Interrupt Timer0Overflow Call IncCounter 

    Its the 3rd one , the On interrupt line that generates the need for the PEIE variable
    which the chip just doesnt have or need.

    Srry Im anonymous at the moment as Im new and havent as yet figured out how to register.
    thanks
    Mauried

     
    • Nobody/Anonymous

      The PEIE bit is used on other chips.  You're right its not in the 16F84.  You will probably have to manually edit the assembly to get it to work.  The interrrupt code is tricky and not fully developed yet.  See the other comments about on interrupt, as you may need to look at using a shared register in the context save and setting the bank to 0.  Or you could always pick a newer chip.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.