msinger / gbreveng

Stuff for Gameboy reverse engineering and some documentation
Other
5 stars 0 forks source link

CK1_CK2 Pad #2

Open ogamespec opened 1 week ago

ogamespec commented 1 week ago

Hi, I rebuilt the CK1_CK2 (OSC) masks and it looks like your transistor circuit and logic interpretation is different from what it actually is.

More details here: https://github.com/emu-russia/dmgcpu/blob/main/wiki/soc/pads.md#osc

msinger commented 1 week ago

Oh, nice. Then I should take my schematic of this cell down. It was just a guess, based on the other I/O cells, since I haven't done its layout yet.

Did you look at the SCK pad? It also has more logic than the others. Maybe I got this wrong too.

ogamespec commented 1 week ago

As part of my analysis, I plan to do cross-checking with your results, everything I can get my hands on, including the rest of the pads :)

ogamespec commented 4 days ago

Better view of CK1/CK2 internal logic:

CK1_CK2_Fused

0001_lap2

msinger commented 4 days ago

Great, thanks. I'm wondering about the bottom part a bit more. Is this what I see? circuit

And then the same thing basically mirrored for the ground side? Do you know why this is? Could this be protection against voltage spikes that may be generated by the crystal? I don't know much about analog stuff. Does a crystal have characteristics of an inductor maybe? If the voltage at the pad rises and then suddenly stops, that the crystal keeps pulling it up further, way past VDD? So, it could work like the diodes. But why aren't the diodes then enough?

My thought is that if you apply a voltage at the pad, which is higher than VDD, then VDD becomes ground, and then the transistor I've drawn at the right gets conductive and pulls the voltage at the pad down to VDD.

What is your thought about these transistors in the bottom part? Did I misunderstand something? I'm not sure.

ogamespec commented 4 days ago

Yes it is, 3 of the 4 transistors in each of the “pieces” is “disabled” for some reason. I see this often, most likely it is just to regulate the power of the output signal (the more transistors “in parallel” - the more powerful the signal). Analog electronics specialists will tell you more, I am not one of them :-)