Show Posts
Pages: [1] 2 3 ... 40
1  Using Arduino / Microcontrollers / Re: ATTINY85 : USBasp programming fail "target doesnt answer..." on: Today at 03:53:25 pm
If the -B option works from command line, then your in luck.  You can set that clock rate option in the avrdude.conf file.
Go to the arduino-1.0.4\hardware\tools\avr\etc\avrdude.conf and edit the line around line number 319 to:

Code:
# default_bitclock = 2.5
default_bitclock = 10

This should set the default clock rate low for the IDE to use.
2  Using Arduino / Microcontrollers / Re: Burn bootloader programmes fuse but not flash with AVRISPmkII and Arduino 1.5.6 on: Today at 02:43:39 pm
I ran into this same issue from last year since IDE 1.5.2.

http://forum.arduino.cc/index.php?topic=171000.0

It is still an issue with the current IDE 1.5.7.   However, I have been successfully burning bootloader with the AVRISPmkII by using avrdude-6.1.  It appears they have changed or fixed this back-to-back timing issue with the latest avrdude version.

Check out the Windows binary http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1-mingw32.zip or source code http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1.tar.gz.

3  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: August 13, 2014, 07:32:10 pm
I have a need for my sketch to detect if the Arduino Uno R3 is being powered on vs reset.  The issue is that I have an audio DAC that is initialized from zero to 1/2 way audio level to avoid an audio "pop" sound on the output.  However, once it has been initialized and I do a soft reset it will cause the audio "pop" because of the initialization routine starting at zero level.

So I have been trying to use Optiboot-5.0 or Optiboot-6.0  for the reset flags passing to the main sketch.
Code:
 // Adaboot no-wait mod
  ch = MCUSR;
  MCUSR = 0;
  if (!(ch & _BV(EXTRF))) appStart(ch);

I have in my main sketch the code to pass the flags.
Code:
uint8_t resetFlags __attribute__ ((section(".noinit")));
void resetFlagsInit(void) __attribute__ ((naked)) __attribute__ ((section (".init0")));
void resetFlagsInit(void)
{
  // save the reset flags passed from the bootloader
  __asm__ __volatile__ ("mov %0, r2\n" : "=r" (resetFlags) : );
}

void setup() {
  // Get reset flags
  resetFlagsInit();

  // ramp up to mid audio level to avoid pop, unless from reset.
  mcpDacInit();
  if (resetFlags & _BV(PORF)) {
    for(int i=0; i<=2048; i++) {
      mcpDacSend(i);
      delayMicroseconds(50);
    }
  }
}

The problem is it appears the "Adaboot no wait mod" is not working at all.  Each time I plug in the power from USB or the jack it still executes the bootloader (I see the LED start flashes).  So it appears the EXTRF (External Reset Flag) is always set along with the PORF (Power-on Reset Flag).  I am guessing this is due to how the hardware power-on reset circuit is done on the Arduino Uno R3.

@westfw have you verified that the "Adaboot no wait mod" actually still works?

I have modified the no-wait check to this instead and it appear to work correctly with my code now.
Code:
 // Adaboot no-wait mod
  ch = MCUSR;
  MCUSR = 0;
//  if (!(ch & _BV(EXTRF))) appStart(ch);
  if ((ch & _BV(WDRF)) || (ch & _BV(BORF))  || (ch & _BV(PORF))) appStart(ch);

4  Products / Arduino Due / Re: Due won't start after power off-on, have to reset on: August 05, 2014, 02:27:09 am
I recall similar problems like this with early versions of the IDE v1.5 when it first came out.  Make sure you are using the latest IDE v1.5.7.

5  Products / Arduino Due / Re: Native port does not recognized by windows 7, only the programming port on: August 04, 2014, 08:53:07 pm
https://www.sparkfun.com/products/11515

And it works perfectly with the Programming port of the Due, but it doesn't with the Native port. I leave it written here in case somebody else faces the same issue.

That's the old version of the Sparkfun cable, that doesn't work correctly with the Native port.  They have a newer version that has a built in USB hub that does work correctly with the Due Native port.

https://www.sparkfun.com/products/12016
6  Products / Arduino Due / Re: Uploading with Atmel Studio 6 on: July 31, 2014, 01:44:28 pm
C:\Program Files (x86)\Atmel\Atmel Studio 6.2>C:\Program Files (x86)\Arduino\hardware\tools\bossac.exe --port=COM37 -U false -e -w -v -b "C:\EMBEDDED PROGRAMMING\AtmegaAVR\AtmelStudio\DUO\ARDUINO_DUO_Led_13\Release\ARDUINO_DUO_Led_13.bin" -R
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

You need to escape the spaces in the directory names and file names.  Try adding quotes around the names with spaces.

