Analogue In - IO from Scratch - Part 2

  Переглядів 8,103

James Sharman

James Sharman

День тому

I have joked in the past that I prefer to stay as far away from analogue signals as I can, but sometimes we want to deal with the real world. In this video I continue my new series on interfacing to look at reading in an analogue signal. Here we use a technique common in early gaming systems using general IO lines and a 555 timer in monostable configuration to read potentiometers. I finish of fully implementing a PC analogue joystick into the build with only a few basic components.
0:00 Introduction
1:19 Start with a potentiometer
2:37 555!
4:01 Principle test
5:05 the bit where I Turning my homebrew cpu into a basic clock circuit
6:33 First Test and troubleshoot
8:12 Creating a reading
9:34 Working Analogue Input
10:57 Connecting a Joystick
12:43 Reading both axis
15:45 Both axis working
17:02 Connecting the buttons
17:19 Fully working joystick!
17:54 Outro
EEVblog’s video on “How an Analog PC Joystick Works” • EEVblog #1054 - How an...
Making the Joystick-Dupont adapter • PC Joystick to Dupont ...

КОМЕНТАРІ: 134
@wesleymays1931
@wesleymays1931 Рік тому
"Of course now I'm going to have people demanding I write a flight simulator" Well... you made a joystick interface. You know the rules.
@weirdboyjim
@weirdboyjim Рік тому
Eack!
@renaissanceman5847
@renaissanceman5847 Рік тому
James, I'll say it again. this has got to be one of the cleanest 8 bit builds I have seen as well as being one of the fastest custom 74 series CPUs. The test on bread boards and transition to surface mount along with the attention to aesthetics makes watching your videos very enjoyable. I look forward to seeing this evolve.
@weirdboyjim
@weirdboyjim Рік тому
Very kind words! Glad to hear you are enjoying!
@marianaldenhoevel7240
@marianaldenhoevel7240 Рік тому
I learned about this way of doing A/D conversion just like you by looking at the "gameport" implementation. In my case it was on an ISA card. I needed someone to explain how this trivial looking bit of electronics achieved analog input and when it clicked it blew my mind. Mainly because it made obvious to me how a change of timescale can make a qualitative difference. There is code, which we easily antropomorphize to be patiently waiting for the cap to discharge. Yet it seems instantaneous to us actual humans.
@weirdboyjim
@weirdboyjim Рік тому
Indeed, even on this basic homemade cpu we can write loops than run >100k times a second.
@your_utube
@your_utube Рік тому
analogue is much-maligned, but it is as close to life as we can get. This is making it real. One can almost taste the actual electrons watching this stuff being created and made to obey. Thanks James. Nice bit indeed!
@weirdboyjim
@weirdboyjim Рік тому
Good to hear you found it enjoyable!
@gregvandenberg2859
@gregvandenberg2859 Рік тому
I always wondered about that calibration step, and after 30+ years, I've finally seen an explanation! Thanks james!
@weirdboyjim
@weirdboyjim Рік тому
Glad you found it interesting!
@michaelboyd9434
@michaelboyd9434 7 місяців тому
Wow, only just watched this video some 5 months late! Such a beautiful and efficient Analogue to Digital conversion technique. They really knew how to do things the easy way back in the day! Thanks also for the link to Dave Jones video.
@weirdboyjim
@weirdboyjim 7 місяців тому
Glad you enjoyed it!
@pissmilker2313
@pissmilker2313 Рік тому
Perfect way to start my weekend
@weirdboyjim
@weirdboyjim Рік тому
Hope it lives upto expectations!
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
Going through JS video withdrawals, so I asked an AI to write a poem. It's not Keats, but hey: James Sharman, whose videos bring light, His content brings joy, even in the night. His creativity, wit, and charm, Leave us wanting more and more. With every video he does share, We fall in love with his videos, we dare. His work, it's truly a masterpiece, We can't wait for his next release.
@weirdboyjim
@weirdboyjim Рік тому
I wasn't sure how to reply, so I got AI to help me - "Wow, I am truly honored and humbled by your kind words. It means so much to me to hear that my videos have brought joy and entertainment to your life. Thank you for taking the time to share your thoughts and for asking an AI to write a poem about me - that's pretty cool! Your support and encouragement inspire me to continue creating content that you'll love. Thanks again!"
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
@@weirdboyjim 🤣
@jackflash6377
@jackflash6377 Рік тому
I used to use the same technique back in the 90's when I was playing with PIC16F84 MCUs and making line following robots with them. Just sample the pin until it went from high to low, switch it to output to charge the cap, switch back to input and sample over and over until it went low. This gave a poor man's ADC and worked like a champ. No 555 needed.
@weirdboyjim
@weirdboyjim Рік тому
Yeah, I could do it with a cap and a diode but you are relying on the trigger threshold of your input pin being consistent.
@jackflash6377
@jackflash6377 Рік тому
@@weirdboyjim There is some definite hysteresis on the levels but for most of the applications I used, it worked fine. Really enjoyed your video and the project. Wish I had time to get back into that hobby. It was my passion for many years.
@Stabby666
@Stabby666 Рік тому
This is great, and could work the same way we do it with MCUs, by having it interrupt driven. Start discharging the cap with a timer set to zero, then increment the timer via the CPU clock (via a divider I guess, as you probably don't need extreme resolution), then the GPIO generates an int to store the timer value and set a flag indicating the conversion is complete. A lot of MCUs only have one or two actual ADCs, and multiplex them too. So I guess if you multiplexed you could indicate the channel when starting the timer and the elapsed count could be stored in a location related to the channel, so all of this would essentially happen in the background, and the main CPU code only needs to read from those memory locations when it feels like it :)
@weirdboyjim
@weirdboyjim Рік тому
Indeed. But without interrupts I do find myself thinking about what tasks I could interleave. The Atari 2600 counted scan lines so it mixed it in with other work. Need a bigger cap for that though.
@ShellacScrubber
@ShellacScrubber Рік тому
Excellent stuff !
@weirdboyjim
@weirdboyjim Рік тому
Thanks!
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
Thanks for another great video!
@weirdboyjim
@weirdboyjim Рік тому
Thanks! Glad you enjoyed it!
@Vintaronica
@Vintaronica Рік тому
Oooohhh something decent to watch! 😊
@weirdboyjim
@weirdboyjim Рік тому
Hope it didn’t disappoint!
@Vintaronica
@Vintaronica Рік тому
@@weirdboyjim James, what you are doing is incredible. Your knowledge and application of electronics is refreshingly simple to understand. My background is also electronics, mostly in the analogue domain as that where my interest lies, however I have experimented with logic circuits for hours and hours as a kid, but growing up in the late 80’s early 90’s many of the formative years of computer development that were around in the late 60’s and throughout the 70’s into the early 80’s were missed in our generation. I always found it hard to connect and visualise what is happening on an electronic level in computing when it comes to coding, your series has shown me that it is indeed whatever the designer of the cpu decides it is, there are no rules when designing a cpu for the ground up, just what you want to represent in binary. I get it now and it’s absolutely fascinating. Keep it going good work 👍👍
@TheGunnarRoxen
@TheGunnarRoxen Рік тому
Love it! Very simple, but surprisingly effective
@weirdboyjim
@weirdboyjim Рік тому
Thanks! I really enjoyed this build, nice to get concrete functionality with only a little circuitry!
@stupossibleify
@stupossibleify Рік тому
Loving this series, gets better with every episode. Clear explanations, utterly compulsive viewing
@weirdboyjim
@weirdboyjim Рік тому
Very kind words! I try but I often kick myself while editing the videos that I didn’t say things clearer.
@garthberry
@garthberry Рік тому
Brilliant, as always!
@weirdboyjim
@weirdboyjim Рік тому
Thanks Garth! Glad you liked it.
@weirdboyjim
@weirdboyjim Рік тому
I appreciate the support thank you!
@hanfman1951
@hanfman1951 Рік тому
What a nice way to do that. I learned that in school but forgot it. This is such a clean ADC. Awesome!
@weirdboyjim
@weirdboyjim Рік тому
Thanks! Glad you liked it!
@edgeeffect
@edgeeffect Рік тому
I've always considered ADC and DAC to be just "black boxes"... It's quite a revelation watching you reduce it back to it's basics and seeing how simple it is to make a ladder of resistors for one and time the charging of a capacitor for the other. As always, someone pulls back the curtain and you say "oh! Is that all you need to do?!" :)
@weirdboyjim
@weirdboyjim Рік тому
Thanks! I am planning on showing a better way of build an ADC in a future video.
@jerril42
@jerril42 Рік тому
Thanks James. That was interesting. Since it depends on resitance there is no need for a voltage divider. Very cool. Take care.
@weirdboyjim
@weirdboyjim Рік тому
Thanks Jerril, glad you liked it!
@dusterthefirst
@dusterthefirst Рік тому
This is super cool! The circuit works very similarly to a dual slope ADC, just using an input resistance rather than an input voltage. It’s quite a nice simple way to read the potentiometer with quite good resolution and little error.
@weirdboyjim
@weirdboyjim Рік тому
Thanks Duster! I may do another video on a different ADC technique.
@schrodingerscat1863
@schrodingerscat1863 Рік тому
It's called a single slope or ramp integrating ADC. Dual slope would also discharge the capacitor through a resistor to measure discharge time.
@maskloy
@maskloy Рік тому
very good job
@weirdboyjim
@weirdboyjim Рік тому
Thanks Jean!
@schrodingerscat1863
@schrodingerscat1863 Рік тому
What you have built there is a rudimentary single ramp integrating ADC. If you added a counter and a comparator and a latch to count and store the rise time it would reduce your processor utilisation and turn your circuit into stand alone integrating ADC.
@weirdboyjim
@weirdboyjim Рік тому
I worked out a circuit with a couple of counters and a latch to automate this but I’ll be showing other techniques in future.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
used to do this on pic's using one pin. Set pint to output and set low-- ground the cap Set the pin to a input and time until it sees a 1 Works well for most things.
@jackflash6377
@jackflash6377 Рік тому
Did the same only set the pin to output and high, charge the cap then change it to input and watch for it to go low. The threshold was like 1.2v for low so that gave you from 5v to 1.2v so more resolution than going from low to high which in the PIC16F84 was like 1.8v (If my memory is correct).
@weirdboyjim
@weirdboyjim Рік тому
Yeah, I figure I can do it with one output and one input and the cap.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
@@jackflash6377 with bidirectional ports it's quite easy to do it with one pin. it's harder when you can't make the pin go high impedance, but diodes can help with that. I love old school logic.
@twobob
@twobob Рік тому
Good to the last second. Ah the good old days. Before wimpy crowbars on the power line or fussy low voltage circuits. When opening your TV gave you a haircut like Yahoo Serious and when it said danger of death it didn’t mean brain death as you examine parts smaller then your tweezer end. I say you throw in something that uses ultrasound and create the worlds least capable Wii game. Cricket might be nice. I seem to recall the spectrum had cricket with stick figures in some sort of isometric projection. That. Plus a ultrasound sensor. Boom. Wii. Done :)
@weirdboyjim
@weirdboyjim Рік тому
Glad you enjoyed it lol! I need to have a think about what games I will implement.
@kriswillems5661
@kriswillems5661 Рік тому
Given a transistor is a current multiplier and given the voltage on a capacitor linearly increases in time when given a constant current, it would be very easy to implement this with a transistor and the behaviour would be pure linear, which gives you more accuracy.
@weirdboyjim
@weirdboyjim Рік тому
Lots of ways you can do this. I may try a few others out when I have time.
@kriswillems5661
@kriswillems5661 Рік тому
Yeah, and the 555 timer also behaves linear, unlike I assumed.
@petesapwell
@petesapwell Рік тому
Smashing stuff, you really want to get a 100uF cap across the power rails near the NE555, they crowbar the supply when discharging and can cause all sorts of nastiness :) you could see it in the rising edge (overshoot) on the scope at one point.
@weirdboyjim
@weirdboyjim Рік тому
Thanks! As big as 100? I usually put a 10uf on the pcb’s.
@petesapwell
@petesapwell Рік тому
@@weirdboyjim Yeah I usually go with that, these days (esp at 5V) very little difference in physical size :)
@weirdboyjim
@weirdboyjim Рік тому
Join us on Discord: discord.gg/jmf6M3z7XS Follow me on Twitter: twitter.com/WeirdBoyJim Support the channel on Patreon: www.patreon.com/JamesSharman On the Discord's Video-Discuss channel I've pined a zoomed in picture of an early pc (ISA) game port card, it's easy to see the circuit is conceptually very similar to what I do here alongside just enough decoding logic to map the IO lines in. discord.gg/jmf6M3z7XS
@penguineer
@penguineer Рік тому
Very cool! Did you consider extending the circuit with a counter that would just put the number on the bus, so that the CPU could do other things instead of counting until a line goes high? (You don't want to go more into that, but maybe interesting for other A/D conversation builds in the IO module, depending on your plans.)
@weirdboyjim
@weirdboyjim Рік тому
The circuit would be easy, but in this series I wanted to do stuff with software. 2 counters and a couple of latch chips should do it. Use the carry line to trigger.
@chinesepopsongs00
@chinesepopsongs00 Рік тому
Was exactly the same i did think of when i was watching. Also in software you don't want it to depend on a code loop. Have done a speed controller for model cars in the past and those also had a pulse width to measure as input. You want a steady signal to compare agains so internal clock or high pace irq. Code loops make it inaccurate.
@weirdboyjim
@weirdboyjim Рік тому
@@chinesepopsongs00 this code loop is exactly accurate. No interrupts and a cycle balanced loop. Not my first rodeo.
@Zadster
@Zadster Рік тому
It would be interesting to see someone use a 74HC590 and a comparator+clamp transistor.
@cskilbeck
@cskilbeck Рік тому
So awesome - GPIO interrupt feature would be handy...
@weirdboyjim
@weirdboyjim Рік тому
Thanks Charlie. Interrupts are something I’ll add to a future build.
@cskilbeck
@cskilbeck Рік тому
@@weirdboyjim A timer would be super handy in this case as well - you could read the joystick with almost no CPU usage
@RealNovgorod
@RealNovgorod Рік тому
Converting a voltage/resistance into a PWM signal is clever for this kind of applications - the CPU can naturally measure time with high precision and you save on bus logic because the "analog" signal is basically treated like serial data rather than parallel data with a real ADC. The only question is, how linear is the pulse width from the 555 with the resistance? I'd guess the nonlinearity is negligible for gaming, or you can implement a very simple LUT for linearization (which is what the "calibration" screen in a videogame does).
@weirdboyjim
@weirdboyjim Рік тому
I would have thought it would be very linear, I’m more worried about the cheap linear pots some of the joysticks have.
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
2:30 The circuit you're describing is somewhat similar to how capacitive touch sensors work as well. That's kind of cool.
@weirdboyjim
@weirdboyjim Рік тому
Hmm, I haven’t looked into that but I can see how it might work although the capacitance is what would be changing rather than the resistance.
@khatharrmalkavian3306
@khatharrmalkavian3306 Рік тому
@@weirdboyjim Right. You run out a large-ish capacitive surface out from a lead, then you connect it through a resistor to a second lead. The first lead turns on periodically, and the second lead waits for an up-going signal. The capacitance of the surface should take a fairly regular amount of time to fill up and reach the trigger-point of the reader. However, if you touch the surface with your hand, your skin increases the total capacitance, causing the fill-up time to suddenly become longer. When I learned about them I was shocked by how easy it was to implement.
@absalomdraconis
@absalomdraconis Рік тому
Since you've mentioned that you're considering another ADC video, I'll throw out a two-bit circuit I've been thinking of trying. You run your input voltage to the bases of two "identical" NPNs (Q1 & Q2). Those are (independently from each other) tied to ground through a resistor (R3 and R4 in my schematic), a diode (for the voltage drop), and another resistor. One bit is pulled from the points between the diode and the ground-most resistor (through buffers, to avoid problems), resulting in two bits. Those same points each control a PNP (Q5 & Q6 in my schematic) transistor, which is connected to the _opposite_ branch's R3 or R4 & diode through a resistor (R9 or R10) of it's own (the transistor is meant to operate in saturation, allowing the current flow to be controlled directly by those extra resistors). The concept is that Q1 & Q2 produce basically identical amplifications of the input signal, which will turn on the buffers if the input voltage was high enough, and also will turn on Q5 & Q6 in that case. Meanwhile, if Q5 & Q6 are turned on, then they will steal a _limited_ amount of current from the opposite branch through R9 or R10, which in turn will reduce the voltage in that other bank, possibly turning off whichever of Q5 or Q6 is controlled by it. By itself it sounds like this should be just an oscillator, but if you give R9 and R10 sufficiently different values then one will decisively be the "low" bit and the other the "high", with the bits "quickly" settling, and oscillations only if you're presenting an intermediate voltage. I assume that these could be chained at the low-bit current-theft points, but I'd worry about stability with each additional bit.
@weirdboyjim
@weirdboyjim Рік тому
Interesting, very different from what I’ll show next though. I’ll be interested to know what you think of that when I publish the video.
@diobrando2160
@diobrando2160 Рік тому
I saw that the Atari 2600 paddle uses this method. Very simple solution to an otherwise complicated problem. It works even better on the 2600 because you can measure if the cap is charged on each scanline to position things like paddles in pong.
@weirdboyjim
@weirdboyjim Рік тому
Yeah, although there is nothing to stop me putting a larger capacitor in and checking each scan line as well.
@TymexComputing
@TymexComputing Рік тому
Analogue is great - my prime-dean (the head of university) made a thesis over the analogue processors :) - i mean using simply the opamps and so instead of digital maths in an electronic machine :) - the SSDs though digital are really analogue physical devices - you need to adjust the voltage sometimes to be able to read a page :)
@weirdboyjim
@weirdboyjim Рік тому
Opamps were originally designed for analogue computing, might be fun to experiment with them at some point.
@AJMansfield1
@AJMansfield1 Рік тому
Super cool! Also not the approach I'd guessed you'd take; I'd expected you'd go right to implementing a binary-search ADC -- that is, an R-2R ladder DAC plus a comparator to tell you if the DAC output is higher or lower than the analog input.
@weirdboyjim
@weirdboyjim Рік тому
lol, let’s not get ahead. But that kind of ADC is much faster than this. Watch this space 😉
@AJMansfield1
@AJMansfield1 Рік тому
@@weirdboyjim I look forward to seeing it! Though, the hardware implementation of the binary search ADC can be almost as trivial as the RC-time ADC -- you just feed the R-2R off GPIO output pins and loop the comparator back to a GPIO input, and let the CPU implement the search algorithm in software. It's also pretty straightforward to move that binary search logic to hardware though, with just one shift register and one accumulator register. (Shift register scans a single bit across from most to least significant; this is ORed with the accumulator contents, which gets fed back to the accumulator input and to the R-2R; the comparator output then just feeds the accumulator's load enable line. The only other things you need there are the bus interface logic and a tiny bit of logic for resetting and triggering the start of a conversion, plus probably a clock divider to slow down the conversion speed to keep within the comparator's bandwidth and propagation delay limits.)
@berntolovhellstrom8891
@berntolovhellstrom8891 Рік тому
Very nice design. Another IC, i have used in this kind of designs is 74HC123. It got 2 monostable inside and it will be less parts. No real difference, the results will be the same though.
@weirdboyjim
@weirdboyjim Рік тому
Yeah, I thought about using a 74xx123 but the 555 is such a jelly been part it’s nice to use them.
@peter.stimpel
@peter.stimpel Рік тому
Nice one. Even this is a sidebuiild only, one might expect you to run a demo using the joystick. For the record, I did not say doom.
@weirdboyjim
@weirdboyjim Рік тому
Thanks Peter! I thought about hooking it up for something graphical but with the vga in there I have no space! That last vga video I had part of the build on a bit of plywood hanging of the side of my desk.
@peter.stimpel
@peter.stimpel Рік тому
@@weirdboyjim Plywood ... I love this hack. Now you can feel Konrad Zuse. He needed a lot of space for Z1 as well ;)
@FrankGevaerts
@FrankGevaerts Рік тому
You should write a flight simulator! (Sorry 🙂 )
@weirdboyjim
@weirdboyjim Рік тому
Thanks Frank, I appreciate that.
@BinderTronics
@BinderTronics Рік тому
Best of luck with the flight simulator. You have some videos that you write code in C/C++. Do you have a video of where you did the compiler port?
@weirdboyjim
@weirdboyjim Рік тому
I've only written an assembler. All the coding for the cpu is done in assembly language, I do have some tools for generating roms or data written in c/c++ though.
@Schwuuuuup
@Schwuuuuup Рік тому
When I saw what you planed to do, I knew you were going for the timing method, but my mind went in another direction: could you use a 8-bit (or so) counter IC, maybe a 74xx590 with output register. Connect it up to the system clock and have the reset/latch driven by the capacitor/potentiometer circuit? sure, this is more involved, but performance wise it could read the value without hogging the CPU
@weirdboyjim
@weirdboyjim Рік тому
Absolutely. I wanted to go as simple as I could with this series but it’s very easy to see simple circuits that would do the job.
@twobob
@twobob Рік тому
First thought. Add a “I is a dumbwit, did I watch part one?” Link in the description at the top. “Part one, in case you missed it”
@weirdboyjim
@weirdboyjim Рік тому
Well you don’t really need to have watched the gpio video to watch this.
@twobob
@twobob Рік тому
@@weirdboyjim totally. but anything that opens with "In part 1 we..." should have a link to the reffed video. Not trying to be a dufus, however i did instinctively glance for it since it was mentioned
@andymouse
@andymouse Рік тому
Superb, I didn't know how creative they were back in the day but I guess they had to be. Does this technique have a proper name I would love to learn more ?...cheers.
@weirdboyjim
@weirdboyjim Рік тому
People in the comments are calling it a “Single ramp ADC” but the basic form here I just got from descriptions of how old gaming hardware worked.
@andymouse
@andymouse Рік тому
@@weirdboyjim Cheers !
@randomelectronicsanddispla1765
@randomelectronicsanddispla1765 Рік тому
Only just started the video and have to admit, even though electronics is my main hobby, I had never considered or read about analog input without adc. My guess would be forming an RC oscillator with the potentiometer and count CPU clock per RC oscillator cycle Edit: OK, maybe I took "no adc" a bit too literally. I figured discrete single slope adc were ruled out
@weirdboyjim
@weirdboyjim Рік тому
Close, I’ll explore other methods in the future.
@randomelectronicsanddispla1765
@randomelectronicsanddispla1765 Рік тому
​@@weirdboyjim OK, maybe I took "no adc" a bit too literally. I figured discrete single slope adc were ruled out
@francomencacci6694
@francomencacci6694 Рік тому
a newbie here. maybe you can replace the two 555s with a single 556? excellent videos! keep it up!
@weirdboyjim
@weirdboyjim Рік тому
Of course you could. But I was building one channel and then replicating it so it was easier to not complicate the description.
@gawkersdeathrattle1759
@gawkersdeathrattle1759 Рік тому
Heh, as soon as I saw "analogue", I was thinking "He's gonna pull out a 555 and a cap"... and sho 'nuff :D It's remarkably straightforward and useful. This is the way (although in a slightly more slick fashion) they used to do it in the Atari 8-bit line's paddle inputs. It was effective enough that, with a little glue electronics, you could digitize audio (at a ridiculously low bitrate, but it worked).
@weirdboyjim
@weirdboyjim Рік тому
Indeed, it’s a useful circuit to know!
@sjwatt
@sjwatt Рік тому
Could you do both axes with just one channel by interleaving them? Using a couple of transistors on the analog side to switch which channel is being read? Edit: aha, I jumped the gun on that comment, I didn’t see the part about how you wanted to read them simultaneously. It’s a really cool ADC though, so simple and yet perfectly effective for a low precision input.
@weirdboyjim
@weirdboyjim Рік тому
I was about to comment that you could, but it would double the read time.
@MrDoboz
@MrDoboz Рік тому
well, maybe not a flight simulator, but a racing simulator? like the thing you did for scrolling demonstration
@weirdboyjim
@weirdboyjim Рік тому
I may visit that racing demo when things are more complete.
@OscarSommerbo
@OscarSommerbo Рік тому
Using a 556 timer you can ditch one timer, for one less component.
@weirdboyjim
@weirdboyjim Рік тому
That’s the right thing to do if you are planning ahead or designing a circuit for manufacture. Separate 555’s make more sense for breadboard build like this, especially since a have a bunch of them in my component tray.
@absalomdraconis
@absalomdraconis Рік тому
​​@@weirdboyjim : I believe the 558 (despite having more pins tied together than the 556) was also good enough for the IBM gameport (even while supporting all 4 analog inputs), though unfortunately they seem to be as rare as hen's teeth. I don't think the 558 is manufactured any more.
@TheWareek
@TheWareek 9 місяців тому
were can you find those old joy sticks. There must have been millions of them but try and find one now is impossible.
@weirdboyjim
@weirdboyjim 8 місяців тому
This particular one I picked up on eBay, they still come up a bit but some of them are pretty rough as the pots degrade with time.
@foxabilo
@foxabilo Рік тому
I demand you build a flight simulator.
@weirdboyjim
@weirdboyjim Рік тому
I new this was going to happen! 😅
@olavl8827
@olavl8827 Рік тому
@@weirdboyjim The People Have Spoken.
@graealex
@graealex Рік тому
Shouldn't it behave more like an ADC peripheral in a microcontroller, i.e. start the sampling process with a register, and be notified when it finishes? Because currently, you are wasting precious CPU cycles just with waiting for the capacitor to charge. Wouldn't take much more than a counter and a few more gates.
@weirdboyjim
@weirdboyjim Рік тому
That’s besides the point, I’m explicitly demonstrating how simply it can be done (and indeed was done on many systems). I’ll demonstrate some more advanced techniques in the future.
@graealex
@graealex Рік тому
@@weirdboyjim Ah okay, I thought this was the precursor to having an analog joystick control a game. And at your development rate, the JAM-1 will have PCIe by the end of the year...
@-lolus-
@-lolus- Рік тому
i was always wondering how ADCs are made
@weirdboyjim
@weirdboyjim Рік тому
There are other ways to do it. I’ll demonstrate another one before I’m done with this series.
@GodmanchesterGoblin
@GodmanchesterGoblin Рік тому
@LOLUS - This isn't how most are made, especially as ICs, but it is a very good way of implementing measurements on microcontrollers and the like that do not have a dedicated ADC function.
@viperwizard491
@viperwizard491 Рік тому
TTL overflow reset counter and 555 timer for counter capture register. no code neded
@weirdboyjim
@weirdboyjim Рік тому
Yes, could be fine with half a dozen more chips. But the point of this was to show what you can do with the minimum.
@gazehound
@gazehound Рік тому
soooooo... flight sim?
@weirdboyjim
@weirdboyjim Рік тому
I am totally going to regret that comment! 🤣
@turbinegraphics16
@turbinegraphics16 Рік тому
atari 2600 does it this way
@weirdboyjim
@weirdboyjim Рік тому
I believe so
@skeleton_craftGaming
@skeleton_craftGaming Рік тому
I mean this is what a DAC does too...
@weirdboyjim
@weirdboyjim Рік тому
Some DAC’s work in away that is similar but most work in a very different way. I’ll demonstrator a different way on future.
GPIO over SPI over GPIO - IO from Scratch - Part 5
25:48
James Sharman
Переглядів 6 тис.
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Переглядів 40 млн
Kitten has a slime in her diaper?! 🙀 #cat #kitten #cute
00:28
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Переглядів 3,8 млн
Introduction to CPU Pipelining
10:29
Merlin Wellington
Переглядів 32 тис.
Hardware SPI - IO from Scratch - Part 6
26:14
James Sharman
Переглядів 6 тис.
A 6502 Based Computer on a Single Breadboard
20:45
Anders Nielsen
Переглядів 29 тис.
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Переглядів 213 тис.
5 Ways To Generate A Sine Wave (Analog)
13:16
Sine Lab
Переглядів 74 тис.
SPI (Bit Banging)- IO from Scratch - Part 4
30:04
James Sharman
Переглядів 9 тис.
Adding GPIO - IO from Scratch - Part 1
20:11
James Sharman
Переглядів 13 тис.
Start from 0 at any point on the T1 Digital Tape Measure
0:14
REEKON Tools
Переглядів 36 млн
Опасная флешка 🤯
0:22
FATA MORGANA
Переглядів 774 тис.
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 1,8 млн
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Переглядів 17 млн
APPLE УБИЛА ЕГО - iMac 27 5K
19:34
ЗЕ МАККЕРС
Переглядів 18 тис.