Arduino 1.8.5 not uploading to my Moteino (8MHz) [solved]

Started by fel, February 20, 2018, 08:57:06 PM

fel

I have a new Moteino (8MHz) (no radio or flash) and FTDI adapter and am unable to upload a program.  The Moteino core is uploaded in Arduino. The port is correct. For the "Board" I tried the Moteino (8MHz) and then Arduino Uno. I have tried to run a default (nothing) program and I have tried the DeepSleep but neither appears to upload. "Board info" says 0403. The RX light turns on and off a few times and then after a while the program says "Programmer is not responding". The red light on the Moteino blinks the whole time. Is there a particular sequence for plugging in and uploading, or a particular way to reset it, or does it need a particular cable? Should I attempt to burn the Bootloader? I have reviewed the instruction page twice and looked at the forums and have tried different USB ports/cables. I have not made any changes to either component.
Thanks.

Felix

You definitely need the "Moteino (8Mhz)" board to upload.

Two Qs:
1) What programmer are you using?
2) Is that same programmer able to upload to a regular Moteino (if you have one)?

fel

#2
Thanks for the quick reply/support. I found my issue was the delay between pressing Upload and reseting the Moteino. Using Arduino 1.8.5 I get about a 2 second delay between pressing upload and the "RX" light turning on. Apparently you have to reset a split second before the RX light turns on. The RX light has 3 short pulses (ideally reset the Moteino at this time or slightly before), and then maybe 9 widely spaced pulses when it is harder to coordinate the reset.
It might be useful for beginners to add a note in the moteino programming page. ie: Since the time between pressing "Upload" and when the FTDI transmits to the Moteino may vary, ensure that you reset (touch RST pin to GND) right before the RX light on the FTDI turns on (you may have to try more than once). The upload should be successful if both TX and RX blink rapidly. Also, under "All about Moteino" the "Programming and libraries" page in one location it says to use "Arduino uno" for "Tools>Boards," that was why I was unsure if I was using the wrong board.

perky

I don't think resetting the Moteino is necessary, the Moteino has a capacitor between the DTR# signal on the FTDI header and RST, and the Arduino IDE should be using the 'wiring' programmer type which pulses DTR# before programming. Have you got DTR# connected? It seems you're using the Arduino IDE so presumably not using AVRDude independently (if you are try connecting DTR# on pin 6 of the FTDI header and using '-c wiring' for the programmer type).

Mark.

Felix

fel,
As Mark mentioned - the manual RESET should not be necessary, but still waiting for the answers to my 2 questions to get the full picture of what you're doing.

fel

Ok. I do not see a "wiring" programmer under "Tools->Programmer". I tried a few different options under "Tools->programmer," but it does the same thing. When I upload I am not using the option "upload using programmer," if that makes any difference.
I am not using AVRDude, I simply downloaded Arduino 1.8.5. The default FTDI DTR selection is still connected and the DTR solder joints looks good.
I do not have another Moteino.

perky

The Arduino IDE uses AVRDude under the hood, and usually uses '-c wiring' in the command parameters for it (or it might be -c arduino for the Moteino as the bootloader is optiboot based, same as the Uno. Unsure). So you are using AVRDude when uploading via the IDE even when uploading via the bootloader.

So are you using an FTDI USB to TTL cable with a USB connector on one end and a 6 way header socket on the other, or do you have a USB FTDI adapter board? If the latter, are you sure DTR# is wired to pin 6 of the socket header? (some of those allow you to select different signals via jumpers).

Mark.

fel

It is the board (https://lowpowerlab.com/shop/product/90?search=ftdi), which should have DTR option connected (the other being RTS), DTR is the default and the trace looks intact. I do see the avrdude comments when I try to upload, but am unsure how to confirm "-c wiring".

perky

According to this, RTS is the default and you need to cut a track and add a solder blob to select DTR:
https://lowpowerlab.com/shop/product/90?search=ftdi

I think it might be '-c arduino' rather than '-c wiring', but you can find out from this post:
https://forum.arduino.cc/index.php?topic=46923.0

Mark.

Felix

Something like the FTDI-Adapter in the shop will work with only 1 minor change - you need to ensure you give 3.3v to the Moteino-8Mhz (when you have a radio module and/or FLASH-MEM on it), and you accomplish this by cutting and soldering the output voltage jumper on the bottom of the FTDI-Adapter board (to select 3.3V instead of 5V).



Quote from: perky on February 23, 2018, 06:05:21 AM
According to this, RTS is the default and you need to cut a track and add a solder blob to select DTR:
https://lowpowerlab.com/shop/product/90?search=ftdi
Actually that's an old photo that needs to be replaced, the R2 and current R3 revision has DTR as default.
The Moteino-8Mhz guide page also shows another way to make a 3.3v FTDI programmer adapter for it, to ensure 3.3V to the board.


fel

Thanks for the help, it is working now. I switched the FTDI to 3.3V Output, although I don't have an added radio nor the added flash (I assume those instructions are only intended for additional flash).
Apparently on arduino 1.8.5 you can change to verbose by going to File->Preferences->Settings->"Show verbose output during:". Or, you could alter the preferences.txt files, but one of them warns you not to modify it. This one should work: C:\Users\XXXX\AppData\Local\Arduino15\preferences.txt. Verbose shows arduino for programmer (or -c arduino).