Electronics-Related.com
Forums

Fast simple microcontroller

Started by Anthony William Sloman July 2, 2021
I've been thinking about Timo's inverter, and it looks as if a micro-controller that offered a 100MHz clock rate would be fast enough to do a decent job of switching the  Siliconix Si3440DV DMOSFet that I fancy.

I've found a PIC part that's fast enough, and pretty cheap, but it is designed for digital signal processing, which makes it more complicated than necessary. A nice, dumb but quick 8051 would be good enough.

Somebody is apparently offers a 600MHz part, but I want something cheap and simple - if fairly fast (but not that fast). Browsing element-14 threw up a few candidates, but I didn't find their search engine all that helpful.

Has anybody got a favourite part?

-- 
Bill Sloman, Sydney
On Friday, 2 July 2021 at 06:33:59 UTC+1, bill....@ieee.org wrote:
> I've been thinking about Timo's inverter, and it looks as if a micro-controller that offered a 100MHz clock rate would be fast enough to do a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. > > I've found a PIC part that's fast enough, and pretty cheap, but it is designed for digital signal processing, which makes it more complicated than necessary. A nice, dumb but quick 8051 would be good enough. > > Somebody is apparently offers a 600MHz part, but I want something cheap and simple - if fairly fast (but not that fast). Browsing element-14 threw up a few candidates, but I didn't find their search engine all that helpful. > > Has anybody got a favourite part?
The RP2040 looks very interesting. Price: 1 dollar. Simple? Maybe not. Its definitely worth a look. There is some stock around at the moment. John
On 02/07/2021 06:33, Anthony William Sloman wrote:
> I've been thinking about Timo's inverter, and it looks as if a micro-controller that offered a 100MHz clock rate would be fast enough to do a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. > > I've found a PIC part that's fast enough, and pretty cheap, but it is designed for digital signal processing, which makes it more complicated than necessary. A nice, dumb but quick 8051 would be good enough. > > Somebody is apparently offers a 600MHz part, but I want something cheap and simple - if fairly fast (but not that fast). Browsing element-14 threw up a few candidates, but I didn't find their search engine all that helpful. > > Has anybody got a favourite part? >
If you're thinking of the dsPIC uCs, they're basically PIC24s with a DSP engine added, same instruction set, just extra ones for the DSP. I don't think Microchip make a PIC24 which runs at 100MIPS like the newer dsPICs, probably no point. So, just use a dsPIC and ignore the DSP part. Some of them at least have a very high resolution (up to 250ps) PWM, though I haven't used that. And how can they do a 32/16 divide in six cycles? Voodoo. -- Cheers Clive
On 7/1/2021 10:33 PM, Anthony William Sloman wrote:
> I've been thinking about Timo's inverter, and it looks as if a > micro-controller that offered a 100MHz clock rate would be fast enough to do > a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. > > I've found a PIC part that's fast enough, and pretty cheap, but it is > designed for digital signal processing, which makes it more complicated than > necessary. A nice, dumb but quick 8051 would be good enough. > > Somebody is apparently offers a 600MHz part, but I want something cheap and > simple - if fairly fast (but not that fast). Browsing element-14 threw up a > few candidates, but I didn't find their search engine all that helpful. > > Has anybody got a favourite part?
That depends on what you want the MCU to *do*. If you are just trying to implement a PWM in software, you could, instead, use an MCU with *hardware* for that purpose (even if the software had to tweek the duty cycle from one cycle to the next). If you want to be able to "talk" to it (i.e., to change it's current operating conditions), then you would have to decide bandwidth requirements for that channel. Be advised that many newer devices operate, internally, at a variety of different clock rates. And, the relationship of activities happening in one part of the SoC to those in other parts isn't often clear-cut. E.g., you may be able to issue op-codes at a faster rate than you can issue "I/O" commands (like "toggle DIO #2 OFF"). And, as the I/O and "core" operate concurrently, the time when the DIO actually toggles is skewed wrt the instruction stream (you can't casually expect to observe the consequences of toggling it until you know the I/O command has actually made its way through to the pins!) I'm currently exploring candidates for a PoE PD controller, moving all of the protocol into the MCU (trivial) as well as control over the converter (*nontrivial* as you have to consider the potential for the MCU to "crash" and apply 48VDC to your load!). Cost also being an issue as using a COTS PD controller and bolting-on the additional smarts represents a maximum cost metric against which to design (assuming the real estate constraints can be met)
On Friday, July 2, 2021 at 9:13:58 PM UTC+10, Don Y wrote:
> On 7/1/2021 10:33 PM, Anthony William Sloman wrote: > > I've been thinking about Timo's inverter, and it looks as if a > > micro-controller that offered a 100MHz clock rate would be fast enough to do > > a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. > > > > I've found a PIC part that's fast enough, and pretty cheap, but it is > > designed for digital signal processing, which makes it more complicated than > > necessary. A nice, dumb but quick 8051 would be good enough. > > > > Somebody is apparently offers a 600MHz part, but I want something cheap and > > simple - if fairly fast (but not that fast). Browsing element-14 threw up a > > few candidates, but I didn't find their search engine all that helpful. > > > > Has anybody got a favourite part?
> That depends on what you want the MCU to *do*. If you are just trying to > implement a PWM in software, you could, instead, use an MCU with *hardware* > for that purpose (even if the software had to tweek the duty cycle from > one cycle to the next). If you want to be able to "talk" to it (i.e., > to change it's current operating conditions), then you would have to decide > bandwidth requirements for that channel.
The isn't even PWM. It's just got to produce two non-overlapping roughly 100kHz square waves. The trick would be to look at the output of the inverter, and get the nominally 100kHz square wave to run exactly at the resonant frequency of the tank circuit (100kHz +/-17%), or very slightly slower. Probably the easiest way to do that would be to sample the +/-2.5V output from a single turn wound onto the inverter transformer at 45, 135, 225 and 315 degrees. That's sampling at at up to to 468kHz, and the dsPIC33EP parts can do 12 bits at 500kHz. If the frequency is just below resonance the 45 degree sample is going to be just bigger than 135 degree sample, and the 225 degree sample just lower than the 315 degree sample.
> Be advised that many newer devices operate, internally, at a variety of different clock rates.
The device wouldn't be doing very much, so that probably wouldn't be a problem. -- Bill Sloman, Sydney
On 02/07/2021 22:56, Anthony William Sloman wrote:
> On Friday, July 2, 2021 at 9:13:58 PM UTC+10, Don Y wrote: >> On 7/1/2021 10:33 PM, Anthony William Sloman wrote: >>> I've been thinking about Timo's inverter, and it looks as if a >>> micro-controller that offered a 100MHz clock rate would be fast enough to do >>> a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. >>> >>> I've found a PIC part that's fast enough, and pretty cheap, but it is >>> designed for digital signal processing, which makes it more complicated than >>> necessary. A nice, dumb but quick 8051 would be good enough. >>> >>> Somebody is apparently offers a 600MHz part, but I want something cheap and >>> simple - if fairly fast (but not that fast). Browsing element-14 threw up a >>> few candidates, but I didn't find their search engine all that helpful. >>> >>> Has anybody got a favourite part? > >> That depends on what you want the MCU to *do*. If you are just trying to >> implement a PWM in software, you could, instead, use an MCU with *hardware* >> for that purpose (even if the software had to tweek the duty cycle from >> one cycle to the next). If you want to be able to "talk" to it (i.e., >> to change it's current operating conditions), then you would have to decide >> bandwidth requirements for that channel. > > The isn't even PWM. It's just got to produce two non-overlapping roughly 100kHz square waves. > > The trick would be to look at the output of the inverter, and get the nominally 100kHz square wave to run exactly at the resonant frequency of the tank circuit (100kHz +/-17%), or very slightly slower. > > Probably the easiest way to do that would be to sample the +/-2.5V output from a single turn wound onto the inverter transformer at 45, 135, 225 and 315 degrees. That's sampling at at up to to 468kHz, and the dsPIC33EP parts can do 12 bits at 500kHz. > > If the frequency is just below resonance the 45 degree sample is going to be just bigger than 135 degree sample, and the 225 degree sample just lower than the 315 degree sample. > >> Be advised that many newer devices operate, internally, at a variety of different clock rates. > > The device wouldn't be doing very much, so that probably wouldn't be a problem. >
You'd probably be better off with a small cheap fpga. Some of them work with open-source software now.
On 7/2/2021 6:32 AM, Chris Jones wrote:
> On 02/07/2021 22:56, Anthony William Sloman wrote: >> On Friday, July 2, 2021 at 9:13:58 PM UTC+10, Don Y wrote: >>> On 7/1/2021 10:33 PM, Anthony William Sloman wrote: >>>> I've been thinking about Timo's inverter, and it looks as if a >>>> micro-controller that offered a 100MHz clock rate would be fast enough to do >>>> a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. >>>> >>>> I've found a PIC part that's fast enough, and pretty cheap, but it is >>>> designed for digital signal processing, which makes it more complicated than >>>> necessary. A nice, dumb but quick 8051 would be good enough. >>>> >>>> Somebody is apparently offers a 600MHz part, but I want something cheap and >>>> simple - if fairly fast (but not that fast). Browsing element-14 threw up a >>>> few candidates, but I didn't find their search engine all that helpful. >>>> >>>> Has anybody got a favourite part? >> >>> That depends on what you want the MCU to *do*. If you are just trying to >>> implement a PWM in software, you could, instead, use an MCU with *hardware* >>> for that purpose (even if the software had to tweek the duty cycle from >>> one cycle to the next). If you want to be able to "talk" to it (i.e., >>> to change it's current operating conditions), then you would have to decide >>> bandwidth requirements for that channel. >> >> The isn't even PWM. It's just got to produce two non-overlapping roughly >> 100kHz square waves. >> >> The trick would be to look at the output of the inverter, and get the >> nominally 100kHz square wave to run exactly at the resonant frequency of the >> tank circuit (100kHz +/-17%), or very slightly slower. >> >> Probably the easiest way to do that would be to sample the +/-2.5V output >> from a single turn wound onto the inverter transformer at 45, 135, 225 and >> 315 degrees. That's sampling at at up to to 468kHz, and the dsPIC33EP parts >> can do 12 bits at 500kHz.
I suspect you could (?) lower the bandwidth requirement by sampling, instead, at 45, 495 (360+135), 945 (720+225), etc. -- assuming the system is stable over short time periods.
>> If the frequency is just below resonance the 45 degree sample is going to be >> just bigger than 135 degree sample, and the 225 degree sample just lower than >> the 315 degree sample. >> >>> Be advised that many newer devices operate, internally, at a variety of >>> different clock rates. >> >> The device wouldn't be doing very much, so that probably wouldn't be a problem.
It's not how much it is doing as much as WHEN it is doing things. There is an invisible skew between the instruction sequence and the I/Os. I.e., "doing something" and then "checking the result" can end up having the "check result" executing before the "doing something" has actually made it out onto the pins.
> You'd probably be better off with a small cheap fpga. Some of them work with > open-source software now.
+1 There are several MCU's that can meet the RT needs. But, you also have to consider the possibility of the processor crashing or getting into a loop that ignores some key feedback signal. [There are MCUs that have some measures to minimize the ability of a CPU crash screwing up "controls" -- one just has to hope they REALLY work! :-/ ] You might be able to kludge an error signal (over volt, over current, etc.) onto the RESET pin and hope the processor doesn't misbehave entering RESET.
On 7/2/2021 9:32 AM, Chris Jones wrote:
> On 02/07/2021 22:56, Anthony William Sloman wrote: >> On Friday, July 2, 2021 at 9:13:58 PM UTC+10, Don Y wrote: >>> On 7/1/2021 10:33 PM, Anthony William Sloman wrote: >>>> I've been thinking about Timo's inverter, and it looks as if a >>>> micro-controller that offered a 100MHz clock rate would be fast >>>> enough to do >>>> a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. >>>> >>>> I've found a PIC part that's fast enough, and pretty cheap, but it is >>>> designed for digital signal processing, which makes it more >>>> complicated than >>>> necessary. A nice, dumb but quick 8051 would be good enough. >>>> >>>> Somebody is apparently offers a 600MHz part, but I want something >>>> cheap and >>>> simple - if fairly fast (but not that fast). Browsing element-14 >>>> threw up a >>>> few candidates, but I didn't find their search engine all that helpful. >>>> >>>> Has anybody got a favourite part? >> >>> That depends on what you want the MCU to *do*. If you are just trying to >>> implement a PWM in software, you could, instead, use an MCU with >>> *hardware* >>> for that purpose (even if the software had to tweek the duty cycle from >>> one cycle to the next). If you want to be able to "talk" to it (i.e., >>> to change it's current operating conditions), then you would have to >>> decide >>> bandwidth requirements for that channel. >> >> The isn't even PWM. It's just got to produce two non-overlapping >> roughly 100kHz square waves. >> >> The trick would be to look at the output of the inverter, and get the >> nominally 100kHz square wave to run exactly at the resonant frequency >> of the tank circuit (100kHz +/-17%), or very slightly slower. >> >> Probably the easiest way to do that  would be to sample the +/-2.5V >> output from a single turn wound onto the inverter transformer at 45, >> 135, 225 and 315 degrees. That's sampling at at up to to 468kHz, and >> the dsPIC33EP parts can do 12 bits at 500kHz. >> >> If the frequency is just below resonance the 45 degree sample is going >> to be just bigger than 135 degree sample, and the 225 degree sample >> just lower than the 315 degree sample. >> >>> Be advised that many newer devices operate, internally, at a variety >>> of  different clock rates. >> >> The device wouldn't be doing very much, so that probably wouldn't be a >> problem. >> > > You'd probably be better off with a small cheap fpga. Some of them work > with open-source software now. > >
The GreenPAK series of SPLC are cheap and cheerful and (aside from a few niggles) the designer software is very straightforward to use: <https://www.dialog-semiconductor.com/greenpak-designer-software> When you need to do high-speed glue logic on the cheap these are where it's at
On Friday, July 2, 2021 at 11:32:12 PM UTC+10, Chris Jones wrote:
> On 02/07/2021 22:56, Anthony William Sloman wrote: > > On Friday, July 2, 2021 at 9:13:58 PM UTC+10, Don Y wrote: > >> On 7/1/2021 10:33 PM, Anthony William Sloman wrote: > >>> I've been thinking about Timo's inverter, and it looks as if a > >>> micro-controller that offered a 100MHz clock rate would be fast enough to do > >>> a decent job of switching the Siliconix Si3440DV DMOSFet that I fancy. > >>> > >>> I've found a PIC part that's fast enough, and pretty cheap, but it is > >>> designed for digital signal processing, which makes it more complicated than > >>> necessary. A nice, dumb but quick 8051 would be good enough. > >>> > >>> Somebody is apparently offers a 600MHz part, but I want something cheap and > >>> simple - if fairly fast (but not that fast). Browsing element-14 threw up a > >>> few candidates, but I didn't find their search engine all that helpful. > >>> > >>> Has anybody got a favourite part? > > > >> That depends on what you want the MCU to *do*. If you are just trying to > >> implement a PWM in software, you could, instead, use an MCU with *hardware* > >> for that purpose (even if the software had to tweek the duty cycle from > >> one cycle to the next). If you want to be able to "talk" to it (i.e., > >> to change it's current operating conditions), then you would have to decide > >> bandwidth requirements for that channel. > > > > The isn't even PWM. It's just got to produce two non-overlapping roughly 100kHz square waves. > > > > The trick would be to look at the output of the inverter, and get the nominally 100kHz square wave to run exactly at the resonant frequency of the tank circuit (100kHz +/-17%), or very slightly slower. > > > > Probably the easiest way to do that would be to sample the +/-2.5V output from a single turn wound onto the inverter transformer at 45, 135, 225 and 315 degrees. That's sampling at at up to to 468kHz, and the dsPIC33EP parts can do 12 bits at 500kHz. > > > > If the frequency is just below resonance the 45 degree sample is going to be just bigger than 135 degree sample, and the 225 degree sample just lower than the 315 degree sample. > > > >> Be advised that many newer devices operate, internally, at a variety of different clock rates. > > > > The device wouldn't be doing very much, so that probably wouldn't be a problem. > > > You'd probably be better off with a small cheap fpga. Some of them work > with open-source software now.
But I wouldn't get the A/D converter thrown in, and I'd have to make my own 100MHz clock. I've been fond of programmable devices for a long time now - my 1996 paper used the (fairly rudimentrary) ICT PA7024 - but in this application a micro-controller would provide a lot of bang for very few bucks. -- Bill Sloman, Sydney
On 02/07/2021 15:42, Anthony William Sloman wrote:
> On Friday, July 2, 2021 at 11:32:12 PM UTC+10, Chris Jones wrote:
<snipped>
>> You'd probably be better off with a small cheap fpga. Some of them work >> with open-source software now. > > But I wouldn't get the A/D converter thrown in, and I'd have to make my own 100MHz clock. I've been fond of programmable devices for a long time now - my 1996 paper used the (fairly rudimentrary) ICT PA7024 - but in this application a micro-controller would provide a lot of bang for very few bucks. >
The first thing I do for any hard real time control type project is code some simple functions to use a spare UART as a diagnostics port plugged in to an ANSI terminal emulator on a PC. TeraTerm works fine. Then I use generally single key commands to dump things to the terminal, adjust things, whatever. On a complicated project I may have several menus focussed on different aspects. Here's one screen of about ten in a current project... Real Time Clock and Timer test Menu Esc : Back T : Read Time D : Dump RTC chip P : Show Timestamp Parameters Clock frequency on J6 pin 1 0 : Off 1 : 100Hz 2 : 1kHz 3 : 10kHz 4 : 100kHz 5 : 1MHz Pressing 'D' for example displays this... RTC chip dump 00 : 17 55 14 05 02 07 21 00 00 00 00 00 00 00 00 C8 10 : 00 1E C0 00 08 00 00 00 00 00 00 00 00 02 00 14 20 : 40 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00... And so on. I can't imagine the pain of not having this. In Bill's system, you might press '<' or '>' to move the square wave slightly. 'A' might display the current ADC value. I just add stuff as it's needed and remove stuff which is no longer useful. But not in an FPGA. -- Cheers Clive