Power/reset button control IC - Page 1
Forum section: electronics / projects

author: JJalling
author_rank: Unknown
timestamp: October 22, 2015, 07:14:54 pm
content: Hi all,I'm looking for a power/reset control IC to control the power supply in my circuit as well as the ability to reset the main FPGA.So basically something with two outputs and a single input.The outputs are connected to the PSU enable and the reset circuit - the input to a single button.If the PSU is turned off, a short pulse on the input (< 1s) will turn it on. If it is already on, the reset circuit will be triggered.A long press will shut down the PSU.TI has a couple with two buttons, but I cant find one with a single input.Thanks,Jonas

author: FrankBuss
author_rank: Unknown
timestamp: October 22, 2015, 07:50:51 pm
content: Sounds very special. If you don't want to build it with half a dozen discrete parts like a 555, resistors and capacitors, one PIC10F200 and a trivial program would do it.

author: JJalling
author_rank: Unknown
timestamp: October 22, 2015, 08:18:44 pm
content: Quote from: FrankBuss on October 22, 2015, 07:50:51 pmIt's something like LTC2950 I'm looking for. Alternatively a solution like a PIC could work, but thats more code that needs to be reviewed and maintained, and I (or my manager) aren't that interested in that. If something is wrong with the code, a lot of devices needs to be recalled :-//Jonas

author: FrankBuss
author_rank: Unknown
timestamp: October 22, 2015, 08:46:27 pm
content: You are using a FPGA and you are worried about 15 lines of simple PIC assembler code? Then you might have other problemsMicrochip provides even a programming service, 6 cents per chip for the PIC10F200 if you buy less than 500.

author: JJalling
author_rank: Unknown
timestamp: October 22, 2015, 09:21:02 pm
content: Quote from: FrankBuss on October 22, 2015, 08:46:27 pmNo, not at all - I'm not the one writing the code for any of them :-) And yes, we use Microchips programming service all the time, but I have also been burned by 10K chips with an error in the bootloader - that was expensiveYour suggestion is good, and I'm reconsidering it - but I would still prefer a non programmable solution though./Jonas

author: FrankBuss
author_rank: Unknown
timestamp: October 23, 2015, 12:53:34 am
content: I'm a bit rusty with PIC assembler, but got it working with a PIC12F508, which I tested on a breadboard. The code could be optimized, but was fun to program something in assembler again after lots of Java programming. As always, much longer than my initial estimate of 15 lines. But the advantage compared to C is that you exactly see what is going on and delay loops don't change if the compiler optimizes it different.Button debounce and initial reset is included. Should be easy to port to a cheaper PIC12F200. The PIC12F508 has the advantage that it has more pins, so you can program it in-circuit without any additional protection for the 3 GPIO pins. Code works in MPLAB X with MPASM. And better use a pullup for the button instead of the weak internal pullup, because a resistor is cheaper than recalling 10k devices because of unintentional resets, if the button has a long cableCode:; *******************************************************************; reset and power logic; GP5 enables the PSU, active low, high on start; GP4 is the reset output, active low, high on start; GP2 is the button input, active low, use an external 1k pullup; 1. first button press turns on the PSU and generates a reset after 100 ms; 2. next short (< 1 s) button presses generates a 100 ms reset signal; 3. a long button press (> 1 s) disables the PSU and goes back to 1; *******************************************************************list p=12F508#include <p12f508.inc>__CONFIG _IntRC_OSC & _WDT_OFF & _CP_OFF & _MCLRE_OFFudatacount res 1wait1 res 1wait2 res 1codeorg 0x0000; set calibration valuemovwf OSCCAL; set GP5 and GP4 as outputmovlw b'001111'tris GPIOstart: ; deactive PSU and no reset on program startmovlw b'111111'movwf GPIO; initially wait for button release on GP2call waitRelease; enable PSU on first button press / releasecall waitPressmovlw b'011111'movwf GPIO; generate a reset 100 ms after PSU enable, if requiredcall wait100mscall reset; wait for button releasecall waitRelease; wait for next button pressstart2: call waitPress; if button released within 1 s, generate resetmovlw 9movwf countstart3: btfsc GPIO, 2goto start4call wait100msdecfsz count, fgoto start3; otherwise restart, which disables the PSUgoto startstart4: call resetgoto start2; generate resetreset: movlw b'001111'movwf GPIOcall wait100msmovlw b'011111'movwf GPIOretlw 0; wait for button press on GP2waitPress: btfsc GPIO, 2goto waitPress; wait 100 ms for button debouncingcall wait100msretlw 0; wait for button release on GP2waitRelease: btfss GPIO, 2goto waitRelease; wait 100 ms for button debouncingcall wait100msretlw 0; wait 100 mswait100ms: movlw d'165'movwf wait1delay1: movlw d'200'movwf wait2delay2: decfsz wait2, fgoto delay2decfsz wait1, fgoto delay1retlw 0; uncomment this, if you erased the calibration value, or for fine tuning; org 0x1ff; movlw 0x1aend

author: exmadscientist
author_rank: Frequent Contributor
timestamp: October 23, 2015, 02:32:16 am
content: Which TI chips were you looking at? I bet you can achieve the desired result with one of them plus a few added discrete parts and maybe some glue logic. You may or may not want to take on the extra BOM count, but it sure sounds less likely to be future trouble than a microcontroller.

author: calexanian
author_rank: Super Contributor
timestamp: October 23, 2015, 04:55:14 am
content: Oh young ones. Sit down and let grandpa tell you a story about the old days. There used to be a whole class of processor and processor supervisor chips and reset was one of the common roles. Most of them are gone now. As a matter of fact i could not remember the part numbers we used and a google search did not reveal any of the old parts. Just the new ones, of which there are many. Mostly 3 and 4 pin devices that act like an external BOR or WDT.

author: FrankBuss
author_rank: Unknown
timestamp: October 23, 2015, 11:51:00 am
content: Right, there are a lot of watchdog and brownout detection chips, but probably none with the special requirements with a button and the long press to disable one output.

author: Ian.M
author_rank: Super Contributor
timestamp: October 23, 2015, 11:54:55 am
content: Its probably unwise not to have a BOR circuit if using a MCU to control power switching.Neither of the PICs mentioned have an internal BOR module.

author: FrankBuss
author_rank: Unknown
timestamp: October 23, 2015, 12:05:05 pm
content: Right, the datasheet of the PIC10F200 and PIC12F508 only shows a crude external circuit with a zener diode and transistor to implement brownout detection. Maybe more safe to use a PIC12F675 with an integrated BOR module, and additionally enable and trigger the watchdog.

author: tszaboo
author_rank: Super Contributor
timestamp: October 23, 2015, 12:08:43 pm
content: Something like ST's STM6600 or Maxim MAX16054?Screw microcontrollers. ASIC whenever possible.

author: Ian.M
author_rank: Super Contributor
timestamp: October 23, 2015, 01:12:50 pm
content: Avoid the PIC12F629/675 family. There are significant issues with how their implementation of the internal oscillator calibration and bandgap reference calibration interact with the development tools! Look at PIC10F320 or PIC12F1571