Power Control (PCON) Register


Results 1 to 6 of 6

Threaded View

  1. #3


    Did you find this post helpful? Yes | No

    Default Re: Power Control (PCON) Register

    The following code modification fixes the problem. The idea is a double set of the MCLR reset flag. Electrical noise tends to disrupt the initial condition of the MCLR bit so a double set is needed:

    Code:
            if PCON.1 = 0 then      'when por reset has occurred
            PCON.3 = 1              'set mclr flag
            PCON.1 = 1              'set por flag
            endif
    
            if PCON.3 = 0 then      'when mclr reset has occurred
            PCON.3 = 1              'set mclr flag
            goto current            'jump over data display
            endif
    This is working nearly 100% of the time, unless the noise environment is very,very severe.
    The fix is posted here for future reference.
    Last edited by Dick Ivers; - 30th March 2013 at 00:17.

Similar Threads

  1. Power multiple electronics from 1 power source
    By koossa in forum Off Topic
    Replies: 2
    Last Post: - 2nd September 2010, 09:49
  2. How do I give a radio control car autonomous control
    By Kenjones1935 in forum General
    Replies: 190
    Last Post: - 17th January 2010, 16:40
  3. CCP vs power control PWM
    By luminas in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th September 2008, 04:09
  4. Replies: 4
    Last Post: - 16th May 2008, 15:35
  5. How do I to set one bit in a register?
    By jessey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th February 2006, 09:43

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