CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LVD or maybe supervisory

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Userrr



Joined: 09 Jul 2004
Posts: 40
Location: Europe

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

LVD or maybe supervisory
PostPosted: Fri Nov 26, 2004 11:33 pm     Reply with quote

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)
Ttelmah
Guest







PostPosted: Sat Nov 27, 2004 5:34 am     Reply with quote

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
Userr
Guest







I
PostPosted: Sun Nov 28, 2004 5:06 am     Reply with quote

Internal EEPROM with PIC18F without x4 PLL
Ttelmah
Guest







PostPosted: Sun Nov 28, 2004 6:07 am     Reply with quote

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
Ttelmah
Guest







PostPosted: Sun Nov 28, 2004 6:16 am     Reply with quote

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
Userr
Guest







M
PostPosted: Sun Nov 28, 2004 12:00 pm     Reply with quote

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
Ttelmah
Guest







Re: M
PostPosted: Sun Nov 28, 2004 2:42 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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