<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    The Arduino gate IS a FET. :-) The concern would be if the gate's
    output voltage is high enough. It won't be the same as the Atmega's
    supply voltage. A bypass cap may be called for if the BLE board is
    far away and connected with a thin wire. A decent meter or storage
    'scope could determine whether the peak current spec reflects
    reality and whether the supply voltage droops with a given setup.<br>
    <br>
    I know this isn't likely to be relevant to your case, but folks
    should know that there are layers of 'absolute max' specs for
    Atmega, so, for example, you can't expect to drive all eight pins of
    one register at 40ma, power dissipation and max temperature may be
    issues, etc.<br>
    <br>
    The reset-hold idea sounds good to me.  <br>
    <br>
    The four byte epoch date/time encoding is very well understood and
    supported. If you want to get a head start on 2038 you could have a
    single bit in your flash to say "if set then these 32 bit timestamps
    are relative to 1/1/1970 and otherwise time zero is expressed in the
    null-terminated string following this bit".<br>
    <br>
    Here's a potentially dumb answer to your question after I meditated
    about just how efficient your timestamps could get.<br>
    <br>
    If you can trust the storage to read back what you've written you
    could <a href="https://en.wikipedia.org/wiki/Huffman_coding">Huffman
      code</a> the intervals between timestamps and make them just long
    enough to express the elapsed time from one measurement to the
    next.  If your "regular" interval between measurements is fixed and
    you can hit each reporting time within a second or less then you
    only need one bit to express the new date/time, and other intervals
    would be expressed with longer bit strings you would form as a side
    effect of traversing your "interval dictionary" that for the best
    case efficiency you would create on the fly. Your first timestamp
    after power up would be degenerate unless you got lucky, and you
    would necessarily have to run through the samples to establish the
    date/time of the last pre-power-cycle timestamp before proceeding if
    you don't want to just spit out a full 32 bit timestamp each time
    you start. A hugely cheaper way to go is to subscribe one bit of
    your logging data to indicate whether the timestamp is the full four
    bytes or some smaller sequence of bytes expressing one or more
    flavors of interval relative to the last full timestamp. Finally, if
    the logging data has unused bits such as the high order bit of seven
    bit ASCII characters you could perhaps express a timestamp with zero
    overhead in the nonvolatile storage.<br>
    <br>
    Remind me why ferromagnetic chips are more interesting than EEPROM
    or flash?<br>
    <br>
    -Pete<br>
    <br>
    <div class="moz-cite-prefix">On 11/29/2015 11:20 AM, Chip McClelland
      via TriEmbed wrote:<br>
    </div>
    <blockquote
      cite="mid:C5D59C90-73E6-4FE8-9DDB-00FDE2E481EB@mcclellands.org"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      All, 
      <div class=""><br class="">
      </div>
      <div class="">I am building a new board and have to make some
        design decisions. Before sending to OSHPark, I wanted to see if
        you all could tell me if I am about to make any mistakes:</div>
      <div class=""><br class="">
      </div>
      <div class="">1) Powering a Bluetooth LE module using an Arduino
        IO Pin.  I am using the Adafruit Bluetooth LE friend.  According
        to <a moz-do-not-send="true"
href="https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-uart-friend/current-measurements"
          class="">this article</a>  it should only draw 15.2mA peak
        current.  Looking up the <a moz-do-not-send="true"
          href="http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations"
          class="">ATMEGA 328p specs</a>  I see that that it can source
        40mA on an IO pin.  I know that engineers like to add a “safety
        factor” so, do you think I would be OK or should I use a FET and
        have the Arduino simply control it?</div>
      <div class=""><br class="">
      </div>
      <div class="">2) I am moving away from storing data on a MicroSD
        card and want to use a FRAM chip instead. BTW, if you have not
        looked at FRAM it is awesome!  I will use the <a
          moz-do-not-send="true"
          href="http://www.fujitsu.com/us/Images/MB85RC256V-DS501-00017-3v0-E.pdf"
          class="">Fujitsu chip</a> and communicate using i2c.  Here is
        the question, what if I wanted to use an external reader to
        extract the data from this chip, I could expose the i2c pins on
        the boar and use a POGO pin reader to connect - that way I would
        not need to refresh the ATMEGA on the board to change to a data
        dump sketch.  So, I would connect this device to provide power,
        ground, SDA and SCL.  The thing is, I don’t want the ATMEGA on
        the board to get in the way of this.  Could I simply add a pin
        connected to the board’s RESET pin and hold it low, disabling
        the onboard processor and leaving the i2c bus available for
        access?</div>
      <div class=""><br class="">
      </div>
      <div class="">3) I want to add a date and time stamp to each event
        I log on the FRAM chip, I am thinking the best format would be
        UNIX or EPoC time as it will use only 4 bytes.  That way each
        event will use only 4 date/time bytes and one data byte and I
        can store a year’s worth of data on a 256k chip.  Is there a
        better way to store date and time?</div>
      <div class=""><br class="">
      </div>
      <div class="">Thank you all for your help,</div>
      <div class=""><br class="">
      </div>
      <div class="">Chip</div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Triangle, NC Embedded Computing mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a>
<a class="moz-txt-link-freetext" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a>
TriEmbed web site: <a class="moz-txt-link-freetext" href="http://TriEmbed.org">http://TriEmbed.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>