blinker


Results 1 to 7 of 7

Thread: blinker

Threaded View

  1. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by nlirette View Post
    what i would like to do is put the PIC to sleep in
    the for next area of the program
    when i replace the "pause 2000" to "sleep 10" it does not work
    i want to save battery drain using the low power feature (sleep) of the chip
    any reason why the sleep doesn't work?
    Norman
    Hi Norman,
    Welcome to this forum !
    Does the circuit work using the For next loop ? What happens when you tell it to sleep ? Does it sleep and fail to awaken, or just never sleeps?
    Code:
    define osc 20 ' makes the internal oscillator 2 MHZ ( default 4 MGH )
    20 ? for 2 ? Also You should get the habit of using all UPPERCASE for defines, a requirement for MPASM.
    I am not a SLEEP expert, I have seen it done this way:
    Code:
    @  sleep
    and it worked, and would not without the " @ " perhaps someone else can explain to us both as to why.
    Edit
    Code:
    PORTB.0 = 1 ' pin 7
    PORTB.1 = 1 ' pin 6
    PORTB.5 = 1 ' pin 2
    PORTB.4 = 1 ' pin 3
    12F683 does not have a PortB it uses GPIO . Are you doing this in a simulator?
    Last edited by Archangel; - 26th July 2009 at 07:34.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25

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