It is currently Mon Apr 22, 2019 9:04 am

 All times are UTC - 7 hours

 Page 4 of 4 [ 54 posts ] Go to page Previous  1, 2, 3, 4
 Print view Previous topic | Next topic
Author Message
 Posted: Fri Sep 14, 2018 9:37 pm
 Formerly ~J-@D!~

Joined: Sun Mar 12, 2006 12:36 am
Posts: 488
Location: Rive nord de Montréal
rainwarrior wrote:
A question about using an inverter as an amplifier: to accomplish this, we need to bias the input to some middle voltage? Right? (2.5v?)

The magic is that the inverter self-bias. Yep, that's right: the output and the input converges itself to about ½ Vcc; the slight discrepancy is due to unequal gate strength, and makes the output slightly toward 0V (for CMOS, N-channel is "stronger" than a P-channel because the motility of electrons is about 3 times the motility of holes)

_________________
((λ (x) (x x)) (λ (x) (x x)))

Top

 Posted: Fri Sep 14, 2018 10:12 pm

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8261
Location: Seattle
rainwarrior wrote:
A question about using an inverter as an amplifier: to accomplish this, we need to bias the input to some middle voltage? Right? (2.5v?)
Yup, and that's most of what the external resistor is doing there. It means that if you take the Vin vs Vout curve in the inverter, and plot that on top of a transposed version of the same, it'll self-bias to where the line crosses its transposed version.

The same is true for the Famicom/NES's internal amplifiers, and even the one inside the Famicom's microphone.

Quote:
Would a voltage divider inside the 5B before the inverter input account for the highpass strength? For example if I put the input from pin 2 through the middle of a 10k / 10k divider, it seems to lower the cutoff from ~145Hz to ~30Hz.
I'd be a little surprised if that were the relevant topology.

My hunch, as I tried to say before, is that the functional mixing circuit is something like this:
Code:
audio from 2A03 ------10k-----+
|
----------+           +-----1uF----...
inside 5B  |           |
ideal source--5k--|----1k-----+
|
----------+
Now, whether it's 5k? I can't know. But there's definitely something there to make it a less-than-ideal voltage source.

Jarhmander wrote:
Yep, that's right: the output and the input converges itself to about ½ Vcc
Only because of the external resistor to provide external negative feedback! Without that resistor, it'll just rail.

Quote:
N-channel is "stronger" than a P-channel because the motility of electrons is about 3 times the motility of holes [and therefore] makes the output slightly toward 0V
Uhhh.. sort of.

It's straightforward to design an inverter with any choice of properties you want. But that has nothing to do with CMOS vs NMOS, instead only with the properties (dimensions, doping levels, &c) of the transistors inside.

So while it's true that if you used the exact same dimensions of nMOSFET and pMOSFET, the self-bias voltage would be lower. But there's no reason that the IC designers will have chosen to make the two transistors the same size.

Furthermore, I know the MMC5 is NMOS. I suspect the 5B is also, but really don't know. The datasheet for the YM2149F says it's NMOS, but the YMZ284 datasheet says it's CMOS.

Top

 Posted: Fri Sep 14, 2018 10:32 pm

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
lidnariq wrote:
My hunch, as I tried to say before, is that the functional mixing circuit is something like this...

Ah, yes I can see in LTspice how that affects the cutoff in the same way.

Jahrmander wrote:
The magic is that the inverter self-bias. Yep, that's right: the output and the input converges itself to about ½ Vcc...
lidnariq wrote:
Yup, and that's most of what the external resistor is doing there. It means that if you take the Vin vs Vout curve in the inverter, and plot that on top of a transposed version of the same, it'll self-bias to where the line crosses its transposed version.

Ah, this is interesting. Thank you.

Top

 Posted: Sat Sep 15, 2018 12:28 am

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
I'm sure I'm missing something important here, but I figured I might as well try this just to see what it LTspice says. This appears to shift the cutoff way down compared to the op-amp version?
Edit: same as below with the PMOS backwards, and the cutoff was like 1.5Hz but it was horribly broken in this configuration anyway.

Last edited by rainwarrior on Sat Sep 15, 2018 1:21 pm, edited 3 times in total.

Top

 Posted: Sat Sep 15, 2018 5:52 am
 Formerly ~J-@D!~

Joined: Sun Mar 12, 2006 12:36 am
Posts: 488
Location: Rive nord de Montréal
Your pMOS transistor is reversed. Flip it vertically i.e. exchange the drain and the source.

_________________
((λ (x) (x x)) (λ (x) (x x)))

Top

 Posted: Sat Sep 15, 2018 1:25 pm

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
Thanks, now it's working better. Now it looks more like what I expected, and I can see the 2.5V bias and proper amplification now in transient mode which I could not before. (Wish I could figure out a way to quickly switch between the transient and ac analysis modes.)

After doing this, the new cutoff appears to be ~14 Hz, so it's lowered, but not quite as drastically as with the transistor backwards. (With the op amp version it was more like 175 Hz.) Equivalent to putting more resistance... somewhere...?
Attachment:

5b_sim2c.png [ 23.86 KiB | Viewed 3668 times ]

(Sorry if these are silly questions. I'm just playing around, seeing if I can learn anything at all here.)

Top

 Posted: Sat Sep 15, 2018 3:39 pm

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
Incidentally the 47µF capacitor (5V-GND) appears to fail a quick ohmmeter test (measures as a steady 500 ohms). Maybe I should consider replacing it.

I do have a crummy digital scope. I might try to measure their response later, just to try and verify that I'm not trying to replicate something that's in a broken state. (I've also asked someone else I know with a Gimmick cart to record my test, for similar verification.)

Top

 Posted: Tue Mar 19, 2019 2:58 pm

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
Looking more closely at my earlier test of LFO reset now that we finally have a proper patch set dump...

Apparently we can reset the tremolo LFO, but not the vibrato LFO. I had mistakenly assumed they would both work the same in that respect, and wasn't too careful about testing both. I've revised the lfo_vrc7 test ROM I made earlier to differentiate this.

Edit: a better method of resetting LFO was found! See this post. The VRC7 has a test register at \$0F, and bit 1 of this register holds both LFOs at 0 (resetting and halting them). Toggling this bit does reset them!

Top

 Posted: Wed Mar 27, 2019 2:36 pm

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7412
I finally got around to replacing the capacitors on my Gimmick! board. Re-ran the previous tests, including the sweep test from before.

The results have only changed slightly, so that's probably a good sign that previous results were valid (i.e. I didn't need to replace the capacitors):
Attachment:

sweep_5b_recap.png [ 83.11 KiB | Viewed 1489 times ]

Still kinda sad that I broke one of the tabs on the cart shell while opening it. It will never close quite the same.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 4 of 4 [ 54 posts ] Go to page Previous  1, 2, 3, 4

 All times are UTC - 7 hours

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ NES / Famicom    NESdev    NESemdev    NES Graphics    NES Music    Homebrew Projects       2018 NESdev Competition       2017 NESdev Competition       2016 NESdev Competition       2014 NESdev Competition       2011 NESdev Competition    Newbie Help Center    NES Hardware and Flash Equipment       Reproduction    NESdev International       FCdev       NESdev China       NESdev Middle East Other    General Stuff    Membler Industries    Other Retro Dev       SNESdev       GBDev    Test Forum Site Issues    phpBB Issues    Web Issues    nesdevWiki