Code:
C:\Program Files (x86)\Atmel\Atmel Studio 6.2>C:\"Program Files (x86)"\Arduino\hardware\tools\bossac.exe --port=COM37 -U false -e -w -v -b "C:\EMBEDDED PROGRAMMING\AtmegaAVR\AtmelStudio\DUO\ARDUINO_DUO_Led_13\Release\ARDUINO_DUO_Led_13.bin" -R
7  Using Arduino / Microcontrollers / Re: Using the AVR Atmega16 with Arduino on: December 30, 2013, 09:44:11 pm
The reset circuit is working properly as I see the LED blinks for a small time so I don;t think it is the reset circuit.
The fuse bits are 0xFF for the LOW and 0xD9 for the HIGH

You can try changing the High Fuse settings to enable the Boot Reset Vector bit 0.  Also depending on which version of Optiboot file you are using you may need to change the boot sector size to match.  If you are using the one downloaded from this thread then it should be set for 512 word size.  Other optiboot versions may need to be set for 256 word size.

So try changing  the HFUSE to 0xDA instead.

8  Using Arduino / Microcontrollers / Re: Using the AVR Atmega16 with Arduino on: December 28, 2013, 05:06:56 pm
It sounds like the auto-reset circuit is not working correctly, or possibly the fuse bit settings are not set correctly.

9  Using Arduino / Microcontrollers / Re: Goldilocks = Arduino Uno + 1284p on: August 29, 2013, 02:13:02 am
I just received my Goldilocks 20MHz and 22.1184MHz(overclocked) boards.  They are working great.   I have one driving four 16x32 RGB Matrix panels in a 16x128 pattern.  The extra overclock is just enough speed to eliminate the flicker when driving four panels together.  Now to try it with four 32x32 RGB panels.

10  Using Arduino / Microcontrollers / Re: Fixing USBasp based on ATmega8 on: August 28, 2013, 02:23:01 pm
There is an LED on the USBasp programmer that turn on under normal USB access, it should be off during avrdude access.

Does the LED on the USBasp even light up when you plug it in the USB (with the J2 un-jumpered)?  If not then it does sound like it's bad.

11  Using Arduino / Microcontrollers / Re: Fixing USBasp based on ATmega8 on: August 28, 2013, 05:31:29 am
The error you are getting indicates the m8l is not being reset.  When you attempt to use avrdude on the m8l does the LED on the programmer turn off?  If the LED stays on, then the m8l chip is not getting the reset signal.

12  Using Arduino / Microcontrollers / Re: ATmega16 Arduino Processing [Noob] on: August 27, 2013, 07:14:30 pm
You can check this post for some info.

http://forum.arduino.cc/index.php?topic=172881.msg1283986#msg1283986

13  Using Arduino / Microcontrollers / Re: Fixing USBasp based on ATmega8 on: August 27, 2013, 06:36:49 pm
On that betamcu USBASP programmer, you need to jumper the two J2 pins together next to the MOSI pin on the 10-pin header.  This will pass the reset pin from the header to the reset pin on the mega8L chip.  Then you should be able to program it.
14  Using Arduino / Project Guidance / Re: 2 arduino MICRO serial communication?! on: August 15, 2013, 10:38:32 pm
And its not that great, becouse i wanted to use 2 micros not 1 micro and 1 DUE smiley-grin

Did you ever get it working with two Micros?

Note: the Micro uses "Serial1" for TTL communications.  The "Serial" is used for USB communications.
Quote from http://arduino.cc/en/Main/ArduinoBoardMicro
Quote
Note that on the Micro, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class.

You can try this, it works when I tested it.
Sending:
Code:
int led = 13;
int i = 0;

void setup() {
  Serial1.begin(9600);
  pinMode(led, OUTPUT);     
}

void loop() {
  digitalWrite(13,HIGH);
  Serial1.print(i);
  delay(500);
  digitalWrite(13,LOW);
  delay(500);
  i++;
  if(i > 3) i = 0;
}

Receiving:
Code:
int led = 13;
int incomingVal;

void setup() {
  Serial1.begin(9600);
  pinMode(led, OUTPUT);     
}

void loop() {
  delay(2);
  if(Serial1.available()){
    incomingVal=Serial1.read();
    if(incomingVal=='2')
      digitalWrite(13,HIGH);
    else
      digitalWrite(13,LOW);
  }
}

15  Using Arduino / Microcontrollers / Re: Using the AVR Atmega16 with Arduino on: August 15, 2013, 08:31:05 pm
would you happen to know what it take for some truly ancient at90s2313 and/or at90s4414 ?

Well, the AT90S2313 has been replaced by the ATtiny2313, so it might be able to use some core code from the tiny2313.  You might have to modify the core code to support the AT90S2313.  The main difference would be some lack of timer features that the tiny2313 has.  The AVR tool chain and avrdude does appear to have support for the AT90S2313, so you would be good there.

For the AT90S4414 seems to be replaced with the ATmega8515.  Can't find any documentation about the differences.  The AT90S4414 is not similar to anything else, but there is support for it in the AVR tool chain and avrdude.  So you may be able to get it working with the same core for the mega16.  Just know that it does not have any ADC and limited timer support.  Lookup the ATmega8515 for feature support.
Pages: [1] 2 3 ... 40