T
treez
Guest
Hello,
Please help explain why our software engineer has programmed our PIC16F18856 microcontroller to write to its EEPROM for 15 seconds continuously when it only needed 5ms to do this?
As you know, since it should only take 5ms to write to EEPROM (Pg 611 of datasheet says so), this means he has done 2999 EEPROM writes which he did not need to do. As such, we are concerned that every time he is writing a byte to EEPROM he is actually doing it 3000 times, instead of just once. –As you know, after so many EEPROM writes, a microcontroller EEPROM dies. It looks to me that he has been deliberately trying to kill our microcontroller in our lamp, and thus bring the lamp’s life to a premature end.
The lamp periodically stores ambient light readings into microcontroller EEPROM. (These light readings are obtained through the micro’s ADC after reading a SFH5711 light sensor). The readings are taken several times per day…..once every 15 minutes.
We are actually concerned because we only discovered that he was doing this 15 seconds worth of EEPROM writes when we realised that the microcontroller consumed over 5mA for the first 15 seconds after being switched ON. If we hadn’t have noticed this and challenged the software guy about this, it would never have come to be known what was actually going on. After being switched ON, the lamp should just take one light reading and store it to EEPROM.....this should take only 5ms, not 15 seconds. Another point is that the micro is fed by a linear regulator which feeds off rectified mains, so this heavy writing to EEPROM is overheating the linear regulator that supplies the micro.
For all we know, the lamp may, at some time in the future , embark on continuous EEPROM writes, which would kill the lamp……he has obviously no control over what he is doing with EEPROM writes…unless of course he is deliberately trying to destroy our company…what do you think?
PIC16F18856 datasheet
https://ww1.microchip.com/downloads/en/DeviceDoc/40001824B.pdf
Please help explain why our software engineer has programmed our PIC16F18856 microcontroller to write to its EEPROM for 15 seconds continuously when it only needed 5ms to do this?
As you know, since it should only take 5ms to write to EEPROM (Pg 611 of datasheet says so), this means he has done 2999 EEPROM writes which he did not need to do. As such, we are concerned that every time he is writing a byte to EEPROM he is actually doing it 3000 times, instead of just once. –As you know, after so many EEPROM writes, a microcontroller EEPROM dies. It looks to me that he has been deliberately trying to kill our microcontroller in our lamp, and thus bring the lamp’s life to a premature end.
The lamp periodically stores ambient light readings into microcontroller EEPROM. (These light readings are obtained through the micro’s ADC after reading a SFH5711 light sensor). The readings are taken several times per day…..once every 15 minutes.
We are actually concerned because we only discovered that he was doing this 15 seconds worth of EEPROM writes when we realised that the microcontroller consumed over 5mA for the first 15 seconds after being switched ON. If we hadn’t have noticed this and challenged the software guy about this, it would never have come to be known what was actually going on. After being switched ON, the lamp should just take one light reading and store it to EEPROM.....this should take only 5ms, not 15 seconds. Another point is that the micro is fed by a linear regulator which feeds off rectified mains, so this heavy writing to EEPROM is overheating the linear regulator that supplies the micro.
For all we know, the lamp may, at some time in the future , embark on continuous EEPROM writes, which would kill the lamp……he has obviously no control over what he is doing with EEPROM writes…unless of course he is deliberately trying to destroy our company…what do you think?
PIC16F18856 datasheet
https://ww1.microchip.com/downloads/en/DeviceDoc/40001824B.pdf
Last edited by a moderator: