Go Down

Topic: Ard. Uno isp bootloader to an blank atm328p-pu > serial monitor shows garbage (Read 654 times) previous topic - next topic

bobbele

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?


Ikazone

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?

bobbele

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

Ikazone

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.

retrolefty

Quote
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

bobbele

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 :) , but I don`t know what I am doing..
So I don`t 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


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



retrolefty


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

Go Up