PIC12F635 - Any advise?


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Smile

    Thanks for the reply. But I still want to know how I can place the transmitter's MCU to power-down mode and wake it up once a key (on port A)is pressed and put it to sleep again once it has sent out the command? Can someone help me with the code changes -thanks
    Last edited by financecatalyst; - 20th July 2009 at 21:06.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by financecatalyst View Post
    Thanks for the reply. But I still want to know how I can place the transmitter's MCU to power-down mode and wake it up once a key (on port A)is pressed and put it to sleep again once it has sent out the command? Can someone help me with the code changes -thanks
    Sleep
    interrupt wake up , interrupt on change
    Code:
    'intcon.0  'RAIF  PortA Interrupt Flag
    'intcon.1  'INTF  PORTA.2 INT Interrupt Flag
    'intcon.2  'T0IF  Timer 0 Interrupt Flag
    'intcon.3  'RAIE  PortA Interrupt Enable
    'intcon.4  'INTE  PortA.2 INT Interrupt Enable
    'intcon.5  'T0IE  Timer 0 Interrupt Enable
    'intcon.6  'PEIE  Peripheral  Interrupt Enable
    'intcon.7  'GIE   Global interrupt enable
    
    'enable Global interrupts GIE
    'by setting bit 7
    'enable on change interrupts 
    'by setting bit 3 RAIE
    'Clear all interrupt flag bits
    'bits 0,1,2,
    '
    intcon = 10001000
    ' tell it what to do when interrupt occurs
    On Interrupt GoTo . . . 
    'clear the flag bit before going back to sleep
    intcon.0 = 0
    sleep
    'or
    @ sleep
    check this link
    http://www.picbasic.co.uk/forum/showthread.php?t=11325
    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. Need advise how find problem in PID controller
    By phoenix_1 in forum Off Topic
    Replies: 0
    Last Post: - 28th October 2009, 01:22
  2. suitable resistance values to hold PIC12f635 pins to the ground
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th August 2009, 03:08
  3. Need advise on PIC controlling a variable resistor
    By baldwics in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 16th February 2006, 20:35
  4. Problems with variable - Advise welcome
    By tracking in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th June 2005, 18:40
  5. Newbie - Advise Please
    By tracking in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2005, 18:37

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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