Monday, February 16, 2015

Wanna Kick Butt as a Gadgeteer? Do This

People forget Bunnie Huang is a PhD :)
Karen Field :

  1. Learn the tech that makes the net possible.
  2. Use search engines to avoid reinventing the wheel.
  3. Learn something new outside your comfort zone.
  4. Become experienced with an RTOS. Embedded Linux ain't a bad thing to pick up now..
  5. Diversify your skills and move up the stack
  6. Know your software well but always tinker with the latest processors
  7. Get comfortable with open-source software
  8. Develop a systems engineering mindset (think verification strategy, requirements, compliance early)
  9. Become great at expressing yourself in both words and graphics (mindmapping ain't bad)
  10. Learn wireless connectivity - my favourite - BLE, here I come!


Never Pull a Bee Sting Out with Your Fingers

Reasons

When you grab the part that's easy to grab, you actually squeeze the venom sac and the forces more venom out of the needle. Plus, the venom is accompanied by an alarm pheromone that attracts nestmates to the sting site and the new bees will give you more grief.

You should use tweezers to grip the needle directly and pull it out.



Sunday, February 15, 2015

How to Make a Million with LTspice

Recently, an experienced (old) engineer (circuit designer) who does consulting jobs for a living told me, "Cadence would like you to believe that you can't design ICs without their expensive tools, but you can." Pspice is enough apparently. If you can architect and farm out blocks, that's really all you need. Of course, the user experience is crappy.. compared to Virtuoso.

XFAB supports Cadence and (maybe) Mentor/Tanner. But, what if you want to do the design (schematic) without investing in tools? Is there a way?

Sure - following the architect and farm model - you just need a way to import the LTspice databases into Cadence so you can do you full-chip LVS (layout vs schematic ver) in Cadence. Yes, you're still spending - but you might be able to get a Cadence license for a just a week and knock this out..

So, what do you need - one perl script that can take XFAB's hspice model deck and generate the design kit you can use with LTSpice. You need to push a button and out comes the symbols, subcircuit definitions and model files (minor syntax edits on the input model files) and a component-browser schematic that you can use as your palette and your in business. You will have to do some editing on the symbols to make them visually different - you do want a drain-extended MOS to look different from a regular MOS, etc.. So it's not totally automatic - but you can always get there if you want - just more work upfront.

And of course, you need some skill code that can generate the Cadence schematic database taking the LTspice db as input - if you look at LTspice - it's cool - just text files. Would be nice if they had a command interpreter log and a way to do custom bindkeys for macros - that would devastate Cadence..

Saturday, February 14, 2015

Crappy, Crappy Perl : Subroutine Vars Access Globals By Default

Man, after 15+ years of using perl, you'd guess I should be aware of such a shortcoming.

You can do

sub mySub () {
    $var = 'xyz';
}

And, if there's a variable in the body called $var, you're in big trouble mate!

You *have* to use strict. Stinks..

By default, subroutine vars should be local. Anyone knows that.. Shame on your Larry..

Perl Magic with split

How come even perldoc -f split doesn't show such stuff? Surprised that python and ruby have taken over?

$s = 'JP,w,l,m,*,/cygdrive/c/Tools/LTspiceIV/lib/sym/pjf.asy'

You want to get w, l and m in an array..

@info = split( /,\s*\*\s*,/ , $s);
@info = reverse ( split( /,/ , $info[0] ) );
@info = reverse( @info[0..$#info-1] );

okay, maybe this is looking a bit contrived. But, anyway, I started, I might as well finish :

@info = ( split( /,/ , ( split( /,\s*\*\s*,/ , $s) )[0] ) )[1..10]

Okay, a bit of cheating there - you have to know your data - so that the magic "10" is big enough..
Actually, that's not a good one. DON'T USE IT.. You wish they would support [1..] with the 2nd argument omitted.

Use
@info = split( /,/ , ( split( /,\s*\*\s*,/ , $s) )[0] );
@info = @info[1..$#info];

Did you know that the range operator also behaves like a bistable flip-flop in such a case :

if( $a .. $b ) {

}

First, it returns true only if $a is true. After that, it ignores $a and only returns true if $b is true, and so on..

Here's my rookie mistake of the day (after more than a decade with perl) :

    $is_cell = 1 if $subin =~ /^\s*$/s;

When what I really want is for $is_cell to be set to 0 when the match fails. Duh!

Friday, February 13, 2015

Perl Extract All Elements of an Array Except..

The first :

@a = ( 1, 2, 3, 4);
@a[1..$#a]
gives
(2, 3, 4) (all but the first)

@a[0..$#a-1]
gives
(1,2,3) (all but the last)

Perl : Can't modify constant item in substitution (s///) at

Hmmm... for once, perl disappoints - can't it point to the right place?

Can't modify constant item in substitution (s///) at ./xx.pl line 309, near "s/(ATTR\s+Prefix[^\n]+\n)/$1SYMATTR ModelFile $name\\$device.cir/;"

Code :

        sym_raw =~ s/(ATTR\s+Prefix[^\n]+\n)/$1SYMATTR ModelFile $name\\$device.cir/;

And.. with fix :

        $sym_raw =~ s/(ATTR\s+Prefix[^\n]+\n)/$1SYMATTR ModelFile $name\\$device.cir/;

Now, why couldn't it flag the LHS instead of talking about the substitution?



Nobel Prize 2016 : Alroy Almeida, Jesus Zozaya, James Pickard, Katarina Ilic

We made the decision to move to Shen Zhen, the electronics capital of the world.
"This allowed us to nail down our supply chain and manufacturing processes."

My buddy who's tired of haggling with the Chinese PCB manufacturers might have found his answer..

What made is possible - a background in nanotechnology. Hmm...

Seen anything great come out of Georgia Tech's behemoth nanotech building yet?

https://www.kickstarter.com/projects/voltera/voltera-your-circuit-board-prototyping-machine?ref=nav_search

Tuesday, February 10, 2015

LTspice Drives PC Sales

I have one experienced consultant tell me he recently bought a Core i7 laptop just because LTspice runs faster on it.

Says it's the gold standard these days among hardware guys.. Hmmm....


http://www.scribd.com/doc/54713644/Kielkowski-Inside-SPICE#scribd