![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Userrr
Joined: 09 Jul 2004 Posts: 40 Location: Europe
|
LVD or maybe supervisory |
Posted: Fri Nov 26, 2004 11:33 pm |
|
|
I write in EEPROM 4byte just when POWER down
But sometimes -it write correct, sometime not.
Please answ. how long time it write (4byte) to EEPROM at
20MHz
10MHz
4MHz
Doe's anyone know LDO regulators with internal supervisory
(maybe fault external) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Sat Nov 27, 2004 5:34 am |
|
|
Are you talking about the internal EEPROM, or an external chip?. What processor (there are slight differences between the write times on some older chips). The cycle time of the internal EEPROM (of most EEPROMs), is independant of the clock rate (the clock rate, would affect the transfer time needed for an external chip). It is shown in the chip's data sheet, under 'electrical characteristics', then the section marked 'memory programming requirements'. A typical value for a single write, is 4mSec. Remember also that the voltage must stay high enough to complete the write. For the data EEPROM, this is normally the Vmin for the chip, but for the program EEPROM, it is often much higher...
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
Userr Guest
|
I |
Posted: Sun Nov 28, 2004 5:06 am |
|
|
Internal EEPROM with PIC18F without x4 PLL |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Sun Nov 28, 2004 6:07 am |
|
|
So you need the supply to remain above Vmin, for 16mSec,
I have done this myself on several occasions with no problems. Generally though, I detect the supply 'feeding' the board regulator, using a LDO 5v regulator, using say a 10v unregulated feed, and sending the power 'warning', if the voltage falls below 7v, with a 1000uF capacitor on the incoming rail, and with the code in the handler set to disable all peripherals, then gives about 40mA for the chip, 1mA extra for the regulator, and a couple of mA for other items on the board. Taking 50mA as a 'safe' figure for the total power requirement, the capacitor discharges at 0.1sec/volt, giving 0.15 seconds to complete the task before failure (most LDO regulators will work down to about 0.5v drop). Nearly a factor of '10' in hand. Remember that the code, should end up checking the input, and restart the main program if the supply goes 'good' again, to handle the 'brownout' situation (where the supply drops, but then returns). If though you detect on the 5v rail itself, and detect at 4.5v, then the rail can only fall by 0.3v, before the minimum voltage is reached (4.2v required on a 18F). Using the same 1000uF capacitor, will only give 30mSec of 'hold time', provided you can reduce the consumption this far. Given the larger tolerances on most electrolytic capacitors (typicall -25%), there is not then much margin.
You need to work out the consumption during the handler routine, ways to minimise this, and how long you have with your detector, and supply.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Sun Nov 28, 2004 6:16 am |
|
|
Posted with the wrong capacitor value. 50000uF, not 1000uF. On 1000uF the discharge rate for 50ma, is 0.02secs/volt. OK for the 'incoming supply' version (gives 30mSec to fall by 1.5v), but on the version with the capacitor on the outgoing rail, to maintain the supply for 16mSec (and a little extra), using the 0.3v allowable drop, requires 4700uF...
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
Userr Guest
|
M |
Posted: Sun Nov 28, 2004 12:00 pm |
|
|
Thanks a lot
my Pic use 7-segments leds with common catode and it use almoust
200mA .
PLEASE ,Ttelmah, tell me what is mean " and sending the power 'warning'" were it must be sending (PIN ADC or LVD or Dig. INPUT)
Maybe You can give schematic of your device
Best Regards |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
Re: M |
Posted: Sun Nov 28, 2004 2:42 pm |
|
|
Userr wrote: | Thanks a lot
my Pic use 7-segments leds with common catode and it use almoust
200mA .
PLEASE ,Ttelmah, tell me what is mean " and sending the power 'warning'" were it must be sending (PIN ADC or LVD or Dig. INPUT)
Maybe You can give schematic of your device
Best Regards |
It is down to how you want the system to work. You can generate a power warning, either using any one of a number of 'supervisory' IC's (the MAX700), or with a bit of care, a simple TL431. For the latter, all you do, is set the reference voltage using a divider from the incoming supply, to have it trigger at the voltage you want, and wire the output with a pull-up resistor, to the pin you want to use as the input. Ideally, you should use an interrupt input, since this will give the fastest response, unless you are 'polling' the pin continuously. At this point you _must_ turn the LED's off. To maintain the system delivering 200mA, for 16mSec, with only a 1v drop (as an axample), would require 32000uF of capacitance. Remember the time must also allow for the latency of the interrupt, any setup needed etc., and you should always work to the 'worst case', with regards to capacitor ratings, and likely power consumption, if you want the system to be reliable.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|