Choosing the ways

Sep. 20th, 2017 05:48 pm
gerald_duck: (quack)
[personal profile] gerald_duck
Suppose you wish to designate an option to a piece of hardware. You could stick down a little EEPROM, but maybe you'd prefer to make links, or join PCB tracks, without any active componentry.

You have Gnd, and N configuration lines each with weak pull-up. How many different values can you represent?

The most utterly naïve solution would be to encode N options by tying one of the lines to ground.

The marginally less naïve solution — and one that's very widely used — is to encode 2N options by tying any subset of the lines to ground.

However, if the configuration lines are independently bidirectional you can also tie them to one another. Denoting a ground connection by 0, n/c by 1 and commoned groups of lines by A, B, C, etc. the options with 2 lines become: 00 01 10 11 AA. With 3 lines: 000 001 010 011 100 101 110 111 0AA A0A AA0 1AA A1A AA1.

With 4 lines, things explode rather:
  • 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 (=16)
  • AA00 A0A0 A00A 0AA0 0A0A 00AA, AAA0 AA0A A0AA 0AAA, AAAA (=11)
  • AA01 A0A1 0AA1 AAA1, AA10 A01A 0A1A AA1A, A1A0 A10A 01AA A1AA, 1AA0 1A0A 10AA 1AAA (=16)
  • AA11 A1A1 A11A 1AA1 1A1A 11AA (=6)
…for a total of 52 options.

More generally, the number of options is BN+1, where B denotes a Bell number. My maths is rusty, but it looks like that grows faster than exponentially with the number of pins.

Is this a technique people actually use? Is there some reason I'm overlooking why it's a bad idea?

I mean, OK, I'll probably just use an EEPROM, but…
kaberett: a patch of sunlight on the carpet, shaped like a slightly wonky heart (light hearted)
[personal profile] kaberett
you might also like Heartstopper, an LGBT comic about a British grammar school, which I have just inhaled this evening after one of you all reblogged it on the tumbls xx

(comment I left on the Patreon: 3-2 came across my dash earlier this evening, I have just read EVERYTHING (with laughing-out-loud and misting-up and making-my-partner-read-bits), thank you *so much* for this. -- I am 27, I was in Year 9 when Section 28 was repealed, I was the only out queer in my secondary school of 1000+ students, and I recognise these crushes SO HARD. Thank you so, so much for making this be a thing in the world, and I am really looking forward to reading more. <3)


Sep. 10th, 2017 11:09 pm
gerald_duck: (freaky)
[personal profile] gerald_duck
It appears I'm developing an electronics itch that I need to scratch in a few ways.

Now here's the thing: I've spent decades tinkering with software, including some that's quite low level. I've played a cameo rôle a couple of times in semiconductor design. I know my way around a circuit diagram.

But I'm painfully aware that to create a PCB, you need to know how to scatter lots of capacitative confetti. You need to create Gerbers. You need to tie a squillion and one wires to one another and not screw up. I've never done these things.

So. I have some questions...

Are free PCB design packages any good, or do I have to spend silly money on the professional stuff? In particular, is DesignSpark PCB any good? A few online reviews say it is, and it looks promising, but I'd rather not sink time into experimenting with it if there's something better.

Has anyone played with the Bitscope Micro as a cheap and cheerful oscilloscope and logic analyser? I'm fully aware it would suck for stuff running at modern speeds, but it looks like it'd be OK for retrocomputing, messing around with Raspberry Pi hats, etc.

Exactly how doomed am I if I want to get an SOIC soldered to a board? There are videos suggesting it's far from impossible, some even making it look easy, but at the very least I'd need a much finer tip for my soldering iron and some thinner solder. Alternatively, does anyone know of a specialist around Cambridge that would do prototyping quantities for sensible money? (In the first instance dropping some SO20 onto breakout boards so I can experiment a little.

FPGAs. Which brand? Altera? Xilinx? Lattice? Someone else? Right now, I'm looking at an Altera MAX 10, simply because it seems to have the right combination of price, package size, IO, gates, flash and RAM. Is this madness?

Is the optimisation in VHDL synthesis for FPGAs as mature as that in software compilers? To pick an example, if I design a block that has various outputs and then don't use one of them, will it prune away any logic only needed for that output?

How resilient are 3.3V parts in the face of signals from old 5V 8-bit micros. The MAX 10 specifies an absolute maximum (won't break; might not work; degrades life expectancy) DC input voltage of 4.12V and a recommended maximum DC input voltage of 3.6V . To me, that says I have to put transceivers between it and 5V logic, but at least one person (you know who you are) has said signal voltages are lower than Vcc in practice and it'll be fine. If true, that would save me a huge amount of hassle and expense, but I'm sceptical.

Suppose I want to measure the voltage and current on a 5V supply using a 3.3V ADC. Am I being naïve, or would this circuit do the job?

(The supply voltage would be twice the ADC1IN2 measurement; supply current would be 2×(ADC1IN2-ADC1IN1)×0.1 . With 12-bit ADCs, this would give a resolution of 16mA. The circuit would consume 1.2mW. It would be possible to mess about with comparators, but they'd cost more, and this is a nice-to-have toy because the FPGA has free ADCs, not the main point of the exercise.)

Can someone recommend a cheaper and/or more efficient 5V to 3.3V step-down converter than the Intel EP5388QI? Ideally, it share the Intel part's virtue of not needing a huge count of ancillary components. In my dreams, it would provide a current-sense output as a freebie.

More generally, it feels like — especially around Cambridge — there ought to be some Makespace equivalent for electronics, with a reflow oven and nice 'scopes and a few thousand cheap, standard components. It feels like there ought to be a community for where I could mess about with this kind of thing and stand a chance of having someone be able to see instantly why I just let the magic smoke out (again).

It doesn't look like there is, though. Any suggestions?


jaala: (Default)

December 2008

  1 2 3456
7 891011 1213
1415 1617181920

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 24th, 2017 06:41 am
Powered by Dreamwidth Studios