2017-12-20 12:58 AM
Hello
I have developed a timer cum frequency meter using STM8S003F3P6 microcontroller. Interfacing a LCD to show the frequency and time. And also reading a remote switch (PLC realy switch), accordingly controlling(switching) an external driver board of a generator.But the source code inside the micro controller is corrupting after several cycles of switching and the system becomes dead.
After reprogramming the micro controller the system works normally.
Please guide me.... what could be the issue here?
programmer level fault or hardware level fault or any other ?what I have to do to resolve this issue?
2017-12-20 03:25 AM
My first guess would be a software bug, writing through uninitialized pointers.
Philipp
2017-12-21 11:05 PM
Thank you Philipp
But I have checked the same code by switching with a manual switch (instead of PLC relay switch) so many times at the time no problem occurring.
go through the attached file which is for PLC input to microcontroller.
________________ Attachments : plc ckt.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy4o&d=%2Fa%2F0X0000000b4r%2F4OTPCakTC0QPCMookTB42qYGR68yUt5XuzCwalIJr4Q&asPdf=false2018-01-03 02:31 AM
Based on your latest experiment, you are dealing with electromagnetic interference in the equipment. Try to improve the quality of blocking high-frequency interference in power supply circuits.