Author Topic: Arduino woe's  (Read 6927 times)

0 Members and 1 Guest are viewing this topic.

EEVblog

  • Administrator
  • Hero Member
  • *****
  • Posts: 4038
  • Country: au
    • EEVblog
Arduino woe's
« on: January 26, 2012, 08:01:33 PM »
Trying to get my PSU board working with the Arduino/AVR environment, let's document my problems...

1) Cannot find my Sparkfun FTDI serial board, so tried an SI labs no-name board. Doesn't work at all wiht a proper Ardunio Pro board.
2) Tried my official AVR ispMkII programmer to program the PSU micro. Nope, turns out the Arduino has major problems with the ispMKII under Windows. Everyone tells me to use Linux... or this or that brand programmer etc... don't have any of those, thanks anyway.
3) Uninstalled the Jungo MKII driver and installed the recommended libUSB driver. Still doesn't work with Arduino pro.
4) Removed the micro from an Arduino Duemelinove so I could use it as an FTDI interface. That works OK when talking to the Arduino pro board. Getting somewhere...
5) Tried using the AVRispMkII with Arduino IDE to program the bootloader on my PSU board. Doesn't work.
6) Installed latest Atmel AVR Studio 5 software. Talks to the ispMKII and updates the latets firmware, no problems. But then refuses to talk to the ispMKII at all using either Jungo or libUSB drivers.
7) Used my old machine with AVR Studio 4 and now ispMkII works fine on my PSU board and I can burn a bootloader - or so I think.
8) Existing working Duemelinove/FTDI interface still works with Arduino Pro board, but refuses to work with my PSU board. tried various reset things to no avail.
9) Used my old machine and Studio 4 to read the firmware from the actual Arduino Pro board and clone it onto my PSU board. PSU board STILL doesn't talk with Arduino IDE.

So there you have, a entire day wasted trying to get this stupid thing working.
I am very quickly coming to the conclusion that the Arduino environment is shit, and AVR Studio 5 is shit, and am starting to regret using both now...

Never had any issues before with Studio 4 and AVR's direct with ispMKII programmer, it's always worked for me.

Not happy.

Dave.

siliconmix

  • Sr. Member
  • ****
  • Posts: 346
  • Country: wales
Re: Arduino woe's
« Reply #1 on: January 26, 2012, 08:09:31 PM »
sounds like video blog material to me.

EEVblog

  • Administrator
  • Hero Member
  • *****
  • Posts: 4038
  • Country: au
    • EEVblog
Re: Arduino woe's
« Reply #2 on: January 26, 2012, 08:16:48 PM »
sounds like video blog material to me.

You mean where I smash my new PSU board with a sledgehammer and then redesign it with a PIC?  >:(

Dave.

PeterG

  • Sr. Member
  • ****
  • Posts: 502
  • Country: au
Re: Arduino woe's
« Reply #3 on: January 26, 2012, 08:19:08 PM »
sounds like video blog material to me.

I can feel a major video Rant on its way.

Regards

I am not crazy, its the rest of the world that has gone mad.

PeterG

  • Sr. Member
  • ****
  • Posts: 502
  • Country: au
Re: Arduino woe's
« Reply #4 on: January 26, 2012, 08:20:10 PM »
sounds like video blog material to me.

You mean where I smash my new PSU board with a sledgehammer and then redesign it with a PIC?  >:(

Dave.

yep i knew the PIC word would come out... :D

Regards
I am not crazy, its the rest of the world that has gone mad.

firewalker

  • Sr. Member
  • ****
  • Posts: 540
  • Country: gr
Re: Arduino woe's
« Reply #5 on: January 26, 2012, 08:29:33 PM »
When you loaded the boot loader did you set the correct fuses to the avr?

Personally I never had any problem loading Arduino build firmware to any compatible target with any programmer. I only had to set some options to programmers.txt file.

Alexander.
Become a realist, stay a dreamer.


mikeselectricstuff

  • Hero Member
  • *****
  • Posts: 1445
  • Country: gb
    • Mike's Electric Stuff
Re: Arduino woe's
« Reply #6 on: January 26, 2012, 08:31:13 PM »
Quote
9) Used my old machine and Studio 4 to read the firmware from the actual Arduino Pro board and clone it onto my PSU board. PSU board STILL doesn't talk with Arduino IDE.
Have you programmed the config fuses ? Remember the default is for CLKDIV8 to be programmed, so a factory-fresh chip will run at 1MHz from the intrc OSC/8

A quick check is to scope the osc pins - if not oscillating it's running off the internal RC osc, so other confiigs probably also wrong
« Last Edit: January 26, 2012, 08:41:49 PM by mikeselectricstuff »
Mike's Electric Stuff: High voltage, vintage electronics, electrical curiosities
Day Job: UFOs, LEDs etc.
Versatronics & other low-end pick & place forum

HAL-42b

  • Sr. Member
  • ****
  • Posts: 380
  • Country: tr
  • Not an EE
Re: Arduino woe's
« Reply #7 on: January 26, 2012, 08:58:56 PM »
Everybody should have a Linux box somewhere, for peace of mind if nothing else  ;D
0.9999... = 1

Chet T16

  • Sr. Member
  • ****
  • Posts: 306
  • Country: ie
    • Retro-Renault
Re: Arduino woe's
« Reply #8 on: January 26, 2012, 09:03:31 PM »
Can't you just use the arduino as an ISP?

fmaimon

  • Jr. Member
  • **
  • Posts: 37
  • Country: br
Re: Arduino woe's
« Reply #9 on: January 26, 2012, 09:25:23 PM »
Are you using the capacitor on the reset pin? Try removing it.

firewalker

  • Sr. Member
  • ****
  • Posts: 540
  • Country: gr
Re: Arduino woe's
« Reply #10 on: January 26, 2012, 09:33:11 PM »
I you ask me, forget the Arduino boot loaders. Just write your software an make it do what you want and load it with your programmer. After that you can "play" with any arduino part.

If am correct arduino uses FTDIs RTS, DTR to reset the chip prior to programming. Many people burns the bootloader correctly and use a normal serial connection to the avr. This doesn't work.

Alexander.
Become a realist, stay a dreamer.


EEVblog

  • Administrator
  • Hero Member
  • *****
  • Posts: 4038
  • Country: au
    • EEVblog
Re: Arduino woe's
« Reply #11 on: January 26, 2012, 09:43:49 PM »
Quote
9) Used my old machine and Studio 4 to read the firmware from the actual Arduino Pro board and clone it onto my PSU board. PSU board STILL doesn't talk with Arduino IDE.
Have you programmed the config fuses ? Remember the default is for CLKDIV8 to be programmed, so a factory-fresh chip will run at 1MHz from the intrc OSC/8

The Arduino bootloader HEX ensures that is disabled.

Dave.

EEVblog

  • Administrator
  • Hero Member
  • *****
  • Posts: 4038
  • Country: au
    • EEVblog
Re: Arduino woe's
« Reply #12 on: January 26, 2012, 09:51:23 PM »
Are you using the capacitor on the reset pin? Try removing it.

That didn't initially fix it, but yes, it makes a difference.
Have got it working now. Don't ask me exactly what it was, but after eventually programming the bootloader for the 10th time, it's finally decided to work.
My PSU board now looks like an 8MHz Arduino Pro and seems to program fine now using the Arduino IDE in serial mode using the FTDI chip on the Arduino Duemilanove.
The ispMKII still doesn't work with AVR Studio 5 or the Arduino IDE/avrdude, both of which are inexcusable.

BTW, does not work with the cap to ground on reset line, and works with or without the serial cap in the reset line.

Dave.

firewalker

  • Sr. Member
  • ****
  • Posts: 540
  • Country: gr
Re: Arduino woe's
« Reply #13 on: January 26, 2012, 09:54:26 PM »
Are you going to write the code using Arduino or plain C?

Alexander.
Become a realist, stay a dreamer.


EEVblog

  • Administrator
  • Hero Member
  • *****
  • Posts: 4038
  • Country: au
    • EEVblog
Re: Arduino woe's
« Reply #14 on: January 26, 2012, 10:25:53 PM »
Are you going to write the code using Arduino or plain C?

Arduino.
Hence all the grief. Otherwise I would have just given up and went back and used AVR Studio 4 that works like I've used in the past.

Dave.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf