Show Posts
Pages: 1 [2] 3 4 ... 459
16  Using Arduino / Microcontrollers / Re: ATmega328. Minimum size reserved for boot loader on: August 17, 2014, 04:32:46 pm
To disable the boot section entirely, un-set the BOOT_RST fuse.  Without that being set, the size of the boot section is pretty unimportant.  (It does still control what code can write flash memory; that can be controlled with the lock bits.)
(The bootloader section is special because it has separate protections (BLB bits), and because you can get execution to start there after reset (BOOT_RST)  If you set the protections so that it can't do anything special, and have execution start at 0, it's the same has not having a boot section...)
17  Community / Bar Sport / Re: Environmentally Friendly Water Tanks... on: August 17, 2014, 02:56:59 am
Driving a lawn sprinkler will probably require a pump of around 100 to 200 watts.
Really?  The "booster pump" for my automatic pool cleaner seems to generate similar pressure/flow to the municipal water supply, and it's 3/4HP (~1500W) (and it needs the main pool pump feeding its input too, although that may just be a "getting the supply through the pipes" problem.)
18  Using Arduino / Programming Questions / Re: progmem confusion on: August 17, 2014, 02:38:10 am
Well, to start with, you'd have to find a version of sprintf() that supported progmem strings. :-(  (I don't think that one exists.)
The addition of the F() macro to Arduino's print() functions gave it a big advantage over traditional printf().  Since printf is a C function, it can't tell the difference between flash and ram pointers.
19  Using Arduino / Programming Questions / Re: A better way to do my bit reordering? on: August 17, 2014, 02:22:41 am
Check out this recent conversation on AVR Freaks:
(And in particular "__builtin_avr_insert_bits()")

I sort-of like your current code; it's very general and obvious.  Does it actually need to be faster?
You can probably speed it up by making the actualBits[] array be 16bits wide and contain a mask instead of a bit number, which turns the inside of your loop into:
if (bitValue == 1)
      actual = actual |  x;     //Or in the actual bit value.
(multibit shifts by a variable amount being particularly slow on an AVR...  Another speedup might be to shift y in the loop instead of using bitread.  That would ensure shifting by a constant 1 position.)
20  Using Arduino / Programming Questions / Re: Errors compiling any IRRemote examples on 1.5.6-r2 on: August 16, 2014, 08:32:29 pm
Hmm.  Looks like a naming conflict between the IRRemote library and some of the Arduino Robot Libraries?
When I copy the IRRemote dir from 1.0.5 to my Documents/Arduino/Libraries  folder, and try to compile with 1.5.7, I get nice messages like:

Build options changed, rebuilding all
Using library Robot IR Remote in folder: /Applications/arduino/
At the top of the verbose compiler output, Just before it all goes belly-up...

21  Using Arduino / Microcontrollers / Re: Standard Fuse Settings for 16Mhz ATMega328p on: August 14, 2014, 11:30:49 pm
..indicates that the target (the processor on your "bad" Arduino) is not responding.
Or a wiring error (ie the response it not getting to the "programmer")  The SPI communications protocol just shifts data bits from the input pin into the peripheral; if you have something wrong with THAT pin connection, you end up shifting in randomness.
22  Using Arduino / Programming Questions / Re: Constructor not called and loop not runnin on: August 14, 2014, 09:17:24 pm
What kind of code is generally placed in constructors then? Only variable initialization?
Your code is probably "typical", but it doesn't work on Arduino (without pyro_65's fixes) because of the order in which the arduino peripherals are initialized compared to the contructor invocations...
23  Using Arduino / Programming Questions / Re: Am I doing something wrong with PROGMEM? on: August 14, 2014, 09:06:19 pm
For compatibility with more recent versions of the compiler, you should add "const" as well, and NOT use prog_xxx types:
static const uint8_t PROGMEM NUM0 =0;
24  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: August 14, 2014, 06:56:54 pm
I've checked in v6.1, incorporating this fix for the fast boot, and fixing OPTIBOOT_CUSTOMVER a bit.
  if (ch & (_BV(WDRF) | _BV(BORF) | _BV(PORF)))
25  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: August 14, 2014, 03:14:52 am
Does this mean that the maniacbug optiboot for the mega1284 will fail for programs > 64K?
No, because it's a WORD count rather than a byte count.  The mega1284 (and the mega1280 as well) only have 64k words, so the optiboot loads (and works) fine using ArduinoISP.
26  Using Arduino / Microcontrollers / Re: Standard Fuse Settings for 16Mhz ATMega328p on: August 14, 2014, 03:11:35 am
I tried it out and now both arduino's are running blink at the same wrong clock speed
Even after you disconnect them from one another?  It turns out that the LED pin IS one of the signals used to connect the two arduinos, so both LEDs will flash when the non-broken one does the flashing...
27  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: August 14, 2014, 01:07:44 am
have you verified that the "Adaboot no wait mod" actually still works?
Hmm.  I works here on assorted atmega8, atmega168, and mega328p boards.  But not on my Uno SMD (r2)...
Your patch (actually, a variation of it) does seem to help...

( )
28  Using Arduino / General Electronics / Re: Best PCB degign for beginner. on: August 14, 2014, 12:42:35 am
I think its what you are all used to.
A lot of people seem to expect a PCB design package to be like a drawing program, but it really NEEDS to do a lot more than that,  and consequently is usually significantly different...  (One difference is that you really want all the bits and pieces to have NAMES.  Pin names, signal names, etc...)
29  Using Arduino / Microcontrollers / Re: Standard Fuse Settings for 16Mhz ATMega328p on: August 13, 2014, 10:36:41 pm
I think that the closest you can get to HV parallel programming with an Arduino is this 5V "rescue" shield:

The clock injection you can get with the adafruit-modified Arduino ISP is NOT parallel programming, and will not fix some "bricked" AVRs (although the clock injection with serial programming DOES fix the most common bricking scenarios.) (And ArduinoISP does not support HV parallel programming at all.)

30  Using Arduino / Microcontrollers / Re: ATmega168 Programming: Which board to use? on: August 13, 2014, 10:29:43 pm
avrdude: Device signature = 0x1e940b
avrdude: Expected signature for ATMEGA168 is 1E 94 06
The ATmega168/ATmega168A and ATmega168P/ATmega168PA have different chip signatures, just like the ATmega328 vs ATmega328p problems that have been pretty well covered in these forums.

When trying to change, I got this error
'MCU 'atmega168' supported for assembler only'
When trying to change WHAT, exactly, and to what, and what is giving you that error message?
And what software (and what device programmer) do you have installed, anyway?
It's been a long time since atmega168 was only supported by assembler, or since "Make" was not included in AVR development packages...  (The choices are essentially:  Atmel Toolset, Atmel Studio (which includes the toolset),  WinAVR, and Arduino (which includes WinAVR.))

Pages: 1 [2] 3 4 ... 459