I'd put a 'delayMicroseconds(50)' between those to ensure there's a full ramp-up to Vcc on that signal pin. Otherwise, at 16 MHz, the falling edge may happen already partway through the rising edge of the signal depending on the physical properties of the line.
Yes! It is very vital consideration. I am editing the post.
![]()
The 50uS is arbitrary of course, as you know. I think it would work reliably already at 4 (the minimum period at which delayMicroseconds works).
My test run of Post-40 had continued for 3 hrs without trouble.
I have no doubt it did, but that's on your hardware in that particular setup. If someone would try the same thing and their wire happens to be a bit longer, the power supply to their Arduinos a bit weaker or whatever other fringe condition is different, they may get into trouble.
Then again, I may be pessimistic ![]()
Yes! The test result may vary widely depending on the physical setup. In addition, there could be some logical errors in the codes that can only be detected through a long time test. My setup of Post-40 intially worked for few seconds and then hanged. I was lucky to observe that the the fault repeated. I discovered through physical scanning of the sketch that at the Master side, there was no code to reset the array index after the 1st pass. I corrected the error and then the sketch started normal functioning.
As the @muhit114474 is reporting that his system hangs working for a while, he is advised to scrutinize his sketches if there are any logical errors.
Thanks for your advise..... ![]()
I will scrutinize my codes to find out any logical errors.
After few weeks I decide to change my Arduino UNO with other one which has more memory and also less cost Like UNO. Then I found Atmega128 microcontroller. It was amazing for me when I shift to Atmega128. My device is working without any problem.
Summary of the solution: The RAM and also the sketch memory of UNO was almost full and that's why the system was hanged .
Atmega128 is a powerful (RAM-4KB,Flash-128KB,EEPROM-4KB) but low cost (Around 2$) microcontroller which solved my problem.
Which Arduino Board does contain ATmega128 MCU? (Please, post the picture.) If not, how are you going to debug your application?
Basically there is no official arduino board that contain Atmega128. I use an undressed Atmega128 MCU with minimum circuit.
I bought this Atmega128 and SMD to DIP from a local market and soldered them together.
And then I burn the chip with USBasp. That's it.
Interesting! You can not debug your application. The whole purpose of the Arduino Forum and Arduino Borads are to help people learning the MCU hardware and programming and not to acquire the ability of designing commercial gadgets which is the job of the design houses having seasoned Engineers, Programmers, Tools, and Experiences.
One problem with that - how do you solder the bypass capacitors directly across the chip Vcc and ground?
Brother @GolamMostafa, What do you mean by this? I can't understand your above speech. Please let me clear.
Do you mean I am trying to make a commercial gadgets with help of this forum?
Basically I am an under graduate student of a university. My teacher gave me a project and he advised me to do something which is not exist and also will help the people.
So I decide to do this. Because I think there was no gadgets like this one . And also it will help the Muslim people Insha'Allah.
When I will finished this, Insha'Allah I will give some copy to my nearest mosque and people for totally free.
But as I am not a rich man so it is quite impossible to give this gadgets to all of the mosque of my country and people.
In this situation if people wants this gadgets they can collect this from me at a cost (which is needed to build it).
For this I also trying to build it at low cost as can it possible.
And if it is illegal to ask for designing commercial gadgets like this one I am sorry for that.
Thanks to all for helping me.
You started with Arduino UNO which is the popular learning Kit in the Arduino Forum. You could optimize your codes to a great extent and could manage your project running in the UNO. As a result, the users of UNO would be greatly benefitted.
You could also use Arduino MEGA (another popular Kit for the Arduino Users) instead, which has the following memory spectrum (Fig-1) including debug facilities as it could be operated using Arduino IDE.

Figure-1:
I put them on a breadboard and then connect with wire between the capacitor's and the chip.
But when I build it as a finished product I will design a pcb for it.
How much will be the cost in your local currency and in U$ including the shipping?
Yes, I think it is possible to optimize the code. But as I am a newbie, it is quite difficult to optimize the code which will allow me to continue it in Arduino UNO.
And I think it is better to merge my two (UNO and pro mini) code in a single board. So it will good to manage the code and circuit and also cost effective too.
So that I don't need to send data via I2C communication for two Arduino. Only need I2C communication for RTC only.
Yes, I also do this. But the price of Arduino MEGA is much than the Atmega128.
The ATmega128 is also operated using Arduino IDE. You may be happy to hearing that I program Atmega128 with Arduino IDE.
It depends on country or location. What is your location? When I complete it, I will give you a copy without any cost Insha'Allah. Because you help me a lot from the beginning.
Thank you my brother @GolamMostafa for your continuous help and advise.
I have no problems with you using the atmega128, although that was unexpected. It is much better to run everything on a single cpu. The atmega2560 used in the arduino mega is available at lower cost on a smaller board, but you had seemed to reject using a more capable processor.
There should be no need for the external EEPROM now, simplifying the design.
Yes I will remove the EEPROM soon. Because now I have 4KB of internal EEPROM. That's enough for my project.
After finishing the project I will able to say how much the cost. But think it is not more than 1000 Taka in my local currency and not more than 12$ in US dollar.
