problem with above code is uploads perfectly and runs correctly by external power supply but at times when switched on supply pin 13 LED goes ON further program hangs,program not runs stop responding,then again have to switched OFF the external supply wait few seconds again switch ON then works smoothly,for this changed the program many times but of no use as unable to understand the reason please can anyone help is this a code problem or hardware problem.
trail and error method works some times, but I want to know is it correct,actually my code was running correctly by cable but when connected to external power supply no response from it,hence by nett searching it was fouNd that to connect 10kohm resistence to ground form RX pin,when connected it worked where as some times code hangs when switched ON further connected a loop to RX AND TX, now code is running correctly by external power supply,is the thing is correct need help
Do I understand it correctly that the code and circuit function correctly when using the USB supply but fails when you use an external supply? - Scotty
hello scotty goob evening actually the said code runs correctly by usb but it was not running by external power supply as per arduino trouble shooting blog suggested to connect 10k resistor RX pin to negative (ground),further connecting RX pin to ground the code runs correctly by external power supply but some times when switched ON external power the said code hangs,unable to find the reason still trying by trail and error method but no result need help
Thanks Kenny I am using atmega8, freeduinolite v2.0 board,yesterday uploaded the same code by clicking upload icon on compiler were as previously trails uploaded code by pressing RESET button on board then upload icon on compiler,hoping this may be the problem is this correct.Yet not tested on external power source ,lets see what happens.
Do you mean pressing reset after pressing upload? I usually do that when using a USB-ttl because then you don't need a hardware reset. This was what I did this morning. I don't own a atmega 8 but this code should just run on anything. If you think that the ttl adapter is the problem then you could always use a programmer like the heap avr tinyisp , the arduino will boot faster and you have some additional program space.
I mean to reset first then upload as I am doing previously but today I tried a different thing, that is to upload the code directly without pressing reset it's working but I want to know the correct procedure,thanks for your patience and interest to reply the post, thankyou so much.