Problem running from a 3v battery


Closed Thread
Results 1 to 9 of 9
  1. #1
    tbirchall's Avatar
    tbirchall Guest

    Default Problem running from a 3v battery

    I'm using a 16F628A which I believe should run as low as 2 volts. It works just fine from batteries providing just under 6 volts but not from 3 volts. The setup is a simple button to INT that triggers an LED to blink. Bypassing the chip and powering the LED (though the resistor) lights up the LED just fine. I figured maybe the battery didn't have enough juice, so I connected the circuit to a line power supply set at 3 volts and it didn't work. Me thinks I'm missing something here...

    Thanks,
    Tom

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Did you also tried with the LF serie???

    Did you try to disable the Brown-Out detect fuse???

    F serie are suppose to work @ 3v under 10MHZ. See the Voltage-Frequency graph at the end of the datasheet.

    I have a load (>10 000 units) of these F serie and LF serie on the market now running with a pair of AAA cells. No problem with them... as now...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Bob_W's Avatar
    Bob_W Guest


    Did you find this post helpful? Yes | No

    Default

    Do you have the BOREN configuration bit set? If so, it looks like you'll be in brown out reset if you are under 3.65-4.00 volts.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I think Bob has hit on the problem. You'll need to disable BOR, and stay below 10MHz oscillator frequency to run this PIC at 3V.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Bob_W's Avatar
    Bob_W Guest


    Did you find this post helpful? Yes | No

    Default

    Actually, I think it was race to the finish between me and mister_e based on the timestamps. He said it also..... He must type faster than me : )

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    hehe i had this impression of 'already said before' or "DEJA VUE' depending french ore english version you want to have.

    Now that we are 3 with the same version/results... i must be true
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    tbirchall's Avatar
    tbirchall Guest


    Did you find this post helpful? Yes | No

    Default Brown out

    I did try disabling the brown out and got interesting results. I think I mentioned above that I have a button triggering an interrupt that flashes an LED. Well, with brown out disabled, the LED constantly flashes. I don't have to press the button. (At least it runs, but not how I'd hoped.) I should have mentioned that I'm using the internal oscillator. Honestly, I'm not sure what it is running at. I think it defaults to 4MHz.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Can you post your code?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    tbirchall's Avatar
    tbirchall Guest


    Did you find this post helpful? Yes | No

    Default The code

    The idea is that the chip sleeps until it gets an interrupt. This all works fine with 6 volts. I'm not setting the brown out to disabled here because I have to do it via the programmer (believe me, I've tried it both ways). I also set the internal oscillator with the programmer. It only has a setting for internal with or without the clock, not a frequency.

    Code:

    Code:
    '----------------------------------------------------------------
    ' includes
    '----------------------------------------------------------------
    Include "modedefs.bas"
    
    '----------------------------------------------------------------
    ' definitions
    '----------------------------------------------------------------
    
    '----------------------------------------------------------------
    ' constants
    '----------------------------------------------------------------
    
    '----------------------------------------------------------------
    ' variables
    '----------------------------------------------------------------
     i      var     byte
     
    '----------------------------------------------------------------
    ' init
    '----------------------------------------------------------------
    init:
    
        ' set all VARs to zero
        clear
        
        ' set configuration fuses
        @ DEVICE pic16F628A, WDT_OFF     ' turn watchdog timer off
        
        ' set up interrupt handler
        INTCON = %10010000
        OPTION_REG = 0
        on interrupt goto handleInterrupt
        
        low 7
        
        ' set portb/0 to input
        TRISB.0 = 1
    
    
    '----------------------------------------------------------------
    ' main
    '----------------------------------------------------------------
    main:
    
        sleep 0
        pause 1
        
        ' blink an LED on pin RB7
        for i = 0 to 3
         
            high 7
            pause 300
            low 7
            pause 300
        
        next  
        
    goto main
    
    '----------------------------------------------------------------
    ' handleInterrupt
    '----------------------------------------------------------------
    disable
    handleInterrupt:
    
        ' globally turn off interrupts
        INTCON.7 = 0
        
        ' clear the interrupt triggered flag
        INTCON.1 = 0
        resume
        
    enable
    
    END
    Thanks!

    -Tom

Similar Threads

  1. can't solve this voltage measurement problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 8th November 2009, 20:10
  2. Of battery discharge curves
    By ardhuru in forum General
    Replies: 0
    Last Post: - 21st January 2009, 16:24
  3. Low battery signal from an RTC
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th March 2008, 17:13
  4. Silly MCLR question
    By kevj in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th November 2007, 03:12
  5. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12

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