brown out resets


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I would try something like.
    If rpm is less than X then disable the INTCON.

    Calculating power from the RPMs. Setup a timer to read the rpm evert so many seconds, after maybe a 100 reads average the RPMs giving aveage power over that time span??? If the wind is not changing much it should be pretty accurate.

    Of you have PBP then you have LONGS. Using MCS? Tell it to compile using PBPL. That can be found under one of the options in the tool bar. MPLAB? When you set the language it should b there.

    Yup, the EEPROM has some limits. I have been using a SD card for data logging.
    Add a RTC if you do not have one in the project and you have plenty of room on a SD to save the time, RPM, power and what ever else. When you want to just pop it into a PC and chart, display or what ever. Easy way to get data from PIC to PC.

    Yup, more babbling
    Last edited by mackrackit; - 24th September 2009 at 13:08. Reason: If you have PBP 2.5 or greater you have LONGs.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    since ive only got picbasic pro and not pbpl it means i cant use LONG. this means i can only get up to 65536, whereeas the number of kwh is gonna be about 200,000 over the 20 years... any ideas on this one?
    I don't have long either, this is my turn around:

    Code:
    AA var word
    BB var word
    CC var word
    DD var word
    
    Long:
    AA=0
    While AA<>BB
    AA=AA+1
    CC=CC+1
    If CC=0 then DD=DD+1
    wend
    
    Return
    You place your reading in variable BB and gosub long, here your reading will be accumulated in variable CC and DD, that you can save at your discretion.
    Reading back the long is simple just (DD x 65536)+CC

    Al.
    All progress began with an idea

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


    Did you find this post helpful? Yes | No

    Default More of my rambling

    Hi Robert,
    To get a clean PIC reset you could tie the MCLR pin to ground using an NPN transistor and a resistor to + , then on the transistor's base circuit feed it with a suitable capacitor, tied to the generator, when it spins up the transistor will pull the mclr pin low until the cap charges and then turn off.
    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.

  4. #4
    Join Date
    Jun 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Just use a simple voltage drop detector. I use a 4.5v detect on the supply of my odometers and I've tested the crap out of this application and NEVER fails to write the value to EEPROM once power is disrupted. The volt detector is nothing more than a "switch" to ground thus when it's supply which shares the supply of the pic, goes to 4.5 volts or lower, it will switch any input selected on the pic to low to activate your "save data" routine. Use a capacitor of 220uf to slowly drain the power while giving time to do the action. Once your action is complete, use a resistor or load to complete the cap drain...

Similar Threads

  1. 16f877a porta.5 resets chip
    By lecoind in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st October 2009, 18:29
  2. Device Resets / erratic operation - 16F88
    By turbokinetic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th April 2009, 03:08
  3. servo motor resets 16f877a
    By burak450 in forum mel PIC BASIC Pro
    Replies: 85
    Last Post: - 19th October 2008, 22:25
  4. PIC resets every now and then
    By passion1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th June 2007, 21:41
  5. Freqout resets port pins?
    By MikeLewis in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th July 2004, 04:29

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