wake up from sleep


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default wake up from sleep

    I use pic16f628a with the code below.This code works.
    I want to change the code , so the pic after 10 seconds to wake up for .1 sec and after go again to sleep

    Code:
        TRISB = %11110000
        TRISA = %00000000   
        CMCON = 7    
        OPTION_REG.7=0      ' 0 = Enable PORTB Pull Ups
        @ Device wdt_off    ' Disable the WatchDog Timer             
        INTCON.3=1          ' Interrupt Control Register  
        PORTB = 0
        PORTA = 0
    
    loop:
                
        PORTA.0 = 1         ' Turn LED On for 1 second
        pause 1000
        PORTA.0 = 0  
        INTCON.0=0                        
        @ SLEEP       
        INTCON.0=0
    
        goto loop
    Last edited by savnik; - 29th August 2007 at 20:25.

Similar Threads

  1. 16F181: can't wake up from sleep
    By Navaidstech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th January 2010, 04:33
  2. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  3. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  4. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06
  5. 18F2320 and sleep function
    By Brian in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th March 2005, 13:11

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