Show Posts
Pages: 1 2 [3] 4 5 ... 289
31  Using Arduino / Programming Questions / Re: code in code on: August 23, 2014, 12:43:07 pm
Not with the standard IDE but you may be interested in http://bitlash.net/
32  General Category / General Discussion / Re: kickstarter - what a crock! on: August 22, 2014, 09:30:51 am


33  General Category / General Discussion / Re: kickstarter - what a crock! on: August 22, 2014, 07:30:56 am
You can't possibly be old enough to play golf smiley-grin
34  General Category / General Discussion / Re: kickstarter - what a crock! on: August 21, 2014, 10:23:18 pm
The 1284P board I designed is pretty simple, but it fits my needs. Didn't consider it a breakthrough or anything, so I published it on GitHub just in case someone else could use it. So putting a Kickstarter campaign together didn't occur to me but would definitely have taken several times the effort that went into designing the board itself.

Should be interesting to see what this guy uses for a core.

Quote
Also, to "install" the board in the Arduino IDE you will just need to copy and paste a folder I will provide in the hardware directory of your Arduino IDE's install location.

Quote
I will definitely make a good guide on using the Mini Duino+ after the campaign is successful.
35  Using Arduino / Programming Questions / Re: Altering an RTC library. on: August 21, 2014, 05:26:53 pm
Good find aeternus!

Unfortunately, the reason we're using the MCP79511 is for the unique ID  address MAC address.

MCP79411 has a 48-bit MAC address; MCP79412 has a 64-bit MAC address. The library mentioned above works with both and has a function to read the MAC address. I've also used 24AA02E48 for MAC addresses, very inexpensive.

(Thanks, @aeternus  smiley)
36  Community / Bar Sport / Music & Electricity on: August 19, 2014, 03:51:26 pm
A musician friend of mine told me that he was in the local orchestra when it played an outdoor concert. The sky became stormy, but they played on - "Until lightning struck the orchestra leader," he said sadly. "My gosh!" I said. "Was he badly hurt?" "Nah, he's fine. See, he's a very poor conductor."
37  Using Arduino / Networking, Protocols, and Devices / Re: Setting up X-bee network in API mode on: August 19, 2014, 11:55:57 am
All is explained in the product manual.
Andrew Rapp's library makes it easy.
Be sure to set AP=2.
38  Community / Bar Sport / Re: Winter vs Summer on: August 19, 2014, 06:45:17 am
Saw a news item saying that they may get snow in the mountains of Scotland. This global warming thing is really getting out of hand, eh.
39  Using Arduino / Microcontrollers / Re: "Divide Clock by 8" fuse in order to use 16MHz RC oscillator for low voltage? on: August 18, 2014, 04:57:39 pm

I agree.  After rereading it my post is confusing.  I meant have the CKDIV8 fuse bit set and adjust the divisor in setup.  Initialization would be at 2 MHz.  Everything else would be at 8 MHz.

What can I say, I can't help picking nits.  Although a person might get away with it the other way around, I can't recommend it.
40  Using Arduino / Microcontrollers / Re: "Divide Clock by 8" fuse in order to use 16MHz RC oscillator for low voltage? on: August 18, 2014, 04:27:22 pm
The CKDIV8 fuse bit just determines the initial value of CLKPR.

Which means that @halfdome could change the divisor to two in setup resulting in the processor running at 8 MHz.  The processor would always be within specifications for 3 volts but the final speed would be more reasonable.

Well, the processor would be within spec except for the code executed before setting CLKPR  smiley-wink
41  Using Arduino / Microcontrollers / Re: "Divide Clock by 8" fuse in order to use 16MHz RC oscillator for low voltage? on: August 18, 2014, 10:26:52 am
I think the fuse bit only applies to the internal 8MHz clock.

Not so, see Reply #3 above. The CKDIV8 fuse bit just determines the initial value of CLKPR. If CKDIV8 is set, then CLKPR is set to divide by eight, else, it's set to divide by one.
42  Using Arduino / Microcontrollers / Re: "Divide Clock by 8" fuse in order to use 16MHz RC oscillator for low voltage? on: August 18, 2014, 10:16:18 am
I've wondered the same thing. So the question really is whether the oscillator is within spec e.g. at 16MHz and 3V, even though the CPU is within spec with the CKDIV8 fuse bit programmed.

PS: I think the answer is YES based on Note 3 on p29 of the datasheet:

Quote
3. If the crystal frequency exceeds the specification of the device (depends on VCC), the CKDIV8 Fuse can be programmed in order to divide the internal frequency by 8. It must be ensured that the resulting divided clock meets the frequency specification of the device.

That note is for the low-power XO and there are similar notes for the full-swing XO and for the internal RC osc.
43  Using Arduino / General Electronics / Re: How to distinguish between ‘reset’ and ‘real power loss’ ? on: August 18, 2014, 09:37:57 am
That sounds like "as designed."  Your sketch won't see EXTRF, because that's the one reason that invokes the bootloader code.
You should see PORF on power-on, though, and you know that WDRF means EXTRF, unless you've also turned on the WDT...

Thanks, that's what I figured. I am also using the WDT so I'll just go sans bootloader, no big deal really.

I see both BORF and PORF on power up, but that is consistent with the behavior without a bootloader.

Thanks very much!
44  Using Arduino / General Electronics / Re: How to distinguish between ‘reset’ and ‘real power loss’ ? on: August 18, 2014, 07:58:16 am
MCUSR normally has its contents corrupted by the bootloader.
If you get the newest version of optiboot from its source repository (https://code.google.com/p/optiboot/ ) you'll find a patch that permits optiboot to pass the original value of MCUSR on to the user application (and an example of what the application should look like to use that info: https://code.google.com/p/optiboot/issues/detail?id=66

I finally got around to compiling Optiboot 5.0 for ATmega328P and am not seeing the results I expected WRT the MCUSR value.  When pressing the reset button, I expected to see EXTRF set in MCUSR but instead I see WDRF. Any ideas?

PS: Maybe this is working as designed? See comment #2 at https://code.google.com/p/optiboot/issues/detail?id=66

Output
Code:
0 MCUSR=0x08 WDRF

Code
Code:
//copy the MCUSR value saved in r2 by Optiboot to a global variable.

#include <Streaming.h>    //http://arduiniana.org/libraries/streaming/

uint8_t mcusr __attribute__ ((section (".noinit")));
void getMCUSR(void) __attribute__((naked)) __attribute__((section(".init0")));

void getMCUSR(void)
{
    __asm__ __volatile__ ( "mov %0, r2 \n" : "=r" (mcusr) : );
}

void setup(void)
{
    Serial.begin(115200);
    Serial << endl << millis() << F(" MCUSR=0x0") << _HEX(mcusr);
    if (mcusr & _BV(WDRF))  Serial << F(" WDRF");
    if (mcusr & _BV(BORF))  Serial << F(" BORF");
    if (mcusr & _BV(EXTRF)) Serial << F(" EXTRF");
    if (mcusr & _BV(PORF))  Serial << F(" PORF");
    Serial << endl;
}

void loop(void)
{
}
45  Using Arduino / Sensors / Re: Is there a voltage regulated, level shifted I2C bus solution for AA powered unit on: August 16, 2014, 07:12:00 pm
@EKMallon, wow, quite a story! I'd say that's a good start on a book about the project. I'm curious about the total amount of data logged. It sounded like the 30-minute interval was maybe longer than optimal. What would a better interval be, and how many bytes of data are logged for each interval?
Pages: 1 2 [3] 4 5 ... 289