Ard. Uno isp bootloader to an blank atm328p-pu > serial monitor shows garbage

I am a newbie, first forum post and I have hardly experience with arduino.

I bought 2 atm328p-pu (cheap) and try to program a boot loader with an uno-ver3, doing exactly as

explained by Nick Gammon http://gammon.com.au/Arduino/Atmega_Board_Detector.zip.

After running the board detector sketch http://gammon.com.au/Arduino/Atmega_Board_Detector.zip

The serial monitor shows a lot of garbage.

I checked several times all connections and measured all with multimeter, all connections OK.

I have tried three different possibilities for the clock freq. (as explained): no result.

I (even :P) disconnected the rx tx pins: ser.mon. shows only 2 digits.

I tried both ic-s with the same result, but now I'm beginning to believe that the ic-s are broken...

What can I do to get any further?

Are you saying nick's code is displaying non readable characters?

I look through that code the other day since I was having trouble... Did it atleast print out "Atmega chip detector." as the first line?

Yes, it is giving out only garbage, and no, no normal characters

If you're not seeing the first line, I think something is going wrong in the detector sketch. You should see text as the detector. The code just does basic Serial.print and println to show the values.

How are you slowing down the detector? You're only messing with this line correct: "SPI.setClockDivider(SPI_CLOCK_DIV64)"

I think 64 should be more then enough but 128 is the slowest it'll go.

After running the board detector sketch http://gammon.com.au/Arduino/Atmega_Board_Detector.zip

The serial monitor shows a lot of garbage.

Did you make sure the baud rate value for the serial monitor (lower right menu) is set to the same value as Nick's board detector sketch is using?

The serial data comes from the board running the sketch not the target being interrogated.

Lefty

Ohw Jee, sorry but I have no experience with (any) forum and only a little with English, so excuse
my mistakes.

Answer to Ikazone:
How are you slowing down the detector? You're only messing with this line correct: "SPI.setClockDivider(SPI_CLOCK_DIV64)"

I am just doing what Nick tells me to :slight_smile: , but I dont know what I am doing.. So I dont understand this, Sorry

Answer to Lefty:
Did you make sure the baud rate value for the serial monitor (lower right menu) is set to the same value as Nick's board detector sketch is using?

OK, This I understand, but where do I find those values? Lower right menu, where?
Will You please guide me here?

Bob

Yes! Yes I found it XD. I was searching and looking for days now.... everywhere but in the serial monitor itself.

I used the serial monitor before in several sketches, it always worked fine without changing anything.

Thanks very mutch for your reactions.

Bob

bobbele:
Yes! Yes I found it XD. I was searching and looking for days now.... everywhere but in the serial monitor itself.

I used the serial monitor before in several sketches, it always worked fine without changing anything.

Thanks very mutch for your reactions.

Bob

Every running sketch using the serial USB will have a Serial.begin(xxxx); statement usually in it's setup function, where xxxx is the baud rate the sketch will be using when communicating to and from the PC.

The serial monitor of the IDE has no way of knowing what value the sketch is using so it's up to the user to tell the serial monitor what baud rate to use. The serial monitor will 'remember' whatever value you last set it at when you run it again, but that might not be correct of the next (different) sketch you upload and run.

Lefty