PIC16F684 Program question


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default Quick glance

    At first glance (and it was a quick one), shouldn't the interrupt subroutines be at the beginning of the program, at the top, in Bank 0 if possible?

    And...right here...

    if reedswitchstate then
    gosub lowvoltagecheck
    else
    pause 1000 ;Wait for a second to make sure the switch
    high holdtxon ;is not being held HIGH
    ----------------------<<<<<<<<<<
    high reedswitchstate
    ----------------------<<<<<<<<<<
    gosub Lowvoltagecheck
    endif

    You're manually holding reedswitchstate (an input pin) with a command for an output pin. Did you actually mean to do something else here? It just doesn't look right to me.

  2. #2
    Join Date
    Dec 2006
    Posts
    9


    Did you find this post helpful? Yes | No

    Post PIC16F684 Program Question

    The program was copied and pasted twice and thats why the interrupt routine is at the bottom. The interrupt program: ASM to ENDASM is right below the "GOTO Main" title in the real program.
    I was trying to manually change the pin to HIGH to check the logic of the code so that part is not in the actual program. Thanks for looking into this for me. Am going to be working on it some more today and I'll post any progress I make.

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  3. Compile and Program help using PICKit2
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 14:51
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts