atmega328p au - no connection - how to test to figure out what is wrong

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

FIXED.
After checking design on the breakout board, I concluded that for some reason atmegas were not responsive.  (not even with external crstal). After getting access to new batch of working atmegas, that I double checked with https://www.adafruit.com/product... I resosoldered them and design works now.

-----------------------------------------------
I am new to the electronics world. I try to build boards described in this project http://owhl.org/electronics-buil.... (CPU board).
I have bought ATMEGA328p AU microchips from 2 different suppliers (since there are some fake atmegas) and I assembled 3 different boards - making sure its done well.
I connect to the chip using ISP serial port and I checked connectivity between ISP header pins and atmega pins (all tests passed).
The atmegas should be - bare metal (without bootloader).
However when I was trying read the chip signature using avr dude - and usb tiny  I keep on getting same error on 3 boards: 

 

The setup is: assembled board with atmega -> isp port -> isp port on usb tiny -> usb port on my lapotop
 

 
 
 anna:~/$ /home/anna/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/anna/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf - -v -patmega328p -usbtiny

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

         System wide configuration file is "/home/anna/Downloads/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/anna/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 001:008
         AVR Part                      : ATmega328P
         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 : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbt...
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.
 

 

I already experimented with different programmers. Thye work so the problem is not in the programmer. I have measured voltage on isp header on my board (there is power).

Assuming the design is correct and beside buying fake atmega - what could get wrong? 

*I did already comparisions of marking and visual inspections, that is also why i bought atmeags from different suppliers - one of them was Heisner electronics.

Possible tests to do:
1) check atmega clock pin using oscilloscope (but in some michrochips) it is dissabled

2) check miso/mosi pin using osciloscope - since it should generate 

 

Do you have some other ideas what should I check to understand why I cannot connect?

Thanks

Last Edited: Mon. Apr 18, 2022 - 05:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please note that the Mega range of chips are not UC3 type, moving to AVR forum.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use a slower ISP speed, one of the AVRDude freaks can help you with that....

 

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did it, change nothing. (checked all possible speeds)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Open Wave Height Logger clocks the mega328P at 32 KHz (power by three D cells); therefore, a very slow ISP.

OWHL/OWHL_CPU_disc_RevC.pdf at master · millerlp/OWHL · GitHub

 

edit :

Materials List | Open Wave Height Logger

 

edit : OWHL is at internal 8 MHz once fuses are programmed then a reset.

3. Programming Newly Assembled OWHL Boards | Open Wave Height Logger

[near top]

OWHLatmega328.bootloader.low_fuses=0xE2 OWHLatmega328.bootloader.high_fuses=0xDA OWHLatmega328.bootloader.extended_fuses=0x05

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sun. Apr 10, 2022 - 02:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look the problem is there is no connection to Atmega. Not even if I set baud rade to the smallest possible: 300. I cannot read signature that is a a problem. And I did those tests with atmega from 4 different supliers, on the printed board as well as on breakboard. 
I did REALLY checked all the "obvious" hints, not once, but multiple times. Not just me, also asked more experienced ppl to check my work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome ... and cool project!

anna_oslo wrote:
I have bought ATMEGA328p AU microchips from 2 different suppliers
The AVRe+ logjam apparently won't begin to break until late this year; some AVRxt are restocked earlier (mega3208)

anna_oslo wrote:
I already experimented with different programmers.
Some AVR programmers generate a clock signal (STK500)

anna_oslo wrote:
what could get wrong? 
Power and/or clock (minimally essential for digital are stable power and clock within a stated frequency range, sufficient amplitude, and relatively low phase noise [jitter])

anna_oslo wrote:
2) check miso/mosi pin using osciloscope
Logic analyzer is easier; an oscilloscope for verifying power stability, frequency, amplitude, phase noise, rise and fall times, setup and hold times.

 


Lead Time | World's Largest Inventory of Microchip Products

ATmega328P | Octopart

 

Pololu - 5.10. Using the clock output to revive AVRs

via

Pololu USB AVR Programmer v2.1 (STK500v2)

AVR STK500 User Guide

Atmel STK500 Schematic | Wayback Machine

STK500 | Microchip Technology

 

libsigrokdecode/decoders/avr_isp at master · sigrokproject/libsigrokdecode · GitHub

due to

Protocol decoders - sigrok

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok.
The programmer I use I assume is ok because it was seeing/connecting to atmega on the arduino board. 
In addition I added external crystal to the breakout board setup:
https://photos.app.goo.gl/Rqhrph...

It changed nothing.

I also checked all the SPI connections/channels using oscilosope (with measuring on the ISP header and directly on atmega leg). While rst, gnd, vcc were ok ,the main differenc was mosi and sck.

https://docs.google.com/document...

I will read your links, need to educate myself a bit more, at the moment I am not sure i understood everything.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Worth double checking your hardware against this tutorial of mine...

 

https://www.avrfreaks.net/forum/...

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you, Its different from my design i could follow it if only I could decipher it...
RST  - 10nF *nano farads?
SCK, MISO, MOSI - 4k7?????

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anna_oslo wrote:

RST  - 10nF *nano farads?

 

Yes. It's not absolutely necessary but for any situation where the layout is less than optimal it keeps noise off the RESET line.

 

anna_oslo wrote:

SCK, MISO, MOSI - 4k7?????

 

Only needed if you have anything else connected to those pins.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have measured voltage on isp header on my board (there is power).

Are you actually supplying power?  From where, exactly?   Don't be fooled by backfeeding from some logic pins, it won't work.

 

Maybe get yourself an actual Atmel/Microchip programmer.  One less thing to worry about & investigate.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sun. Apr 10, 2022 - 04:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

Can you please post a schematic of YOUR project, with special attention to your ISP programming pins and the programming header.

 

Can you also post a photo of one of your boards and the programmer.

 

Do you have a $2.50 USD Arduino Nano, (or whatever), to use to test your programmer and make sure that that part of your setup is 100% functional?

 

To post photos use the Mountain Range icon, 3 to the left of the smilie face icon.

 

JC

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To post photos use the Mountain Range icon, 3 to the left of the smilie face icon.

 

You can also use CTRL+V (paste) from many (not all) browsers.  This is handy for things like the screenshot snipping tool, where you don't even have an actual file.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Powe is double, triple and nx times checked. The programmer is poviding power to the atmega. Checked using multimeter and even osciloscpe. Solid 5v, Checked on all VCC pins.