Go Down

Topic: Standalone Arduino - Does not like to take sketch (Read 667 times) previous topic - next topic

anishkgt

Jan 20, 2018, 07:50 am Last Edit: Jan 20, 2018, 07:52 am by anishkgt
Hi All,

I've just got my board fabricated, excited as i was to see it i started to solder all the components using a ceramic hotplate and it turned out to be good. All well and looking good.

So once that was done i've installed the Atmega328 board from board manager by MiniCore and then uploaded the Boot loader on the new Atmega328 with that done who knew it would not take sketch's. I uploaded the first sketch and it seems this chip does not like to take any Sketch, error code as follows
Quote
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\georget\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.4/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
avrdude: stk500_recv(): programmer is not responding
         Hardware Version: 3
         Firmware Version: 0.2

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
         Vtarget         : 420030.5 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9514 (probably m328)
avrdude: reading input file "C:\Users\georget\AppData\Local\Temp\arduino_build_451336/SPWv3_MCU.ino.hex"
avrdude: writing flash (16680 bytes):

Writing | avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
So what i had done so far ?
I've rechecked all the routes checked for continuity and all were well. checked the voltage at the Atmega328 and it was 4.9v. So what could it be, i checked continuity of the Tx and Rx routes and that turned out to be ok as well. I did not have a 22R resistor for the Tx and Rx so would be the problem ? Well  i managed to upload the sketch once or twice and latter it stopped.

Then i replaced the Atmega with another one, hoping this would work but no no it would not either. I going nuts over this project and cannot move froward stuck with this sketch not uploading issue.






I had the similar issue where one pin would not go high when using the PINMode(Buttonpin, INPUT_PULLUP) so that was resolved once i had uploaded the boot loader again.

So what would be this issue ? Are these models of the Atmega328 not meant for use with Arduino ? or would it be a fuse setting that was incorparated by MiniCore ? i am sure i've not played around with them for sure.

Appreciate any help on this.

anishkgt


wilykat

Error code suggests it's having trouble with communication.  How are you connecting, serial? I'd recheck that there isn't bad solder on serial pins to your serial device and there isn't any bad wire or something. I'd do the loopback test to be sure the serial device is working right.

Also check for internal pullup on the serial pin, if it's enabled try disabling them.

anishkgt

Thank you wilykat. Appreciate it.

I will get that checked as soon as i get my hands on it. It was something i did not check for continuity earlier. Hopefully it should be it.

anishkgt

Error code suggests it's having trouble with communication.  How are you connecting, serial? I'd recheck that there isn't bad solder on serial pins to your serial device and there isn't any bad wire or something. I'd do the loopback test to be sure the serial device is working right.

Also check for internal pullup on the serial pin, if it's enabled try disabling them.
I am using Arduino to upload the sketch by removing the on-board chip and connecting Rx to Tx of the Standalone and similarly Tx to Rx.

The loopback test has passed in fact i am able to upload the sketch to the onboard IC.

anishkgt

and i get this error as well, normally this would be because the Rx and Tx pins connected wrong but i checked that also.

Quote
vrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\georget\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.4/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x3e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x3e
avrdude: stk500_recv(): programmer is not responding

sterretje

I am using Arduino to upload the sketch by removing the on-board chip and connecting Rx to Tx of the Standalone and similarly Tx to Rx.
I think you forgot to connect the reset line of your dedicated board.

To activate the bootloader in the 328P, you need to pulse the reset line. See the schematic of e.g. the Uno where the DTR output of the 16U2 is used to do this.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

anishkgt

Though i forgot to mention it here, i have the reset pin of the standalone board connected to Reset on the Arduino.

spycatcher2k

upload it with the ICSP header using your programmer.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

anishkgt

Just did that too and no luck. This is my Second chip thinking my first one was bad.

Quote
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03

wilykat

Are decoupling capacitors present on VCC to GND near the chip's VCC pin?  Without those caps, the voltage rail can ripple a bit and cause the chip to become a bit finicky.

I'd recheck for bad solder join on the Rx, Tx, reset, and all VCC and GND pins.

anishkgt

Are decoupling capacitors present on VCC to GND near the chip's VCC pin?  Without those caps, the voltage rail can ripple a bit and cause the chip to become a bit finicky.

I'd recheck for bad solder join on the Rx, Tx, reset, and all VCC and GND pins.
Yes they do have decoupling caps 0.1uf to GND on Pin VCC and AVCC

kprims

I am using Arduino to upload the sketch by removing the on-board chip and connecting Rx to Tx of the Standalone and similarly Tx to Rx.

The loopback test has passed in fact i am able to upload the sketch to the onboard IC.
Try Rx to Rx and Tx to Tx  when using the Arduino  after you are sure you have the chip bootloaded.

anishkgt

Thanks tried that as well. It looks like the MUC does not seem to be responding for some reason.

anishkgt

#14
Jan 21, 2018, 08:10 pm Last Edit: Jan 21, 2018, 08:57 pm by anishkgt
after a while on this forum, i've figured it was the wrong routing that had gave me so much of trouble.

Earlier i did not bother testing the Serial communication as the On-USB was working now when that failed i had to check it and found that the CP2102N and the Serial interface cannot have the connections in parallel. So removed the CP2102N and all working ok.

Go Up