The ONE-SHOTS WORK!
The pseudo-vernier-scale idea worked, with a little tweaking... Automation of determining the offset (between the column *requested* to be written and the column *actually* written) is now possible.
And, a good thing. Because....
- I replaced the clock-divider chip, a 4-bit counter, that I only had in 74LS form... It worked, but was noisy. Bumping up to 27MHz showed the noise *real bad* as each count looked more like... ¯_-_¯_-_¯ Nothing square about it, and where'd that extra blip come from? I found an HCT... technically, also, rated for 5V, but its output looks *MUCH* better. And, actually, from my reading, the HCT series is *designed explicitly* for interfacing HC-series chips, running at 5V, with 5V TTL chips (the output-voltages of the HC series aren't guaranteed to match the input-voltages of the TTL series *exactly*. The HCTs guarantee the outputs will match the inputs...) So, my theory goes, the HCT series chips are probably all-HC circuitry inside except for the output-drivers. And, the HC series is designed to run at <5V, as well.
- I fiddled with my oscillators. I have three I'd been working with regularly, 8MHz, 16MHz, and 20MHz... They all seemed to work, at various times... But I'd been noticing that the 16MHz is the only one that's really reliable. So I finally 'scoped 'em all. Sure-enough the 16MHz has nearly full-swing output, whereas both the 8MHz and 20MHz have ~1V swing (again, because they're, likely, rated for 5V, and I'm using 3.6V...? or maybe because there's so much fan-out...? 8 SDRAM chips, the clock-divider, four Flip-Flops... it's a bit.) I also have the 27MHz, which I think is actually designed for 3.6V, but it didn't work before the clock-divider was introduced (I think the AVR couldn't handle that frequency, it's only rated for 8MHz, so 20 was certainly a lucky-stretch).
As I write this, it's sitting on my desk running with:
- 27MHz SDRAM Clock
- 13.5MHz AVR Clock
(It might, now, actually be fast enough to sample the data-source I'd done all this work to sample!)
It was a bit weird... I was able to *reliably* write and read-back with the 16MHz clock, 8MHz for the AVR, and the LS divider... there was that double-write issue, but even that was reliably-accounted-for. I worked-around it in code. Even the "vernier test" worked, which meant that, technically, it was free-running exactly as expected. But, it just wouldn't work with the full system. Dunno why. Removed everything I thought could be causing trouble, still wouldn't run. Probably went *way* out of my way with all that, seeing as how all it, apparently, took was using more reliable/spec'd parts. Though, there was a few hours spent looking through *nearly* everything I had for a replacement for that divider-chip... what, a week ago now? There was *one* box I hadn't checked until now, and ironically, there was *exactly* one sitting there. (And, yes, I went through the entirety of the rest of the box, hoping to find an HC instead of the HCT. Exactly One. Weird). Also found a couple more of the AVR I'm using... which could be handy. Allegedly I burnt a pin on each of 'em, but this was way-back-when... early AVR days, maybe I just didn't know what I was doing.
So... what's next...?
Oh, so the 16MHz/LS "vernier test" resulted in a column-offset of -2. The new arrangement (27MHz/HCT) results in a column-offset of -1. So, thankfully I'd made that thing.
AND APPARENTLY No Double-Writing!
Which... means... I can't quite wrap my head around the magnitude of this, right now., since it's been so long in the making... It apparently means my one-shot idea was sound, from the start.
I've a few more higher-frequency oscillators I might try, with even higher clock-dividers. Who knows, maybe I'll even get it up to the full 133MHz?
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
HOW IS IT EVERYBODY ELSE MISSED THIS!!!??? THIS IS SO AMAZING!!!
Questions:
How long have you been working on version 3.0?
Can we get a picture of the "rigged up SMT-DIP breakout-board"?
How separate is the AVR? Is there a possible scenario where you pull the AVR from a socket while its running, for some flashy video like a Criss Angel Mindfreak episode, so that this "Thing" can get the attention it deserves? (just asking:)
Are you sure? yes | no
Hah! So many questions/comments, thanks!
In answer to your last question... Yes... with a little bit of fine-tuning, the AVR could be physically removed while the SDRAM's free-running... If I recall correctly, I did some early tests like that with sdramThing2.0, powering the AVR down... and leaving the SDRAM to refresh the LCD... but that's not nearly as convincing as pulling it. Excellent point. I feel the urge to do a video, and have a ZIF chip-socket somewhere :) Though, I think, I might have to tear-apart the whole board in the process, in a single-take video to prove there's no hidden processors anywhere...
Would it be less-convincing, do you think, if I did it with 2.0? (erm... does 2.0 still exist somewhere?) 3.0+ is so heavily-based around the logic-analyzer aspect that physical removal of the AVR is a bit more difficult (heh, more difficult than rebuilding 2.0? Maybe not).
You've all these references I need to look up!
Pictures, sheesh... people like them, eh...? Yes, yes... I'll take pictures, and I'll download 'em off the camera onto my computer, then upload them onto the internet when the weather's right...
(If anyone wants to donate unlimited 4G internet to the cause--or set me up with enough cash for the next 11 months to hook me up to that 1GB/s fiber connection that's available in my neighborhood--it'd sure make things quicker!)
How long... this whole endeavor's probably about 4years in the making... It goes in fits and starts. 3.0 specifically? I have no idea. Looking through the old code-backups, it looks like the first was January of '14. There was nearly a year of dust-collection inbetween my last working on it, and now...
I dig the video idea... As soon as I wrap my head around contentedness with its current functionality I think that'll be the next step. Thanks!
Are you sure? yes | no
Just the fact that you could pull the processor on this while its running is amazing! I didn't expect that answer, because Integrated Circuits tend to be, you know, "integrated" into stuff. I hope your enjoying this milestone :)
Are you sure? yes | no
Yep, the AVR is only necessary for initialization and *changes*... (e.g. moving the cursors). In fact, sampling vs. repeating of the entire frame could be handled with a toggle-switch and a couple resistors... a couple other resistors to hold states of the Enable pins, and the AVR could physically be removed from the system after boot.
I'm definitely thinking about it... It would be a cool demo.
I think I'll have to have a reset-switch for the AVR, though... plausibly power and reset would be wired directly to the AVR (with loose wires soldered to the pins above the socket) to assure it doesn't affect the fed-back control-signals when the ZIF socket is opened and the pins randomly touch the socket's pins as I pull it out. Then, in the video, I could physically cut those wires...
Actually, kinda ironic... I added a bunch of pull-resistors for the sake of *killing* free-running when the AVR's in reset... Programming the chip with new firmware--while free-running was active--was somewhat unreliable (shared pins, bus contention).
The alternative to wires running to power/reset, which might be more convincing, is to take several videos until I just happen to pull the AVR out of the socket without interfering with the fed-back commands. But, yahknow, it takes a good 5 minutes to boot, so that's a question of patience ;)
Right? That's kinda the whole point of "free-running"... I think it's pretty dang cool how sophisticated SDRAMS are... I don't think they get enough credit! Seriously, after initial setup it is a standalone video controller with video-ram. Who knows what else it could be used for?
Thanks for digging it! And for the video-idea. It's definitely next-up in the works.
Are you sure? yes | no
Looking forward to the video :) Of course you know I was not implying risking your whole project to the threat of something like ESD. Powering it down and pulling it with safeties in place will be even more convincing.
Are you sure? yes | no
Technological advancement: Dug up a 3.3V 30MHz oscillator off an old PCB... runs beautifully. So now, we're at 30MS/s and the AVR's running at 15MHz.
Also found a clock-distribution buffer/amplifier right next to the oscillator on that PCB, so decided to wire it up. It's an 8-pin surface-mount device that has one input for the clock and 5 buffered outputs, designed for clocks up to 133MHz... Also has the benefit of being 5V tolerant. So, if I can't locate any higher-frequency oscillators in the 3.3V variety, this should solve that issue.
Rigged it up on a SMT-DIP breakout-board, such that it fits in the old oscillator socket and has another socket on top for the actual oscillator. So far, it doesn't seem to be making the other oscillators any more functional, but also, so far, I'm only using *one* of its buffered outputs for *everything*. So breaking up the clock-signal/s/ is probably in the near future.
Spent quite a bit of time designing the layout for that SMT-DIP breakout board so it'd fit as a drop-in replacement. Glad I used a 14-pin socket originally, rather than one of those 4-pin crystal sockets in a 14-pin spacing, I'll be using those other pins when I divide up the signals.
So, at 30MS/s I should be able to sample the serial-data going to that motor-driver... But it's such a tight-fit (I *think* it's toggling at 25MHz, but that's just a guess based on what I saw at 20MS/s). I'd be more content if I had at least a few samples per bit.... heh, and... Last month I invested in motor-driver chips that'd solve the problem straight-out... so I guess, now, it's more about sdramThing than getting that motor spinning.
I should post some pictures... It's easier to write.
Are you sure? yes | no
Appreciate the tech comment there, but, you need to copy it from the comments, expand on it, add some photos, then paste it into its own project log! Your style of documenting this is a little hard to follow. Now that I understand it better, I like it, but it contributes to the lack of attention this project unquestionably deserves. Adding pictures would
help tremendously!
Are you sure? yes | no
I loved going back and tracing this project back to your web site, where versions 1.0 and 2.0 live (and pictures too!) https://sites.google.com/site/geekattempts/home-1/sdramthing
Only then was I able to go back and read it all twice to get a grasp of whats going on here. It is still an adventure in reading for me! I wish your project logs were as clean and clear as your site.
Are you sure? yes | no
It's a Choose-Your-Own-Adventure, my friend!
If you think my project logs are hard to follow, you should see my code!
Half the "changelog" system revolves around making backups of the folder with a tag in the .zip-file's name... e.g.
Latest backup found:
'/home/meh/_avrProjects/sdramThing4.0/7-oscillatorExperimenting 5_revisitingSN74S51N_rwTest=COH=0...andSN74LS51N_COH=-1.zip'
I've even made the backup-utility to support that... e.g. "backup.sh ./ -la" lists all the backups of this version... Stupid, Obscure, but
seems to work for me... (You should see some of those file-names... Some are nearly an entire paragraph of short-hand stuff like that).
Yeahp... And my other projects' logs, here, allude to the greatness that comes from placing new notes somewhat randomly in the code and other locations... I've had projects running for years, *overly*-documented, but *completely randomly-located*... Sometimes it
takes several weeks to read through, put all that stuff together, and remember where I left-off (as you've probably seen a bit of, here)
(Heck, as you seem to have experienced in your own piecing-it-together) :)
I've been harped-on for years about this... I've definitely improved. At least I don't have the *under*-documented problem :)
I've got a *stuck on the project* mentality, these days... There's really little-else I can comprehend. Uploading pictures, trying to organize documentation... those things are *extremely* elusive to me, right now, as you've seen. Putting up project-logs is basically only possible when I'm *extraordinarily exhausted* and just need to dump my brain before falling asleep. I'll hopefully have something a little more clear/organized... some day... ;)
Are you sure? yes | no
This reminds me of a scene from one of my favorite movies, Primer, where the guy pulls the power from the device and asks "so why does it keep on running?"
Are you sure? yes | no
I'll have to check that movie out.
Are you sure? yes | no
Congratulations! This looks like a huge breakthrough and milestone. I'm so happy you solved the double write thing! I Can't wait to see you work up to 133MHz :)
Are you sure? yes | no
Thanks, yo! And thanks for following and commenting!
Are you sure? yes | no