GPIO over SPI over GPIO - IO from Scratch - Part 5

  Рет қаралды 6,678

James Sharman

James Sharman

Күн бұрын

Пікірлер: 66
@weirdboyjim
@weirdboyjim 10 ай бұрын
Join us on Discord: discord.gg/jmf6M3z7XS Follow me on Twitter: twitter.com/WeirdBoyJim Support the channel on Patreon: www.patreon.com/JamesSharman
@Peter_S_
@Peter_S_ 10 ай бұрын
In my mind this is easily the best CPU engineering series on this platform. Brilliant work, James!
@TroySchrapel
@TroySchrapel 10 ай бұрын
100% agree
@weirdboyjim
@weirdboyjim 10 ай бұрын
Very generous thanks! I can only try my best!
@mike44njdevils1
@mike44njdevils1 8 ай бұрын
What I find intriguing about watching this series: Even though I have very little coding experience, I'm having almost no issues following James' coding. Well done!
@weirdboyjim
@weirdboyjim 8 ай бұрын
That is good to hear! In many regards assembly language is really easy to follow once you have a rough idea of what the instructions do (and good naming helps with that!).
@rimmersbryggeri
@rimmersbryggeri 7 ай бұрын
@@weirdboyjim That's what I thought, assembly is much more logical than high level languages.
@DanDrown
@DanDrown 10 ай бұрын
You mentioned looking at your RTC drift over a longer time period. The 32khz crystals typically have a spec of +/-30ppm, which is about +/-2.6 seconds/day. It's highly dependent upon the temperature of the crystal, and some RTCs even have methods of adjusting the frequency to compensate. The DS3231 is one example of that, but it's an I2C device instead of SPI.
@weirdboyjim
@weirdboyjim 10 ай бұрын
I bought a splashproof lcd clock for my bathroom and it drifts faster than this circuit, I proberbly shouldn't complain.
@captainboing
@captainboing 10 ай бұрын
Nicely done James. Have to say I like your style of video with all the umming and ahing and pauses as your brain ticks 😀 makes everything feel like we are right there with you.
@weirdboyjim
@weirdboyjim 10 ай бұрын
Glad you like them! I make "project" videos rather than "Here's one I made earlier but I'll pretend to to build it for you videos"
@akkudakkupl
@akkudakkupl 10 ай бұрын
HPIB over GPIO over I2C over GPIO over SPI over GPIO, just to be ready for anything that might need to be connected to! ;-)
@weirdboyjim
@weirdboyjim 10 ай бұрын
Might need UART in there as well!
@akkudakkupl
@akkudakkupl 10 ай бұрын
@@weirdboyjim You have one of those already though ;-) could add that to the chain, just to make it even more confusing though!
@TroySchrapel
@TroySchrapel 10 ай бұрын
That's awesome, James. I still need to add SPI to my HBC-56. I've added it to my PICO-56 for SDCard support, but the real metal (HBC-56) can't do it yet.
@weirdboyjim
@weirdboyjim 10 ай бұрын
Thanks Troy! SD cards are a cool little bridge between small digital circuits and something that can easily plug into a modern PC!
@kestergreen3844
@kestergreen3844 2 ай бұрын
Really great to see you using this chip. In part 4 I was thinking about the commodore 64 CIA chip which had the clock aswell as the GPIO feature your implementing today.
@weirdboyjim
@weirdboyjim 2 ай бұрын
SPI really does add some interesting possibilities. I feel conflicted over using these more complex devices though.
@kestergreen3844
@kestergreen3844 2 ай бұрын
​@@weirdboyjim Floppy disks are complex devices. You're swapping one for another. It's actually great. I was telling my partner today how good it is that you're exploring beyond the hardware by developing OS features. You're surpassing the point in a project where other KZbinrs finish up at. Can't wait to see more!
@nickphillips528
@nickphillips528 10 ай бұрын
I dont know if JAM-2 will involve alot of breadboards, but I wonder if you could make little PCB's that do nothing more than act as a mini bus for when you want to move 8 outputs to an LED bar - as an alternative to cutting 8 wires each time. Might need a few for common layouts. A bit like your backplane interconnects - but 2 / 3 pins wide & 20 or so long. Probably would not look as nice mind you.
@weirdboyjim
@weirdboyjim 10 ай бұрын
I have a number of different ideas on how to do bits like this differently. I don't mind a little bit like this, there is something therapeutic about poking some wires into breadboards. I do have ideas to create some modules to simplify some of the common combinations.
@TomStorey96
@TomStorey96 9 ай бұрын
I have an RTC that runs faster during the cooler months and slower during the warmer months. I included a trimmer capacitor in the oscillator circuit and managed to get it down to 1-2 seconds a month, as long as I don't go away on business travel and turn the heating off, at which point it can drift a few more seconds. I don't know how practical it is, but moving the RTC to a warmer part of the house and testing it there would be an interesting experiment too. Some other RTCs I have allow you to add or subtract ticks to/from an internal counter to compensate for temperature swings. It's quite an interesting challenge to keep accurate time when you have no reference.
@weirdboyjim
@weirdboyjim 9 ай бұрын
The whole subject area is very interesting! For this build I'll probably satisfy myself with setting it every now and then.
@peter.stimpel
@peter.stimpel 10 ай бұрын
Happy James = Happy viewer. Im more than happy Im allowed to user higher level languages at work.
@weirdboyjim
@weirdboyjim 10 ай бұрын
Glad you are still enjoying the project Peter!
@peter.stimpel
@peter.stimpel 10 ай бұрын
@@weirdboyjim the memories, you know ...
@edgeeffect
@edgeeffect 10 ай бұрын
I dunno... I'm constantly wishing could do ASM at work.
@kirknelson156
@kirknelson156 10 ай бұрын
I learned some assembly on a trs-80 model III back in the early 80's, trying to follow what you were coding well clearly I've forgotten a lot
@weirdboyjim
@weirdboyjim 10 ай бұрын
I try to limit the amount of coding but sometimes I can't avoid it.
@kirknelson156
@kirknelson156 10 ай бұрын
don't I found it interesting but just sad that its been so long for me that I can no longer follow it like I could 30 some years ago. I took classes on basic, assembly, cobol and Pascal, and now I remember almost none of it. ended up dropping out of collage and joined the navy as an electronics tech. @@weirdboyjim
@helmutzollner5496
@helmutzollner5496 10 ай бұрын
Great demo. Thanks James!
@weirdboyjim
@weirdboyjim 10 ай бұрын
Glad you liked it!
@twobob
@twobob 10 ай бұрын
Only a game dev uses the word "Occluded" correctly :D "I hadn't read the documentation enough"... Looks across at the 90 page PDF that just landed for me to adjust a dongle routine, in Pascal. Oh really? not reading the docs? What's that like? :) Great progress on this. Smooth as ever
@weirdboyjim
@weirdboyjim 10 ай бұрын
Thanks twobob! Hey! I only missed one small detail that completely inverted the meaning of a register!
@RealEngineer
@RealEngineer 10 ай бұрын
Great video as always 🎉🎉🎉
@weirdboyjim
@weirdboyjim 10 ай бұрын
Thanks! Glad you liked it!
@OscarSommerbo
@OscarSommerbo 10 ай бұрын
I happy to hear that you are going to replace bit banging with circuitry. Nothing wrong with bit banging, but it does eat cpu cycles.
@weirdboyjim
@weirdboyjim 10 ай бұрын
I mostly thinking about getting the increased transfer speed.
@teknifix
@teknifix 10 ай бұрын
Your RTC crystal should need some small capacitors (22pF I believe) to operate correctly. It's possible the chip might handle it but it would be worthwhile to check. If they're necessary the crystal will not be putting out a clean signal and you will get incorrect operation. If you covered that in your last video and I'm an idiot I apologize. :)
@weirdboyjim
@weirdboyjim 10 ай бұрын
I expected the capacitors to be there, but the data sheet doesn't have them. I can only assume they are either not needed or included internally.
@m1geo
@m1geo 10 ай бұрын
32kHz don't usually need caps.
@TomStorey96
@TomStorey96 9 ай бұрын
If you need any capacitance it will be detailed in the datasheet of the crystal. It's not always 22pF. I have some 32768hz crystals that are spec'd for 6pF for example.
@weirdboyjim
@weirdboyjim 9 ай бұрын
Ahh, that's interesting. Unfortunately these crystals were an ebay special. I'll have a dig around and see what I can find.
@UntrackedEndorphins
@UntrackedEndorphins 10 ай бұрын
Never thought about it but, Serial Out/Serial In makes so much more sense than MISO/MOSI
@weirdboyjim
@weirdboyjim 10 ай бұрын
The MISO/MOSI notation tries to resolve the issue that Serial Out on one device goes to Serial In on the other and the wording can start to get tricky when you talking about multiple devices.
@TomStorey96
@TomStorey96 9 ай бұрын
I would also say it is heavily influenced by the whole master/slave wording thing.
@OriginalJetForMe
@OriginalJetForMe 10 ай бұрын
SPI is full-duplex, or can be, no? As you’re clocking bits out, valid bits can be coming in. Perhaps not relevant for this chip, but maybe others?
@weirdboyjim
@weirdboyjim 10 ай бұрын
Yes it is! Shifting bit's out and in happens at the same time but it's very common (as with these devices) that only one is relevant. For speed reasons when bit banging you specialize the code.
@andymouse
@andymouse 10 ай бұрын
Very cool !...cheers.
@weirdboyjim
@weirdboyjim 10 ай бұрын
Thanks AndyMouse!
@TooSlowTube
@TooSlowTube 8 ай бұрын
What CPU is this written for?
@weirdboyjim
@weirdboyjim 8 ай бұрын
This is a side series interfacing peripherals to a home made cpu of my own design - kzbin.info/www/bejne/aZqrkppqoJmse8k
@TooSlowTube
@TooSlowTube 8 ай бұрын
@@weirdboyjim I see. Thanks.
@your_utube
@your_utube 10 ай бұрын
Thanks James!
@weirdboyjim
@weirdboyjim 10 ай бұрын
You are welcome!
@edgeeffect
@edgeeffect 10 ай бұрын
Oooh hello 23S08 my old mate. It's been a couple of years now since we spent so much time together. This is a ridiculous idea but... imagine having a 23S08 bit banging SPI to another 23S08 which is bit-banging SPI again and again to ludicrous proportions. ;)
@TSteffi
@TSteffi 10 ай бұрын
You do that 100 times and the data rate will be slow enough to hook up a mechanical actuator that moves something. Like you can have 2 servos one with a red flag attached and one with a white flag. The data and clock would make the servos move the flags. Then you put the whole contraption at a window and have your neighbor across the street point a camera at the window and try decoding the data stream. Then set up the same in reverse for full duplex. At that point, you should be able to wirelessly read and write an SD from across the street. Very, very slowly.
@weirdboyjim
@weirdboyjim 10 ай бұрын
It might be a fun experiment to do one day!
@KeinNiemand
@KeinNiemand 9 ай бұрын
You should somehow connect your computer to the inernet
@weirdboyjim
@weirdboyjim 9 ай бұрын
Would be fun but the barrier to that is limited memory, TCP/IP Packets can be up to 64k which would fill the whole of my memory.
@sparthir
@sparthir 10 ай бұрын
The only issue I have with this is you coding in light mode. ;)
@weirdboyjim
@weirdboyjim 10 ай бұрын
When I started programming there was no theme modes, I got used to sticking with the defaults.
@TheRealBobHickman
@TheRealBobHickman 10 ай бұрын
If I had a dollar for every time I fixed going the wrong way by first going the wrong way even more... :P
@weirdboyjim
@weirdboyjim 10 ай бұрын
Good to know I'm not the only one Bob!
@wiwingmargahayu6831
@wiwingmargahayu6831 10 ай бұрын
eevblog youtube channel
@weirdboyjim
@weirdboyjim 10 ай бұрын
Not sure what you are saying here? I familiar with the eevblog channel.
Hardware SPI - IO from Scratch - Part 6
26:14
James Sharman
Рет қаралды 7 М.
Hardware SPI Continued - IO from Scratch - Part 7
31:13
James Sharman
Рет қаралды 5 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 8 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 60 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 60 МЛН
477 Use the very attractive new ATTINY chips for your projects
14:34
Andreas Spiess
Рет қаралды 213 М.
IO Peripheral PCB - IO from Scratch - Part 9
43:46
James Sharman
Рет қаралды 7 М.
What is a Fiber Optic Gyroscope (FOG)? | GuideNav
2:38
GuideNav Official | Inertial Navigation Solutions
Рет қаралды 37 М.
The Madness of Z80 I/O
22:52
Noel's Retro Lab
Рет қаралды 76 М.
Linux Kernel 6.12 | This is Historic
1:07:22
Maple Circuit
Рет қаралды 122 М.
SPI (Bit Banging)- IO from Scratch - Part 4
30:04
James Sharman
Рет қаралды 10 М.
(Neo)Vim Made Me a Better Software Developer
40:27
vim-jp
Рет қаралды 40 М.
Storage (SD Card Support) - IO from Scratch - Part 8
26:10
James Sharman
Рет қаралды 8 М.
How a Microcontroller starts
28:49
Artful Bytes
Рет қаралды 60 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 8 МЛН