I have a Moteino usb that gives errors when I try t upload a program to it, most of the errors involve "programmer out of sync". How can I reload the bootloader on to it?
Can I use an arduino Uno to load the bootloader via isp?
Were you having issues from the beginning or did you somehow damage/erase the bootloader?
You can use a Arduino as ISP but I always recommend using an AVR programmer like the AVR ISP MKii. If you have a RFM69 radio soldered to it you will need a 10K pullup between D10 and VCC while you program it.
I had it working once, I tried to upload the gateway sketch and this is when my problem started.
I don't have an AVR programmer but do have an Arduino uno, could you point me in the direction of some instructions as to which pins on the moteino to connect to the Uno I have the version with RFM69HW on it.
I have ordered another Moteino (without usb) to pair with my other Moteino in case I can't reprogramme the USB one.
One issue with you connecting a UNO to the Moteino is that they are different voltages. Regular moteinos are 3.3v while an Arduino is 5V. Having the RFM radio soldered on there will damage it from the 5V signals from the UNO. So that's a no go.
That's why I always recommend the AVR programmer.
If you want and can cover the postage I can reprogram it for you.
I have just found in my "box of things" a USBASP v2 which has a 10 pin IDC could I use this by connecting MOSI to pin 11, MISO to pin 12, reset to the pin marked RST, SCK to pin 13, VCC to the VIN pin on the Moteino.
The USBASP has a jumper to select 5V or 3V3 so this should be ok?
The USBASP also has TX and RX do I need to connect these to the Moteino?
If this won't work I will send it back to you to reprogram, once I receive the replacement which should hopefully be in the next few days.
Thank you for your replies so far.
Select 3V3 definitely. TX/RX are not useful if the bootloader is non responsive, I assume that's for non AVR ISP programming anyway.
Let me know your progress...
Felix
Sorry to keep asking questions but I am new to this. Would the correct command to program the bootloader be avrdude -c usbasp -p atmega328 -U flash:w:DualOtiboot_atmega328_1k_d9LED_debugOFF.hex ?
I used avrdude some time ago and I'm not 100% on the parameters but I think that looks right. If it's not it won't work at all and it will tell you.