MCU w/ single-shot 16-bit timer w/ external reset? - Page 1
Forum section: electronics / projects

author: eecook
author_rank: Regular Contributor
timestamp: September 02, 2014, 05:49:24 pm
content: Hi all,I've been strugglin with this search for a couple of days now, but I cannot find anything on the 2USD price range (@500-1000 units).I'm trying to find a MCU with the following specs:Operating Ambient Temp: +105CA/D channels: 5+ (12 bit resolution)Timer: 1+ 16bit single-shot timers with external reset. (this feature make prices go to hell)I found that I can meet this requirements with a TMS320F28027 from TI or a SAM4 from Atmel, but both of them are beyond my target price range.Can anybody recommend a micro?Cheers.

author: nctnico
author_rank: Super Contributor
timestamp: September 02, 2014, 06:48:35 pm
content: Did you look at the Psoc devices from Cypress? The programmable logic block may save your bacon.

author: mazurov
author_rank: Frequent Contributor
timestamp: September 02, 2014, 06:58:04 pm
content: Take a look at PIC24xxKM, seems to have everything you require.

author: Artraze
author_rank: Contributor
timestamp: September 02, 2014, 07:06:54 pm
content: The STM32F0 series would work, but unfortunately the industrial temp range is usually non-stock so unfortunately sourcing them in quantities <1500 may be an issue.Have you looked at Freescale's Kinetis line? I haven't done too much with them so I don't know if their timers would fit the bill, but they're good, cheap and should meet all your other requirements.

author: miguelvp
author_rank: Super Contributor
timestamp: September 02, 2014, 07:56:52 pm
content: Quote from: nctnico on September 02, 2014, 06:48:35 pmPSoC 3 and 5LP are not offered in 105 CPSoC 4 only 3 chips meet the 105 C but has a single ADC not 5 of them, but meets the 16 bit timer since it has 4 timer/counters and it seems they can be configured as a single shot:Edit: the single 12 bit SAR ADC actually uses 8 channels, page 5 of the 4200 datasheet, but that's for the 85 C chip not for the automotive ones but the datasheets for those ones are not available.http://www.cypress.com/?docID=46322QuoteThis is the parametric search:http://www.cypress.com/?id=4976&addcols=181&parametric=html&filter_181=105#parametricThe 3 results don't yield to datasheet information nor price, so you gotta contact them for details, but just one ADC for what it seems.Edit: PSoC 1 do offer 105 C chips and can do up to two ADCs with up to 14 bits resolution and digitally configurable timers up to 32 bits.

author: dannyf
author_rank: Super Contributor
timestamp: September 02, 2014, 08:02:51 pm
content: QuoteUnless you meant something specially, the above features can be easily programmed into and implemented on pretty much any mcu/timer.The reason they aren't offered on many mcu is likely that they can be so easily programmed.

author: eecook
author_rank: Regular Contributor
timestamp: September 02, 2014, 08:32:06 pm
content: Quote from: dannyf on September 02, 2014, 08:02:51 pmThanx Danny. I know it's easy to program such a function, but for this application it won't work. The MCU is intended to control a PSU working at 250Khz with very stringent control requirements. To perform the control adequately there's an event detection implemented with analog circuitry and from the moment the event is detected, to the moment the timer is re-triggered no more than 50ns can take place. I think that leaves the software option out.Cheers!

author: dannyf
author_rank: Super Contributor
timestamp: September 02, 2014, 09:55:32 pm
content: QuoteWith that kind of requirement, you will likely end up with a hardware solution (logic gates or fpga).A software solution (aka mcu) is unlikely to work here.Having said that, if you need 50ns reaction time in a 250Khz power supply, you may want to rethink your approach.

author: nctnico
author_rank: Super Contributor
timestamp: September 03, 2014, 01:11:53 am
content: That sounds like a current protection to me. In one of my designs I used a JK flipflop with reset which drives the enable of the MOSFET driver. The flipflop gets set by every rising edge of the PWM pulse and reset when the current limit hits. This effectively limits the PWM duty cycle during short circuit.

author: Artraze
author_rank: Contributor
timestamp: September 03, 2014, 04:15:14 am
content: I would be curious to hear a bit more about the application. It seems that you want event -> reset to be <50ns, but you haven't said what happens after that. It sounds rather like you'd then have the counter count up to a 9-16bit value and then... ?It sounds to me like you don't really need an external reset one shot timer. Here are a couple software possibilities:Because microcontrollers can handle interrupts with quite deterministic timing, you can just characterize the delay... Does it really matter that you reset in <50ns if you're just gong to count to 10ms? Simply determine the interrupt latency and subtract that from your target count and you're all set.You could almost certainly also just using normal input capture. Simply have the timer run constantly, and use input capture with an interrupt. When the interrupt fires, take the captured value, add your delay (modulo 16-bits), set that in a compare register, and then enable the compare interrupt. It's basically the same as a reset, but uses the captured value as a offset. Not as convenient, but it would work.

author: eecook
author_rank: Regular Contributor
timestamp: September 03, 2014, 05:48:55 pm
content: Quote from: dannyf on September 02, 2014, 09:55:32 pmWhat do you mean? (see comment below)Quote from: nctnico on September 03, 2014, 01:11:53 amIt is not for a current protection.Quote from: Artraze on September 03, 2014, 04:15:14 amThat would be a dissaster!It is a regular flyback operating in boundary-mode at 250Khz. When the boundary condition is met, there's gonna be ringing on the secondary due to the diode's capacitance and any parasitic capacitance. This voltage will be reflected on the primary side, and substracted from the DC bus you get the voltage the mosfet is blocking. To mimimize losses, the mosfet has to switch on when Vds hits a minimum. This ringing has a period of 500ns roughly, so I am considering 10 times less than that is a reasonable amount of time from event to control action.The timer is there to drive the mosfet on, right after the boundary condition is met, since the duty cycle is very low due to the boundary-mode operation, I need high resolution on the driving pulse.

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: September 03, 2014, 09:26:59 pm
content: if it does mostly the same thing each cycle can you calculate, set next cycle switch time based on previous cycle measurement, switch times?may still have internal cycle current limiting that doesn't hit peak efficiency but does well enough to not kill the parts

author: Maxlor
author_rank: Frequent Contributor
timestamp: September 03, 2014, 11:06:36 pm
content: While I'm not sure I've understood what you want to do 100%, I think a cheap PIC16F1782 8bit MCU should work. It is well under your price limit, there is an -E variant that works up to 125°C, it has 11 12-bit ADC channels, and a 16 bit timer.For the timer, there's no dedicated external reset, but there is external gate control which includes a pulse mode. So you could set up the timer in software, with an external pin as gate that starts the timer. On timeout, the MCU software would then reset the gate (for pulse mode) and counter value (thus making it singleshot) and of course do the actual action you want to have done on timeout.Or maybe I misunderstood and you want the timer period to be that fast? Won't work then I guess.

author: eecook
author_rank: Regular Contributor
timestamp: September 05, 2014, 01:16:37 pm
content: Quote from: Artraze on September 02, 2014, 07:06:54 pmIt seems like the MKL04Z32VLF4 from Freescale does everything I need and is only 1.53USD @ 100 units in Digikey. I'm making a sample request. Thanx for the suggestion.