Hi everyone!
Over on the ""Fast" PDIP 6502 design feedback" thread gfoot mentioned the DS1086 Programmble Clock Generator and how they made a little PCB for it.
and since i was in need for some more customizable clock speeds as well i thought i'd tried making one of these boards too.
And this is the result (next to a regular DIP-8 oscillator can):
Attachment:
Clock Compare.jpg [ 616.66 KiB | Viewed 5845 times ]
It has the 4 obvious pins on the bottom like any DIP-8 oscillator but also 4 pins on the top for Power and the I2C Interface (they're even labeled!)
the chip itself is hidden under the pull up resistors (which are for the I2C interface and i'm confused why gfoot's design is missing those)
I could've put the chip on the underside like gfoot did and i'm honestly not sure why i didn't... so the github version will have that updated.
besides the PCB itself i also wrote a simple Arduino program to both read out the current clock speed and set a new one.
it works like a CLI where you enter commands for the Arduino to run, though of course the chip is rather simple so there aren't a lot of commands.
"help" - just displays all valid commands and what they do
"get" - reads out the current clock frequency of the chip
"set <freq. in kHz>" - writes a new clock frequency to the chip
"write" - saves the set clock frequency to the EEPROM
The program seems functional enough but it's a bit janky, for example reading the DAC registers always reads back the same value regardless of what was written into them, i don't know why, so just keep in mind that the read-out can be off by ~0-5MHz or so.
like i mentioned above i threw this all on github since it seems rather useful to have:
https://github.com/ProxyPlayerHD/DS1086-Adapteron a side note, the fact that this thing can be programmed while in a system gave me an idea for an automated overclocking setup.
a 65xx System with (ideally) a VIA or some other 8-bit IO port, which would be hooked up to an Arduino or similar MCU.
the MCU would have control over RESET, the DS1086 running the clock, and be connected to the 8-bit IO port.
the idea is that the 65xx would run some tests to make sure it's stable and after each test write some specific value to the 8-bit port before entering a waiting loop.
the MCU would read the value and check if it's correct, if it is then the MCU tells the CPU to continue either via some input port, the SO pin, or the NMI pin on the CPU.
after the whole sequence of bytes has been received and the CPU is known to be stable the MCU pulls the Reset line low, increments the clock speed by some fixed value (like 0.25MHz for example) and then releases the Reset line to redo all the tests.
if any of the received bytes are incorrect or never arrive after some set amount of time, the MCU deems the System unstable, halts all testing, and prints or otherwise saves the result of the high clock speed it was able to run at.
Again it's just an idea, but for some real overclocking maniacs it could save a lot of time swapping or even just buying loads of different oscillators. plus you could even give the MCU control over the voltage and increase it slightly when the system failed to see if it can be pushed further (without frying it of course).
Anyways that's all for now, i still got some other projects to work on, including a 65816 Emulator in C because i couldn't find any documentation on lib65816 so i thought "screw it i'll just write one myself"