|
much as i love apl-derived stuff, the point about forth is that it does manage a weird sort of high-level programming while requiring almost no runtime whatsoever (rawer than c for the most part), and it is very predictable and friendly in how it uses memory. notably it basically has a stack (where almost all actual work happens), a small dictionary for words, and then it has the concept of "blocks", which are small (1024 bytes) chunks of contiguous memory, which is what forth code will usually operate on (forth classically does not have a concept of a file). obviously this means that forth has very little need for a simple address space or mmu, since it is expecting to work on fragments of memory as a matter of design apl and lisp by cocmparison are all implicit temporary memory being thrown around. they are also high-level in a very different sense, but forth is indeed pretty friendly to work with once one gets the hang of it (which does not take long), it is entirely extensible, gets quite readable, and it is good with dynamic loading and changing of code etc.
|
# ? May 26, 2017 08:34 |
|
|
# ? Jun 5, 2024 08:14 |
|
i wonder if any adaptation would be needed to make simple forth code run on both a Canon Cat and an old power mac's open firmware interpreter
|
# ? May 26, 2017 08:43 |
|
thanks for the LTSpice suggestions -- i think i am figuring it out here is the tachometer reader thingy again sooo I downloaded the real trace from my scope and figured out how to load it in SPICE to gently caress around with the circuit and see what happens. quite fun actually and very educational. one of the things i somehow missed before is that the initial pulse also spikes to -80v or better, like a classic inductor field collapse pattern. that was really messing things up so i put a flyback diode (d1) and small resistor (r1) into the circuit to deal with it. those components handle the oscillation nicely, but can anyone foresee any problems with including them there? also, having the increased resistance there meant I had to change some of the filter settings to get them to work correctly and yada yada in the end I wasn't sure that there was enough current showing up to drive the optoisolator directly. so i put in a MOSFET to make it voltage-controlled instead of current-controlled and that appears to work well in the simulation. any pro EEs who would be willing to check my work? Sagebrush fucked around with this message at 18:56 on May 26, 2017 |
# ? May 26, 2017 18:50 |
|
BobHoward posted:idk about the rest but the answer to the last is that forth dudes are weird and super dedicated to doing everything in forth and insisting that no, your fancy modern technology is worthless next to the glory of forth had an ion implanted that ran on forth at my last job. the support engineers were exactly like this.
|
# ? May 26, 2017 19:25 |
|
All forth users look like this fyi
|
# ? May 26, 2017 20:35 |
|
the page of heavy-hitting forth-supporting posts
|
# ? May 26, 2017 21:05 |
|
even I have not used forth
|
# ? May 26, 2017 21:19 |
|
i know i keep spamming this thread but i am finding this stuff p cool the version of that thing i posted above was annoying to me bc the flyback still acts like a short across the coil, so here is another one that just rectifies and smooths the signal and feeds into a comparator this version also shorts the coil but it's continuous and it's through (currently) 2000 ohms, which is about 1000 times the coil resistance. so that shouldn't cut much energy out of the spark. decisions decisions. e: and i suppose there's no real problem with swapping the resistors to 10k and c1 to 0.1uF and then we're talking about only a few microamps shunted away from the coil Sagebrush fucked around with this message at 03:21 on May 27, 2017 |
# ? May 27, 2017 03:14 |
|
ya a big fat input resistance when you've got a low impedance source like that n you're just interested in the voltage and it's not some super high speed application is totes legit
|
# ? May 27, 2017 07:01 |
|
Luigi Thirty posted:even I have not used forth you could build a tight Forth in 65816 assembly and then use it for your IIgs hacking ever think of building any Apple II hardware to interface with it? you've got lots of slots...
|
# ? May 27, 2017 08:00 |
|
Sagebrush posted:i know i keep spamming this thread but i am finding this stuff p cool fwiw i'm also finding your stuff really cool. especially since my rust arduino project has kinda stalled
|
# ? May 27, 2017 08:29 |
|
have you tried wrapping a few turns of wire around the coil and picking it up inductively? or maybe just making a simple current transformer on the coil return line it might actually be a cleaner signal, isolated, and less worry about affecting circuit operation (it will obviously still tap some energy from the inductor, but maybe a very small amount) capactively coupling it by just putting an electrode near the coil output would also work, but might be more sensitive to interference than an inductive pickup.
|
# ? May 27, 2017 11:12 |
|
eschaton posted:you could build a tight Forth in 65816 assembly and then use it for your IIgs hacking they make blank prototyping cards but I'm not much of an EE beyond loving with arduinos
|
# ? May 27, 2017 11:41 |
|
then Apple II stuff should be pretty simple since it's much slower and wider
|
# ? May 28, 2017 06:49 |
|
eschaton posted:then Apple II stuff should be pretty simple since it's much slower and wider much like your mom
|
# ? Jun 1, 2017 07:02 |
|
wow, rude
|
# ? Jun 1, 2017 17:45 |
|
nvidia is using RISC-V to replace their onboard microcontroller Falcon. guess it's got legs
|
# ? Jun 1, 2017 20:09 |
|
Spatial posted:nvidia is using RISC-V to replace their onboard microcontroller Falcon. guess it's got legs https://www.youtube.com/watch?v=gg1lISJfJI0
|
# ? Jun 1, 2017 20:32 |
|
Spatial posted:nvidia is using RISC-V to replace their onboard microcontroller Falcon. guess it's got legs i think some of the chinese fab houses may be inclined to move towards it -- no licensing fees for something you make 100M+ of? woo hoo!
|
# ? Jun 3, 2017 01:14 |
|
yeah risc v seems like a no brainer in any application which doesn't care about fmax or super low power, and binary compatibility with arm is not an issue. it's not going to displace arm any time soon but should pop up in all sorts of deeply embedded control stuff
|
# ? Jun 3, 2017 01:37 |
|
Star War Sex Parrot posted:yeah here's a video from about a year ago explaining what they're doing with it motherfreakin dave patterson asking a question
|
# ? Jun 3, 2017 01:47 |
|
i have been workin on the motorcycle thing and hopefully should have some real cool results soon but i just gotta say god drat, it is SO nice having this digital oscilloscope. having the ability to sample 4 channels at once and pause waveforms and zoom in and watch every piece of the circuit doing its thing. like i'm looking at a trace of a 20-nanosecond-long ringing from the inductance of a 6 inch long piece of wire, holy poo poo. feelin like doctor manhattan: "I have witnessed events so tiny and so fast, they could hardly be said to have occurred at all." fuckin bad. rear end. every electronics hobbyist who doesn't own a DSO should go out and buy that rigol 1054 immediately
|
# ? Jun 3, 2017 20:45 |
|
oscilloscopes loving own. make sure to actually read the manual, too, especially when working with higher end scopes. they can do literally everything. love blowing all my coworkers minds, no matter how senior, with wild rear end triggers
|
# ? Jun 3, 2017 21:35 |
|
are there fancy scopes that allow you to basically script a trigger? like "if data bus 1 value is 0xABCD and then within 20us there is a low pulse on analog line 1 lasting less than 10ns, wait 100ns and trigger" i mean it's academic because we can't afford anything like that
|
# ? Jun 3, 2017 22:40 |
|
you might be able to do that with an A-B trigger on a sufficiently fancy scope. set up a data trigger on A then the pulse less than x duration trigger on B then set the delay right
|
# ? Jun 3, 2017 22:42 |
|
DuckConference posted:are there fancy scopes that allow you to basically script a trigger? like "if data bus 1 value is 0xABCD and then within 20us there is a low pulse on analog line 1 lasting less than 10ns, wait 100ns and trigger" the sweet rear end $$$ tek scope we have at work can if you pay more $$$ for the i2c or whatever else software unlocks
|
# ? Jun 3, 2017 23:24 |
|
yeah back when i was paid to use big fancy LA's you could set up state machines that triggered logging like "when you see this address come in over PCIE start sampling until $mangled address goes out over DDR"
|
# ? Jun 3, 2017 23:56 |
|
hell yeah you guys it works designed a filter/comparator circuit that I'm happy with, simulated it in SPICE, got results that suggested they should work built the circuit connected to motorcycle oh holy poo poo the scope trace looks exactly like the simulation aaaaaaaaaa boooooooieeeeeeeeeeeeeeeeeeeee
|
# ? Jun 4, 2017 00:23 |
|
Nice! grats on making a real Thing that works like the simulation does
|
# ? Jun 4, 2017 00:57 |
|
Sagebrush posted:hell yeah you guys it works excellent
|
# ? Jun 4, 2017 01:09 |
|
super cool!
|
# ? Jun 4, 2017 01:11 |
|
matches the simulation? what is this sorcery
|
# ? Jun 4, 2017 01:33 |
|
Luigi Thirty posted:Nice! Thanks. Personally I'm more proud of being able to work the simulation accurately enough that the results I get are representative of the real world and not just total junk Like sometimes my students will ask about doing an FEA simulation of their part in SolidWorks, and I ask "what are you going to make it out of?" and they're like "wood" and I'm like "ok, that's anisotropic, so what's the Young's modulus of the wood you're using in each axis"? and they're like "what" and I'm like "hahahahahahaha" One thing I noticed that is different is the real world capacitance at C1 appears lower than in the simulation. I believe that has something to do with derating capacitors at high frequencies and voltages. Still works tho Sagebrush fucked around with this message at 01:42 on Jun 4, 2017 |
# ? Jun 4, 2017 01:33 |
|
also caps have absolute garbage tolerances
|
# ? Jun 4, 2017 01:37 |
|
Bloody posted:also caps have absolute garbage tolerances one thing I remember from circuits lab was that the big capacitor in our kits had a 20% tolerance mine was actually 25% under spec
|
# ? Jun 4, 2017 01:44 |
|
I wonder if we have any trimmer caps in the right range sitting around the lab. That might be neat to experiment with Is there a way to measure the actual capacitance of little tiny capacitors that doesn't require a mega expensive meter? I suppose I could do it with my scope and a precision measured voltage and resistor, but my Fluke meter, though pretty accurate, only goes to 4 digits so I don't know if I could really analyze these little 10 nanofarad dealies Another solution of course would just be to bring the capacitor rating way up and the resistors way down, since bigger capacitors seem to be a little more accurately manufactured, but then I'd start to worry about shunting too much power away from the coil circuit. Right now the reader circuit has like 150 kiloohm impedance and the engine doesn't miss a beat Sagebrush fucked around with this message at 01:51 on Jun 4, 2017 |
# ? Jun 4, 2017 01:49 |
|
Sagebrush posted:I wonder if we have any trimmer caps in the right range sitting around the lab. That might be neat to experiment with you have a good scope. calculate the time constant and use your good dmm to measure the resistor
|
# ? Jun 4, 2017 01:51 |
|
That's some cool poo poo right there Would an indirect measurement with a magnet and hall sensor on the chain work ?
|
# ? Jun 4, 2017 02:23 |
|
this particular bit is for the tachometer, so no -- measuring from the chain/sprockets would give you wheel speed. to get engine speed i need to read something coming from the engine before the gearbox, so as detailed earlier in the thread, that means 1) the existing signal that drives the stock tachometer (what i did) 2) wrap a wire around a spark plug lead and count those pulses inductively (reasonable, but I don't want to add extra wires running all over the bike if possible) 3) patch into the spark generator unit's pickup (don't want to splice the wires to something so critical) 4) add a hall/optical/inductive/other sensor directly on the crankshaft (way overkill, far more complicated) also i wouldn't gently caress with the chain either way. you really don't want to risk jamming or breaking it somehow. there are systems using magnetic reluctance to read the rotation of sprocket-like objects -- that's how an ABS system measures wheel rotation, for instance -- so i could theoretically get wheel speed by sticking something like that on the swingarm and counting rotations of the rear sprocket. however, i already have a really convenient spinning cable coming from the front wheel (drives the stock speedometer) and i have built a little adapter that takes that cable and spins a magnet in front of a hall effect sensor to read the front wheel revolutions, and hence distance and speed. so you are right on the money there.
|
# ? Jun 4, 2017 02:34 |
|
|
# ? Jun 5, 2024 08:14 |
|
the way the stock speedometer works is super cool, btw. the spinning cable is connected to a ring-shaped magnet, and that magnet rotates at a 45-degree angle inside a metal cup. the metal cup is connected to the speedometer needle. as the magnet spins and its field goes in and out of the cup (bc half of it is inside and half is outside), it induces a current in the cup, which creates a counterbalancing magnetic field, so the cup is "dragged" along with the rotation of the cable. the needle is on a carefully balanced spring, and as the magnet spins faster, the pull on the cup increases and the needle is pulled further around the dial, stopping at whatever point the induced magnetic pull is balanced by the spring tension. slow down, field drops, spring pulls it back down the scale. no electronic parts whatsoever, just electromagnetic physics.
|
# ? Jun 4, 2017 02:41 |