Abdellazizhammami / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Fault signalling #746

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Defective LCD
2. simple TWO line LCD code

 lcd.setCursor(0,0);      
  lcd.print("Line One");
  lcd.setCursor(0,1);       
  lcd.print("Line Two !!!");  //code hangs here forever......

What is the expected output? 
The messages displayed on the LCD

What do you see instead?
Do not expect it to cause "uploading error"
avrdude: stk500v2_ReceiveMessage(): timeout

There needs to be a settling 'delay' between the uploading and the running code 
initially.
I spent several hours looking for the cause of the "avrdude: 
stk500v2_ReceiveMessage(): timeout" (damaged cable, faulty connections, burned 
out  mega pins, defective  usb library)

When in reality the cause was the fact that the LCD went defective, (I strongly 
suspect that something in the library caused this, because it was between two 
uploads )

It appears the LCD library accepts the first line of LCD text, but then 
internally it is waiting for the LCD non-busy flag to clear , but because this 
does to happen the second line of text causes the library to hang.
Which in turn causes the  "avrdude: stk500v2_ReceiveMessage(): timeout" 
message, since the time between uploading and launching is not enough time to 
finish off notifying the computer that the upload task finished.

What version of the Arduino software are you using?
1.0 
On what operating system?
ALL

 Which Arduino board are you using?
MEGA 2560 V2

I'm not suggesting that we cover every eventuality with defective hardware, but 
rather that the  'uploading' is correctly notified to the computer BEFORE the 
user code is entered.

Original issue reported on code.google.com by practica...@gmail.com on 11 Dec 2011 at 4:19

GoogleCodeExporter commented 8 years ago
This can be CLOSED....
it is a fault in the Arduino  bootloader, triggered by the "!!!" in the print 
statement

Original comment by practica...@gmail.com on 12 Dec 2011 at 3:09

GoogleCodeExporter commented 8 years ago

Original comment by dmel...@gmail.com on 13 Dec 2011 at 3:48