12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

  1. #33
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Problem:

    I'm using SLEEP uncalibrated to put the PIC to SLEEP until an IOC occurs earlier on in the program. I'm also using SLEEP 1800 to put the PIC to sleep and test that it's still dark before transmitting the VISITS data. I'm getting an error when I compile the program though (see attachment). I've turned the _WDT_ON but still this error. Any ideas? Is using SLEEP an SLEEP Period in the same program uncompatable?

    Code:
    DARK:
         E_OUT=0           ' Disable transmitter
         INTCON.0 = 0      ' Clear int on change flag
         @ SLEEP 1800      ' It could be night time...It might only be a cloud though...   
                           ' so back to sleep for half an hour..zzzz
         @ NOP             ' Do nothing for 1st instruction on wake-up
                  
        if  GPIO.4= 0  then ENCODE  ' It really ia dark so carry on and transmit VISITS
        
        IF  GPIO.4= 1  THEN RETURN  ' It's not dark after all so carry_on_counting
    Forgot to add, if I comment out the line:

    Code:
     @ SLEEP 1800      ' It could be night time...It might only be a cloud though...
    the program compiles

    Dave
    Attached Images Attached Images  
    Last edited by LEDave; - 12th December 2010 at 01:33.

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