Go Down

Topic: Loop Back Test - Sticky? (Read 36243 times) previous topic - next topic

madworm

If all of these boards used to work at some point, I'd try analyzing what you did to them. And if you find a common 'thing' (can't think of a better word right now), stop doing that.
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

mmcp42

just tried the instructions, just for fun
seemed clear enough to me
oh - and got the expected result

didn't seem patronising (until I read this thread!)
could be idiot-proof
trouble is they outnumber us already and they're breeding like rabbits
[/soapbox]
:)
there are only 10 types of people
them that understands binary
and them that doesn't

kkinney

Great documentation!!!  (And I regularly read IBM mainframe docs.)
I followed the instructions and it behaved exactly as expected; a text version of ping.

I strung together some code to do the same thing.  The problem is all I get back is rectangles under the serial monitor.  Can you think of something to account for that?
Here's my code -
Quote

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
}

void loop() {
    if (Serial.available() > 0) {
      Serial.println(Serial.read());             
    }
  }
}




Any help would be appreciated.

Regards,
kk

retrolefty


Great documentation!!!  (And I regularly read IBM mainframe docs.)
I followed the instructions and it behaved exactly as expected; a text version of ping.

I strung together some code to do the same thing.  The problem is all I get back is rectangles under the serial monitor.  Can you think of something to account for that?
Here's my code -
Quote

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
}

void loop() {
    if (Serial.available() > 0) {
      Serial.println(Serial.read());             
    }
  }
}




Any help would be appreciated.

Regards,
kk


Be sure the serial monitor is set to the same baudrate that your sketch is using (9600) in your case. The selection is done at the bottom right of the serial monitor window when it's opened.

Lefty


kkinney

I've set it to a matching baud rate with the similar results.

I found a port monitor and sent it a string of 'a's.  Here's what the monitor saw-
Port opened by process "javaw.exe" (PID: 6424)

Request: 2/23/2012 7:14:25 AM.52364 (+180.2188 seconds)

61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61   aaaaaaaaaaaaaaaa
61 61 61 61 0D 0A                                 aaaa..         

Answer: 2/23/2012 7:14:25 AM.53864 (+0.0156 seconds)

39 37 0D 0A 39 37 0D 0A 39 37 0D 0A 39 37 0D 0A   97..97..97..97..
39 37 0D 0A 39 37 0D 0A 39 37 0D 0A 39 37 0D 0A   97..97..97..97..
39 37 0D 0A 39 37 0D 0A 39 37 0D 0A 39 37 0D 0A   97..97..97..97..
39 37 0D 0A 39 37 0D 0A 39 37 0D 0A 39 37 0D 0A   97..97..97..97..
39 37 0D 0A 39 37 0D 0A 39 37 0D 0A 39 37 0D 0A   97..97..97..97..
31 33 0D 0A 31 30 0D 0A                           13..10..


Ideas anyone?

PaulS

Perhaps a peak at an ascii table (http://www.asciitable.com/) might shed some light.

kkinney

Thank you for the tip on ASCII chart. (Personally, I bleed EBCDIC.)

After seeing 'a'=97, I tried all println formats.  BYTE has been dropped, but the compiler pointed me in the right direction.  This is the code that works -
      int crap = Serial.read();
      Serial.write(crap);             


Thank you for the assist,
kk

dannycelluk

I recently bought a Arduino Mega 2560.

Everything appeared to be working fine to start with, I managed to blink LED's and show temperature in the serial monitor etc.

The latest thing i have tried to do was to show text on an LCD. The Text was really dull even with the POT turned up and down.

Now when i connect my Arduino to the USB cable it does not show up in the Arduino software.

Mega 2560 is selected in the board options, but the port is blanked out, as if the pc cannot see the board.

I have tried different ports and the cable is brand new, and work to start with.

I have trioed pressing the Reset button which also does nto appear to work. I have tested the voltages on the power pins and they all seem fine. neither tx or rx LED illuminate but the power LED does.

PC does not see board during loop back test

Any ideas?

Thanks

Dan

jobaum

My uno suddenly stoped working.. im afraid I may have touched two wires that shouldn't have while working with it last night. Power light comes on, but the other lights dont blink like they normally would when turning on and dont do anythign while trying upload to the board... I keep getting the error "programmer not responding". My computer detects the USB and so does the arduino program... but when i tried the loop test it failed to echo back the text.... have not tried another ocmputer yet, but I tried my MEGA board on the same ocmputer and it works fine...

WTF!?

madworm

No no, not WTF but "cause and consequence".

Your problem is easily solved by throwing some money at it (get a new one).

BTW, did you remove the chip before trying the loop-back test?
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

jobaum

haha I know I know, but spending money is last result!

and remove what chip? My arduino uno doesnt have any removable chips (that i know of).

madworm

So you have the all-SMD version. Tough luck.
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!


istanto

mau tanyak scrip untuk mengoneksi arduino uno atg328 gmn yaaa?

Nick Gammon

This *is* the English language part of the forum.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up