Surviving 1 second without battery power


Results 1 to 28 of 28

Threaded View

  1. #16
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Im reading different PIC datasheets so shed some light about the BOD sequence, but most of them share the same wording, Im really lost.

    I made a little proggie to test what I've learned in this thread, but it does not work, maybe Im missing something stupid, but after many hours of trying, maybe what I need is a good rest:

    Code:
    @ device pic12f683,INTRC_OSC_NOCLKOUT , wdt_on, mclr_off, protect_off, bod_on
    
    CMCON0 = %00000111     ' Disable comparator
    VRCON  = %00000000     ' disable
    
    
    '       I/Os
    TRISIO = %00000000      ' no inputs      
    
    ' definitions
               
    BODD var PCON.0
    
    gpio=%00000100            'I know program cold started
    pause 1000                'gpio.2 green led pin5 indicates coldstart
    gpio=%00000000   
    
    loop:
    
    if BODD=0 then           
        gpio=%00000010        'GPIO.1 red led PIN6 shows a BOD state
        pause 1000
        gpio=%00000000
        BODD=1
    endif
    goto loop
    then the schematic is pretty simple, a ceramic capacitor at the power lines for storing some battery, a couple of leds at the specified pins and a momentary switch that allows me to cut VDD for a moment.

    It does not vork

    [edit] Maybe I need to check for POR=1 and BOD=0 to know for sure that a BOD reset happened

    Help!
    Last edited by peu; - 13th March 2008 at 01:11.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

Members who have read this thread : 1

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