Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / [STICKY] The Posting Competition

Author
Message
Yodaman Jer
User Banned
Posted: 26th Dec 2014 21:09 Edited at: 26th Dec 2014 21:10
You're wlecome!

But I got page 901.


7+ years and counting!
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 26th Dec 2014 21:25 Edited at: 26th Dec 2014 21:56
Pfffft when I loaded this page, it was sitting on 44,999, but I failed to realize that. So I waited like 20 minutes before looking at the page again, then reloaded, and it was too late.

FAIL

Quote: "Potentiometer lol"
Be careful not to cook your pot(entiometer), or that too shall soon be smoking.

Quote: "I kind of wish they would too, but in the long run it would do more harm then good. If you suddenly cut the supply of something people want, they'll do anything to get it back even if it means black market supplies, and since it becomes a rebellious thing to do, the number of smokers will climb again."
Yes! This happened (or similar) with US alcohol prohibition. Everyone thought it would be good to pass an amendment banning all alcohol, but it wasn't too long before that amendment was repealed because of the havoc it caused.

Quote: "In the following diagram (of a NOT gate), what is R5 there for? Is it there to limit how much current is running through the transistor? Doesn't that also limit how much current can flow out the output of the gate?"
I myself am a little rusty on the operation of bipolar transistors, but I do believe that top resistor is indeed there to limit current through the transistor, in order to protect the transistor from overcurrent. And yes, I believe that also does limit the current flowing out of the gate. (perhaps Comet can clarify)

Quote: "In the following diagram, would there be any current flowing through the top wire (and by extension the resistor)? If the resistor was changed to, say, a 100 ohm resistor, would current still only flow in the bottom wire?"
This is a great question. In a purely theoretical circuit, where those wires had zero resistance, then you would find infinite current flowing through the bottom wire, and no current flowing through the top wire and resistor. However, in real circumstances, we will find that those wires actually do have a little resistance. Because of this, most of the current will flow through the bottom wire, but a very small portion will still flow through the top wire and resistor. I may be wrong when I say this, but if the bottom wire had a total resistance of 1 Ohm, and the top wires and resistor had a combined resistance of 99 Ohms, then 99% of the current would flow through the bottom wire, while 1% of the current would flow through the top wire and resistor. Again, my math may be wrong there, but you probably get the principle.

Quote: "In the following diagram, would the top LED light up at all? If the resistor were to be changed to 100 ohms, would it light up then?"
Following the principle above, if the LEDs had any resistance, then the top one would indeed light up, albeit very dimly compared to the bottom one. If the LEDs had zero resistance (which they don't), then the top one would not light.

Quote: "In the following diagram, would both LEDs light? [For the record, I'm assuming both would light up if 0.5mA is enough to power an LED (it was just a random resistor value), but the bottom one would be very bright or simply blow - this particular question is to make sure my current understanding (no pun intended) is actually correct]"
Haha yes, in a practical sense, they would both light up, the the bottom one would go bang pretty quick.

Quote: "Aside from cost (as I assume MOSFETs are more expensive), is there any reason to still use standard transistors? Specifically, do MOSFETs do everything normal transistors do? In what are they better than normal transistors (i.e. why use them)?"
Amazing questions! For starters, just about every single one of the billions of transistors inside your computer is a MOSFET. However, bipolars are still quite useful. As you probably know, transistors are like switches that can turn a current of electricity on and off, and they themselves are controlled by electricity. Bipolar transistors are controlled by current, whereas MOSFETs are controlled by voltage. In fact, the voltage controlling a MOSFET is applied to a terminal known as the 'gate', and no current flows at the gate.

MOSFETs are great in that sense; you effectively don't need any current to control them. Bipolar transistors are good in another sense; they are great at amplifying current, as opposed to voltage. I am not so into electronic engineering these days, but back when I was, I always liked MOSFETs a lot more. They are easier to understand in my opinion.

I would, if you feel comfortable in your understanding of electronics, research how CMOS logic gates are constructed. They are the type of logic gates used in most all modern electronics, and they are constructed from MOSFETs.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 26th Dec 2014 21:42 Edited at: 26th Dec 2014 21:43
PAGE



Quote: "But I got page 901."


451...

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 26th Dec 2014 22:00
Quote: "451..."

Nope, rules state that page count is based on 50 posts per page. CC is the owner of page 901.

"Giraffe is soft, Gorilla is hard." - Phaelax
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 26th Dec 2014 22:01 Edited at: 26th Dec 2014 22:03
Quote: "EDIT: Anybody here familiar with Behdadsoft from the AppGameKit boards? Look at the amount of threads he's created in December alone. Ugh."


Hey, we were all annoying noobs at some point, right? The questions are all legitimate and he at least understands most commands. There would be no issue except for his appalling English. And what makes it worse is that he seems to think he's making perfect sense. "What is your mean???" lol

*whiny voice* Someone answer my questiooooooooooooooonnnnssss!! Hmm... I may have to go find some other forum which is dedicated to electrical engineering... EDIT: Oh wait what... you must have edited your post, DJD. Cool, reading now

Seppuku Arts
Moderator
21
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 27th Dec 2014 01:03
Yep, we were all newbs once...I feel physical pain reading my early stuff.

However, I finally beat Turn 5 of the Coil of Bahamut in Final Fantasy XIV. When it was released it was the hardest fight in the game, it no longer is but is still a pain to get down because the tactics remain the same and still take big hits and can get one-shooted. But just requires practice, it's pick up groups that make it that much harder. Generally it is good in MMO's to have a static group for doing the harder content, but i don't have one. So cordinating a new group each time with split second errors potentially ending the fight, is a big pain. I'm a healer, so often it's my job to compensate for mistakes made by others and you have to focus on that on top of everything your damage dealers are thinking about and keep the tank alive - who'll take big hits even with the higher level of gear the game now has.

That's the first coil beat, now for second coil and final coil.

What I do love is that we all know Bahamut is a huge dragon capable of a massive amount of destruction (as seen in the trailer for FFXIV:ARR) but for idea of scale, you do the turn 5 fight in the palm of his hand, you are almost the size of ants compared to him.

Then that dragon you're fighting, I think in the final coil you fight 3 at once as minor adds. It will be a while before I get there, because I'm relying on no good pick up groups.

This is the fight,well not mine, because I didn't recorded the victory.



Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 27th Dec 2014 02:57
Quote: "I may be wrong when I say this, but if the bottom wire had a total resistance of 1 Ohm, and the top wires and resistor had a combined resistance of 99 Ohms, then 99% of the current would flow through the bottom wire, while 1% of the current would flow through the top wire and resistor."


So the water analogy works well in this case. If you have a really big pipe and a really small one, the water will flow through both but lots through the big pipe and small amounts through the small one.

Quote: "Following the principle above, if the LEDs had any resistance, then the top one would indeed light up, albeit very dimly compared to the bottom one. If the LEDs had zero resistance (which they don't), then the top one would not light."

Quote: "Haha yes, in a practical sense, they would both light up, the the bottom one would go bang pretty quick."


Cool, that's very helpful

Quote: "This is a great question.
Amazing questions!"


Haha thanks I guess

Quote: "In fact, the voltage controlling a MOSFET is applied to a terminal known as the 'gate', and no current flows at the gate."


Oh I see... that's really awesome! Voltage-controlled transistors sound so much more useful than current-controlled transistors

Quote: "I would, if you feel comfortable in your understanding of electronics, research how CMOS logic gates are constructed. They are the type of logic gates used in most all modern electronics, and they are constructed from MOSFETs."


Following your suggestion, I've just spent the past couple of hours attempting to research CMOS logic. The 'CMOS' part seems pretty simple (a PNP for every NPN, if I understand correctly - although I'm not 100% sure as to the reasoning behind this yet), but I think I'm beginning to confuse myself drastically as to how electricity works.

See, I've worked on car electrics a lot. To determine whether electricity is flowing from the battery to the headlight, you grab your multimeter, set it to 12v, stick the red lead on the positive (power in) side of the light, and put the black on the body of the car (or the negative terminal of the battery). If the voltage reads 0, there's no connection. If it reads <12v, you've got a bad battery or a loose connection somewhere. If it reads 12v, the bulb should be lighting up. Additionally, there's no resistors anywhere. Before I started attempting to learn electrical engineering stuff about a week ago, I always thought electrical devices just sucked as much power (current) as they needed to perform their work. It was all as simple as that.

Now, though... I'm losing my grasp on how voltage works because everything is so confusing. I even keep forgetting how I would measure voltage (do I need one lead or both, do I put one lead on the battery and one on the device, etc., etc.) and having to actually draw up in Paint a simple closed circuit with a battery and a bulb just to work it out again.

One of the most confusing things recently was when I tried watching videos on using MOSFETs as switches. I mean, WHY is he connecting the Drain to the POSITIVE side of the battery??

All I want to do is create my own AND gate and it's turning out to be 1000 times more difficult than I thought... I mean, with BJTs, you have to use heaps of resistors. How on earth do you create logic with thousands of transistors when you can't chain them together because of the voltage and current drop? With MOSFETs, how can you create logic if the Gate signal voltage needs to be higher than the Source?

Also: You know how this is the standard AND gate symbol?



Yet, every circuit diagram for every AND gate I could find looks vaguely like this:



My point being, the AND gate symbol doesn't show the two power wires (VCC and GND). HOW DOES THIS WORK?

So. Confused.

Yodaman Jer
User Banned
Posted: 27th Dec 2014 03:42
Quote: "Hey, we were all annoying noobs at some point, right? The questions are all legitimate and he at least understands most commands. There would be no issue except for his appalling English. And what makes it worse is that he seems to think he's making perfect sense. "What is your mean???" lol"


He's been a member for five years. That changes it slightly, imho.

I would love to help him but all he does is yell at me when I tell him that what he's doing is not a good idea. He wants to make it work HIS way or no way, apparently. He keeps trying to use the physics engine to create a platformer, despite the many issues it would cause (and is causing, and he's posting faster than the the rate of a tribble's reproductive cycle).


7+ years and counting!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Dec 2014 04:29
Might have more success with a translation service...

But attitude like that deserves the 'Block Mode'

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 27th Dec 2014 04:50
I need a personal project.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 27th Dec 2014 05:39 Edited at: 27th Dec 2014 05:45
Quote: "The 'CMOS' part seems pretty simple (a PNP for every NPN, if I understand correctly - although I'm not 100% sure as to the reasoning behind this yet)"
Not quite! There are no such thing as PNP or NPN MOSFETs; those two types only apply to bipolar transistors. And indeed, CMOS circuits are only constructed from MOSFETs, not bipolar transistors. One neat thing about CMOS logic gates is that all gates are constructed from equal numbers of N channel and P channel MOSFETs. A NOT gate is constructed from two transistors, NOR and NAND gates are constructed from four transistors, and OR and AND gates are constructed from six transistors.

Quote: "but I think I'm beginning to confuse myself drastically as to how electricity works."
I actually feel for you quite a bit, since that is not a fun feeling. I remember days staying up incredibly late, just trying to come up with a complete understanding of a particular subject. Walking away from the Internet with an incomplete understanding of something is a little unnerving, at least for me.

Quote: "WHY is he connecting the Drain to the POSITIVE side of the battery"
If I recall correctly, this is one of the silly things about electronics nomenclature. Electrons actually flow from negative to positive.

This is just another silly facet of electronics nomenclature: when you see someone describing which way current is flowing through a circuit, the electrons flow the opposite way. This is due to some historical confusion about which way electrons actually do flow; we used to think that electrons flowed from positive to negative, and people got used to that. Later on, we found out it was the other way around, but people stuck with the original notions of the direction of current flow. So to sum it up, electrons flow from negative to positive, while current flows from positive to negative. Have I added enough extra confusion? It's weird like that, but you just have to accept it that way.

Quote: "My point being, the AND gate symbol doesn't show the two power wires (VCC and GND). HOW DOES THIS WORK?"
Hehe, you are correct, ALL logic gates do indeed have to be connected to VCC and GND. You just don't see it on logic gate symbols because, well, it's a little redundant. The connections are there on the actual circuit, but that's taken for granted, so it keeps things more neat to simply omit the connections in the diagrams.

Quote: "With MOSFETs, how can you create logic if the Gate signal voltage needs to be higher than the Source?"
Here is something very important to understand about CMOS logic gates: within a CMOS logic gate, you literally have two voltages, those being VCC and GND. There is pretty much, for practical purposes, no in between.

Oh dear, I want to give you an example, but it's been so long since I have worked with this stuff. Trust me, there will come a time (hopefully soon) where this will all just click for you, and you will feel utterly empowered with your new found knowledge and understanding.

I will do my best to show you how a CMOS NOT gate works.



It says VDD and VSS; those are equivalent to VCC (we'll say +5 volts) and GND (0 volts). Now, with any logic gate, you have two states: high and low. Any wire connected to VCC, again in this case +5 volts, shall bear a high state. Any wire connected to ground, 0 volts, shall bear a low state.

So you see that wire there labeled A? That is our input. Notice how that input branches to the gates of both MOSFETs. Therefore, the gates of each MOSFET shall each be subject to the same voltage at any given time. Also notice how the two MOSFETs are of different types; the top one is a P channel MOSFET, and the bottom one is an N channel MOSFET. I remember this by noting that the P channel has a little circle on the gate, just like the letter P.

Oh yes, some sort of scattered side advice before I go further: for now, I would recommend forgetting about drain and source, until you have a better understand of electronics. For now, consider a MOSFET to have one gate terminal, and two coequal terminals that current may or may not flow between, depending on the voltage at the gate.

Okay, back to the explanation. The top MOSFET in this gate, a P channel, only allows current to flow between its coequal terminals when its gate is subject to ground voltages (0 volts (a low state)). The bottom MOSFET, an N channel, only allows current to flow between its coequal terminals when its gate is subject to VCC voltages (+5 volts in our case (a high state)). That there is the important difference between N channel and P channel MOSFETs.

As such, when the the input of this gate is in a high state, the bottom transistor connects the output of the gate (the wire labeled Q) to ground, which pulls the output to a low state. When the input of this gate is in a low state, the top transistor connects the output of the gate to VCC, which pulls the output to a high state. Hence, we have inversion, just as a NOT gate should do!

I hope this is clear as possible, and hasn't confused you more.

Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 27th Dec 2014 14:32 Edited at: 27th Dec 2014 14:38
Quote: "Not quite! There are no such thing as PNP or NPN MOSFETs; those two types only apply to bipolar transistors. And indeed, CMOS circuits are only constructed from MOSFETs, not bipolar transistors."


Ah, I was just using the terms interchangeably since they effectively mean the same thing (and I didn't know NPN/PNP didn't apply to MOSFETs). NPN/N-channel blocks current flow with 0V at the gate, PNP/P-channel allows current with VCC at the gate.

Quote: "I actually feel for you quite a bit, since that is not a fun feeling. I remember days staying up incredibly late, just trying to come up with a complete understanding of a particular subject. Walking away from the Internet with an incomplete understanding of something is a little unnerving, at least for me."


The unnerving part is that I've spent hours and opened 100s of Chrome tabs and STILL can't find the information I'm looking for. It feels like everyone else knows something I don't, and they don't understand how I could not know it.

Quote: "If I recall correctly, this is one of the silly things about electronics nomenclature. Electrons actually flow from negative to positive."


OOOOOOOOHHHH DUH!! *facedesk* I actually KNEW that, but I needed someone to remind me of it, thanks! It's a very silly naming system. In general speech, "negative" means a lower number or less of something, whilst "positive" means a greater number or more of something. Naturally, you would expect the positive side of a battery to have more electrons. Unfortunately, the positive side of the battery isn't called positive because it has more electrons, it's called positive because, physically, electrons are negative. A build-up of electrons is a negative charge, and therefore the side where the electrons collect is called the negative side and the other side is called positive. Am I remembering my Science textbooks correctly?

Quote: "Hehe, you are correct, ALL logic gates do indeed have to be connected to VCC and GND. You just don't see it on logic gate symbols because, well, it's a little redundant. The connections are there on the actual circuit, but that's taken for granted, so it keeps things more neat to simply omit the connections in the diagrams."


Really? Hhhhh... this is the kind of thing that's not explained to beginners, yet can cause great confusion and misunderstanding.

Quote: "Here is something very important to understand about CMOS logic gates: within a CMOS logic gate, you literally have two voltages, those being VCC and GND. There is pretty much, for practical purposes, no in between."


Are you sure? Because from my experiments and some further research, it seems to me that the Gate voltage (whoops, nearly typed current there!) has to be higher than the Source voltage to full turn on the MOSFET. In my Proteus simulations, I'm using an IRLML2502 N-channel MOSFET for the simplest test I can come up with: switching on the transistor to power an LED.

In the following image, the circuit is behaving as expected. The switch has 5v on one side but is open and doesn't allow the voltage to the Gate on the MOSFET. Well, mostly as expected; it's allowing a tiny voltage through (0.4v), even though the Gate is not powered, but for my purposes I don't believe that matters at all.



Now I've closed the switch. According to the datasheet for the MOSFET (linked above), the Gate Threshold Voltage is between 0.6v and 1.2v when the Vds and Vgs are equal and a load of 250uA. Given this, I would expect to see the Gate be fully open with a voltage of 5v for both Vds and Vgs. Yet, as you can see in the image below, I'm only getting a partially-opened MOSFET, which I assume would be getting pretty hot right now if this were done in real life.



If I increase the supply voltage to 6.2v (1.2 above 5v), I see the expected results. I was going to rant on a with a longer theory here, but something has just occurred to me. Here's the picture anyway:



Ok, so you know what occurred to me? I just realised that I was typing Vds and Vgs and claiming specific voltages, but I'd never actually measured it. I'm assuming that the voltage "probes" (the blue arrows) are assumed to be connected to ground of the other end (because voltage is a measurement of how strongly electrons want to go from one point to another, right?)... which means I'm only measuring my voltages to ground. I'm never actually measuring voltage from Drain to Source or from Gate to Source. So I went searching, and quickly found a voltmeter tool. I stuck a couple of these on and found that the Vds was only 1.12V, as seen here:



The issue now is that I'm not sure why there's such a low voltage for Vds and Vgs. It needs to be at least 1.2 to fully open the MOSFET. Also, I stuck the VCC at 3.3v to test, and the Vds/Vgs barely changed at all (I think it went down to 1.05v or something). As far as I can tell, the only reason the MOSFET fully opens with a VCC of 6.2v is because it just happens to bring the Vds/Vgs up to almost 1.2v.

What am I misunderstanding here that's meaning I'm not getting enough voltage on Vds and Vgs to fully open the MOSFET?

Sidenote: Before I put the wire with resistor R10 in there, the LED refused to turn off. Putting that wire there was a near-complete guess, but it was based on something I thought I'd read a few hours ago that mentioned capacitance. In an attempt to apply logical reasoning using as accurate an understanding of how electricity works as I could, I determined that when the switch was open, the Gate was probably becoming charged, either due to simulation inaccuracies or due to random static charges (and the fact that if I closed and then opened the switch, there was nowhere for the electricity left in the Gate to go), and was keeping the Gate open even when the switch was open. So I stuck a wire and a resistor in there and it worked.

Quote: "Oh yes, some sort of scattered side advice before I go further: for now, I would recommend forgetting about drain and source, until you have a better understand of electronics. For now, consider a MOSFET to have one gate terminal, and two coequal terminals that current may or may not flow between, depending on the voltage at the gate."


Well that may be a good idea except that transistors are polarised You've gotta have differentiation between the two pins! But don't worry, I've learned why you connect the Drain to the positive side. Like with maths, once I've learned the why, the concept cements itself pretty quickly in my brain

Quote: "I remember this by noting that the P channel has a little circle on the gate, just like the letter P."


Now that's something I already have a firm grasp of. I already read that the little circle means "inverted" and that bit of info managed to stick

Quote: "I hope this is clear as possible, and hasn't confused you more."


It definitely hasn't confused me any more! On the contrary, you've done a brilliant job of helping clear my mind and sort out the mess of information I've tried to stuff in over the past few days

The way I see it, over the past few days I've been doing what I call "forced learning". It's what I do when I want to learn something, but don't want to do any kind of courses to learn it. I just begin researching anything and everything on the subject and just absorbing information until I have just enough of the base parts to begin using the information. Then, as I attempt to use it and find I have gaps in my knowledge, I research more specific parts and forcibly memorise the info. This method has served me extremely well for learning new programming languages in the past, but it has its disadvantages.

The biggest problem with learning like that is you learn everything in a very unstructured way. When the subject is relatively small (like the syntax of a new language), I still end up with a messy cloud of random, unstructured information in my brain, but I'm able to use it and it settles down into a rational structure pretty quickly. When it's a big subject like electrical engineering, however, that cloud becomes a huge, thick, black disaster of information storage. My brain just says, "OOH no, there's no way I can sort that lot out, you're on your own!", and promptly shuts down. This is when I become confused.

The only way to unconfuse myself is to have someone explain it to me by answering specific questions. I take the most easily-grabbed piece of info from the cloud and ask you about it. You answer, and my brain can then sort it out. The more pieces are sorted and placed in a structured way in my brain, the more my brain can sort out the rest of the info itself. It just needs those initial "hooks" to hang the rest of the information on I'm still a little uncertain that those "hooks" are actually correct, which is why I'm still asking you questions for the moment

I greatly appreciate your very clear explanations. Thank you!

Now to go and attempt to rationalise exactly what those two voltmeters are actually measuring and why they are behaving as they do... Wait, no, it's twenty to one in the morning, time for bed!

Yodaman Jer
User Banned
Posted: 27th Dec 2014 14:32
Quote: "But attitude like that deserves the 'Block Mode'"


That would be a bit extreme, like Clonkex said his questions are legit and he does seem to understand most of the commands, he just won't listen to reason about the best way to do a platformer. In multiple threads we have told him that using physics will cause a lot of headaches, since it's not designed to work with a platformer like that.

If he would just calm down, take a second to read everyone's advice and actually took it into consideration, it would benefit him greatly. He just needs to realize that on his own.

Now I had to go work for 8 hours in the liquor department all by myself. My town has a weird ordinance where alcohol must be sold in a separate department from the store, basically think of it like a weird stock room and that's the department. Blah.


7+ years and counting!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Dec 2014 14:37
Hahahaha, sounds like Japans No Gambling No Prizes Money game shops

Do you have customers exchange paper for Houses too?

Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 27th Dec 2014 14:41
Quote: "My town has a weird ordinance where alcohol must be sold in a separate department from the store, basically think of it like a weird stock room and that's the department. Blah."


It's the same in Australia, I believe. You can't buy liquor directly in a normal supermarket (except, I think, Aldi, where they have a special checkout that is the only one you can use to buy the liquor). It's almost always in a separate tacked-on building with its own cash registers and staff.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Dec 2014 15:14 Edited at: 27th Dec 2014 15:19
Quote: "Question: In the following diagram (of a NOT gate), what is R5 there for? Is it there to limit how much current is running through the transistor? Doesn't that also limit how much current can flow out the output of the gate?"


R5 limits the current, preventing the transistor from exploding. And yes, the output current is thereby also limited, that is why most digital circuits use complementary logic (and MOSFETs instead of BJTs).

Quote: "Question: In the following diagram, would there be any current flowing through the top wire (and by extension the resistor)? If the resistor was changed to, say, a 100 ohm resistor, would current still only flow in the bottom wire?"


Current will never flow through the resistor if it is short-circuited.

Quote: "Question: In the following diagram, would the top LED light up at all? If the resistor were to be changed to 100 ohms, would it light up then?"


The top LED will not glow because the bottom LED will force the voltage to its diffuse voltage. In doing so, the bottom LED will draw a huge amount of current, causing it to explode, and only then, when the bottom LED has disappeared, will the top one begin to function normally.

Quote: "Question: In the following diagram, would both LEDs light? [For the record, I'm assuming both would light up if 0.5mA is enough to power an LED"


There is no difference between the last circuit and the second last circuit.

EDIT: SAW YOUR NEW POST

Quote: "Now I've closed the switch. According to the datasheet for the MOSFET (linked above), the Gate Threshold Voltage is between 0.6v and 1.2v when the Vds and Vgs are equal and a load of 250uA. Given this, I would expect to see the Gate be fully open with a voltage of 5v for both Vds and Vgs. Yet, as you can see in the image below, I'm only getting a partially-opened MOSFET, which I assume would be getting pretty hot right now if this were done in real life."


You are driving an n-channel MOSFET with a floating source. The voltage drop from gate to source is what causes the mosfet to conduct, but because the source pin of the mosfet changes potential as soon as it begins conducting, Vgs begins to decrease, causing the mosfet to stop conducting.

Either make it so the mosfet's source pin is tied to ground and the LED is connected to drain, or use a p-channel mosfet.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 27th Dec 2014 15:29
So... Can anyone recommend some good electronics simulation software?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Dec 2014 16:54
Quote: "So... Can anyone recommend some good electronics simulation software?"


LTSpice

It takes a little bit to get used to, if you need help just ask. Or google.

I like offending people. People who get offended should be offended. -- Linus Torvalds
code master
22
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Illinois
Posted: 27th Dec 2014 22:04
Just testing my sig

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 27th Dec 2014 22:41
Just testing my points

"Giraffe is soft, Gorilla is hard." - Phaelax
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 28th Dec 2014 02:08 Edited at: 28th Dec 2014 02:33
Quote: "R5 limits the current, preventing the transistor from exploding. And yes, the output current is thereby also limited, that is why most digital circuits use complementary logic (and MOSFETs instead of BJTs)."


Good, that's what DJD said

Quote: "Current will never flow through the resistor if it is short-circuited."


Surely the resistance of the wire itself would force a teeny tiny bit to go through the resistor? Technically speaking, I mean... it probably wouldn't be measurable.

Quote: "The top LED will not glow because the bottom LED will force the voltage to its diffuse voltage. In doing so, the bottom LED will draw a huge amount of current, causing it to explode, and only then, when the bottom LED has disappeared, will the top one begin to function normally."


I don't know what diffuse voltage is.

Quote: "There is no difference between the last circuit and the second last circuit."


What? Oh right yeah. Err- what was I thinking I was trying to do...? OH yeah... in my mind, the two power rails went to two different supplies, both on the same GND. I meant to specifically mark them as different power supplies, but forgot.

Quote: "You are driving an n-channel MOSFET with a floating source. The voltage drop from gate to source is what causes the mosfet to conduct, but because the source pin of the mosfet changes potential as soon as it begins conducting, Vgs begins to decrease, causing the mosfet to stop conducting.

Either make it so the mosfet's source pin is tied to ground and the LED is connected to drain, or use a p-channel mosfet."


OOOOHH. I think I know what you mean. I don't know what a floating source is, but I think I've finally realised why we use CMOS logic gates.

I got my NOT gate working, FINALLY!! Here's what it looks like currently:



*some time later*

Ok, so I just tried making a NAND gate. Now that I actually understand how these circuits work, setting up the NAND gate was really easy... until it came to adding the resistor to bring it down to ground when there was no input (would that be called a pull-down resistor?). The problem was that in order to connect both inputs to ground inside the NAND gate, I would have to connect both wires together, and therefore changing one input to high made both high.

Then I remembered a comment I'd seen on a YouTube video, saying something like, "The lack of voltage is not the same as 0V"; basically, meaning that opening the Gate wire is not the same as switching it to ground. It turns out this is a pretty critical concept, and not something I've seen explained anywhere. I guess it would be analogous to declaring a variable in C++ where you have three options:

1. Do variable=5 - basically, setting the wire high
2. Do variable=0 - basically, setting the wire low
3. Do nothing - basically, disconnecting the wire from both ground and VCC; the variable (and wire) are then in an undefined state and you can't rely on them being any particular value (voltage)

Does that analogy make sense? Is my understanding correct?

So my new NOT gate looks like this:



...and its test circuitry looks like this (where there used to just be an open-close switch instead of the two-point switch):



I'm really happy that I finally understand how and why those circuits work. I just tested my NAND gate and it works perfectly!

NAND gate:



...and its test circuitry:



EDIT: Obviously, with these test circuits I'm ignoring the fact that if I tried to do this IRL, the LED would go drick... and depending on the size of the power source and whether it has limited current, so too would the MOSFETs themselves

Quote: "So... Can anyone recommend some good electronics simulation software?"


Yes: Proteus. It's not free by any stretch of the imagination, but if you lack the several hundred to several thousand dollars necessary to get it, and are also somewhat devoid of certain moral qualms, it's very easy to obtain It's what I'm using; it's extremely good software, once you work out how to get started, and highly accurate. It also includes tens of thousands (if not hundreds of thousands) of simulated parts to use.

Quote: "Just testing my sig"


Cool sig, me likes

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 28th Dec 2014 02:53
Quote: "would that be called a pull-down resistor"
Yes!

I won't say too much about your post (a little lazy feeling right now if I'm honest ), but I will give you one word of advice. You can use more than one ground in your circuit simulator, if you want. Like for example, I would give each pull down resistor its own ground if I were you. Does this change how the circuit behaves at all? Nope! It just looks neater, that's all. And, by extension, neater things appear less confusing.

You can also do this for VCC, including for pull up resistors, etc.

Isn't it a wonderful feeling to understand how a circuit works?

Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 28th Dec 2014 06:10 Edited at: 28th Dec 2014 06:12
Quote: "a little lazy feeling right now if I'm honest"


lol that's fine, I always feel lazy

Quote: "You can use more than one ground in your circuit simulator, if you want."


I know, but in my mind that's cheating because IRL you can't have imaginary wires between the ground points and it annoys me

Quote: "Isn't it a wonderful feeling to understand how a circuit works?"


It is indeed! It all just -makes sense- now And more than that, it actually works!

I facepalmed a little while ago when I realised that in order to chain together, say, an AND gate with another AND gate, I had to have pull-down resistors on the inputs of the AND gate (which I said earlier that I couldn't do). What I'd been trying to do earlier (which resulted in connecting the two input signals into one) was use only one resistor. That meant I had to connect to the wires before they got to the resistor. D'oh. So I stuck two resistors now the connection only happens after the resistors

Because I've put pull-down resistors in all my gates, I can now easily chain them together, and can also just use a simple open-close switch on the inputs for testing.

Hmm... After creating my AND gate, Proteus is failing to simulate it. Individually, the NAND and NOT gates work just fine, but when I combine them to create an AND gate, Proteus doesn't like it. I mean, it works when I close either input, but if I close both and then open one, it says "Timestep too small". Annoying unstable sim...

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 28th Dec 2014 06:18 Edited at: 28th Dec 2014 06:21
Still feeling lazy, so another short tip here. You probably already know this, but there is no need to use pull up or pull down resistors between logic gates. Any logic gate input that is connected to the output of another logic gate doesn't need any pull resistors; this is because of the design of a CMOS logic gate, which, I suppose acts as a circuit that itself can act as either a pull up or pull down resistor, depending on the state of its inputs. What I am getting to is this: you only need pull resistors on inputs that do not come from other logic gates, such as inputs you might find connected to switches and stuff that the user of the circuit will press.

Your circuits will still work with pull resistors between logic gates (and I would say it's okay for use on the simulator), but your circuit will use a lot more current than it would if it had no excess pull resistors. When it comes to practical circuit engineering, keeping current consumption low can be key.

Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 28th Dec 2014 11:16
Quote: "LTSpice"


Quote: "Yes: Proteus. It's not free by any stretch of the imagination, but if you lack the several hundred to several thousand dollars necessary to get it, and are also somewhat devoid of certain moral qualms, it's very easy to obtain"


Thanks, I'll give those both a try!
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 28th Dec 2014 12:51 Edited at: 28th Dec 2014 13:13
Quote: "You probably already know this, but there is no need to use pull up or pull down resistors between logic gates."


I didn't already know that, but I'm also not convinced it's true. From my experiments, I found it necessary to have some way of connecting the gate terminals of the MOSFETs to ground when I opened the circuit. Otherwise that voltage will stay there and keep the MOSFET activated, will it not? Here's my current NOT gate:



As you can see, I have a resistor between the MOSFETs' gates and ground. If I don't have that there, the LED that the NOT gate controls is always off, no matter the input. As far as I know, this is because of capacitance of the MOSFET.

Also, I've been trying LTSpice... and I can safely say it's utterly horrible to use. Proteus is about the best one I've tried so far, and is really, really good, except that it doesn't reliably simulate some things - although, having said that, I suspect it's just a bad implementation of the IRLML2502 and IRLML5203 MOSFETs I'm using (which is something that can definitely happen), so shortly I'll begin searching for alternate MOSFETs to use for my experiments in the hopes that they'll be more stable. If I have to, I may move from logic-level MOSFETs (because, frankly, it's really hard to find logic-level MOSFETs in Proteus) and just use a 12V supply. Sure, it'd be terrible for real-life logic circuits, but it's just a sim so who cares

If I can't get Proteus to work satisfactorily, I'll look into trying NI Multisim.

EDIT: YES. Finally! I switched from the IRLML2502 and IRLML5203 to the ZVN2106A and the ZVP2106A MOSFETs and the circuit now simulates perfectly and reliably with logic-level MOSFETs! *happy*

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Dec 2014 13:34 Edited at: 28th Dec 2014 13:35
Quote: "Surely the resistance of the wire itself would force a teeny tiny bit to go through the resistor? Technically speaking, I mean... it probably wouldn't be measurable."


Yes, but then it wouldn't be a perfect short circuit but it would be two parallel resistors (one of them being the wire).

Quote: "I don't know what diffuse voltage is."


The forward voltage of a diode. Red LEDs are typically 2.0V. They always follow this curve:



Quote: "What? Oh right yeah. Err- what was I thinking I was trying to do...? OH yeah... in my mind, the two power rails went to two different supplies, both on the same GND. I meant to specifically mark them as different power supplies, but forgot."


Still no difference, even if they are two separate sources with the same potential. If they are two separate sources then I guess the top LED would start working correctly during the bottom LEDs exploding.

Quote: "I found it necessary to have some way of connecting the gate terminals of the MOSFETs to ground when I opened the circuit. Otherwise that voltage will stay there and keep the MOSFET activated, will it not?"


It's implementation specific. The gate of a MOSFET should never be left floating because it has such a high impedance (of course there are exceptions but generally if a mosfet's gate is left in an undefined state it can do some really weird things, such as oscillate).

So if you can prove that the input of your logic will never be floating during operation then you won't need a pull-down/pull-up resistor, otherwise you probably will.

I like offending people. People who get offended should be offended. -- Linus Torvalds
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 28th Dec 2014 14:25 Edited at: 28th Dec 2014 14:53
Quote: "The forward voltage of a diode. Red LEDs are typically 2.0V. They always follow this curve:"


My brain's too tired to work out what you mean right now, so I'll look tomorrow.

Quote: "If they are two separate sources then I guess the top LED would start working correctly during the bottom LEDs exploding."


Yes. That is the difference.

Quote: "So if you can prove that the input of your logic will never be floating during operation then you won't need a pull-down/pull-up resistor, otherwise you probably will."


Yeah, that's what I thought. And actually, as DJD said, I've just realised I didn't need the pull-down resistors after all. Well I did, the way I'd built my NAND gate, but I was an idiot and connected the N-channels directly to the VCC instead of the output of the P-channels. D'oh.

Regardless, I can't fix it now because Proteus decided to erase my project. Nice one, Proteus. Real nice. I'm not particularly worried, though, because I understand the circuits well enough to easily recreate them, and I've got a million screenshots of my various gates in this thread anyway, so everything I've learned will not be lost

For the record, I think the reason Proteus erased my save was due an Undo/Redo bug. It happened once before; I undid something in a subcircuit and all of a sudden the circuitry disappeared and the mouse was holding onto a piece of some random part of the circuit from the root sheet as if I'd just selected Paste. This time, because I knew what would happen, I tried to be careful about it. I didn't click anything, and I definitely didn't save, and I closed and restarted Proteus. All gone. Empty save. What I should have done, is leave Proteus open, copy the save file to the desktop, then tell Proteus to save and restart it. Oh well

EDIT: Since I've had so many issues with Proteus (and can't really trust it not to delete my projects at random), I tried out Multisim. It already feels 1000 times better! Well, maybe not 1000 times... but it definitely feels far, far more intuitive than Proteus! (Ok, so I prefer the colour scheme of Proteus, but it's super-easy to change all the colours in Multisim) I've only made a simple NOT gate so far, but I'll experiment more tomorrow and see what it can do

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 28th Dec 2014 20:41 Edited at: 28th Dec 2014 20:42
Quote: "And actually, as DJD said, I've just realised I didn't need the pull-down resistors after all."
Indeed! See how below, in any one of the four possible input states, the output will either be connected to Vdd through P channel A and/or P channel B, or be connected to ground through both of the N channels. As such, the output need no pull resistors. The purpose of any pull resistor is just to prevent floating gates, but CMOS logic gates take care of their outputs, by design.



I have drawn this here diagram for ya:



Lovely drawing, isn't it? MS Paint

Oooh hey, if you are interested in a wonderful logic circuit simulator, I would recommend LogiSim. It doesn't do any electronics simulation per se, but it's a wonderfully intuitive and fairly powerful tool to use if you want to simulate logic circuits and such.

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 28th Dec 2014 21:12
qoints

"Giraffe is soft, Gorilla is hard." - Phaelax
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Dec 2014 21:13 Edited at: 28th Dec 2014 21:16
One very irritating fact about the TGC site... start downloading anything from the My Products page and you are not able to view anything from the TGC site at all.......

GRRRR......

EDIT

Unless you get clever and use another browser hahahaha

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 28th Dec 2014 21:15 Edited at: 28th Dec 2014 21:16
Apparently win-8 has it's own epoch.


"Giraffe is soft, Gorilla is hard." - Phaelax
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Dec 2014 21:18 Edited at: 28th Dec 2014 21:34
LOL you got some serious bug there...

EDIT

Can a mod please unlock this thread?

http://forum.thegamecreators.com/?m=forum_view&b=1&t=193877&p=2

Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Dec 2014 00:04 Edited at: 29th Dec 2014 00:07
Quote: "but CMOS logic gates take care of their outputs, by design."


That's the exact image I was using as a reference when I constructed my NAND gate, but obviously wasn't looking at it properly

Quote: "I have drawn this here diagram for ya:"


That drawing has given me a question: In terms of power consumption, is it preferable to use a really low-resistance pull-down or a really high-resistance one? My guess is that it's a trade-off. I'm assuming that for lower power consumption, you want a higher-Ohm resistor (so that less current can flow), but also that a higher-Ohm resistor would make for longer switch times of the MOSFETs (since it takes longer for the charge in the gate to dissipate). True or false?

Quote: "Oooh hey, if you are interested in a wonderful logic circuit simulator, I would recommend LogiSim. It doesn't do any electronics simulation per se, but it's a wonderfully intuitive and fairly powerful tool to use if you want to simulate logic circuits and such."


Hehe what a coincidence. After Proteus erased my project files, I didn't feel like doing any more real circuitry and decided to see if you could get plain logic simulators. Turns out there's quite a few, some considerably better than others. I tried LogicCircuit, CedarLogic (even though I call myself Christian, I still think it's a bit dumb to have a "How to know God" page in the help files for this one - but who knows, maybe some people actually read it), SmartSim and Logisim (among others I can't remember), and I agree that Logisim is the best A bit confusing to use, initially, until you realise you can't press the buttons you put in the sim because there's a special "Interact" tool you have to select first I'm spoilt with fun logic and circuitry programs to play with now, plus my Arduino should finally be here today... lots to do! And because it's the Christmas holidays, plenty of time in which to do things!

Quote: "Can a mod please unlock this thread?"


Done

You know what's annoying? As a mod, I don't see the yellow banner thing along the bottom of a locked thread that says why it's locked. In fact, the only way I can know a thread is locked is if it was locked by a mod (and not by lack of use), because then it's in the Locked category. I'm gonna have to get The Next to give us a way to know if a thread is locked (and perhaps something like, "WARNING - You are posting into a locked thread. Are you sure you want to continue?").

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 29th Dec 2014 00:17
Quote: "My guess is that it's a trade-off. I'm assuming that for lower power consumption, you want a higher-Ohm resistor (so that less current can flow), but also that a higher-Ohm resistor would make for longer switch times of the MOSFETs (since it takes longer for the charge in the gate to dissipate). True or false?"
This is true!! So yeah, higher resistance resistors will take a slightly longer time to do their job, but the capacitance of a MOSFET gate is sooo small that, even with a very high resistance resistor, it takes almost no time. In general, I think a common pull resistor will be in the field of 10k Ohms or so.

Glad you are liking Logisim! It has some features that are hard to learn, but once you do, they are nice. When you learn how to make modules and use them as standalone logic elements, things get really orderly and neat, and most importantly of all, fun.

Quote: "Done"
This blew my mind; I keep forgetting you are a mod.

Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Dec 2014 02:04
Quote: "but the capacitance of a MOSFET gate is sooo small that, even with a very high resistance resistor, it takes almost no time."


I guess it only really matters if you're Intel and you've gotta squeeze every last nanosecond out of your billions of transistors

Quote: "In general, I think a common pull resistor will be in the field of 10k Ohms or so."


Great, that's what I've been using

Quote: "When you learn how to make modules and use them as standalone logic elements, things get really orderly and neat, and most importantly of all, fun."


Fun is definitely the right word! I fully intend to make my own (albeit slow) 8bit computer from scratch Gonna take some serious research though

Quote: "This blew my mind; I keep forgetting you are a mod."


lol I only put my serious Mod Hat (which, incidentally, is a Santa hat) on when absolutely necessary

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 29th Dec 2014 02:15 Edited at: 29th Dec 2014 02:19
Quote: "Gonna take some serious research though"
It will, but this research you will not regret. If you follow through with researching the logical gate by gate workings of a computer, you will have an ultimately intimate understanding of how computers work. Then things like assembly begin to make sense, and even, seem nice. Then you will be wanting to create your own instruction set, write an emulator for it, etc.

By the way, if you are doing an 8 bit processor, please know that there will be lots of things you do, like wiring, that will have to be done eight times. However, Logisim's (I think it's called the bus tool) makes that a lot easier.

I will be glad to help you with that research anywhere along the way, if you like.

Yodaman Jer
User Banned
Posted: 29th Dec 2014 05:30
I slept for 9 hours last night. It was glorious! I have no idea why I was that tired but good grief, I needed it!

Having fun with AppGameKit 2 and Stencyl. Something really cool about Stencyl is that it's got a visual scripting system much like Unreal Engine's Blueprints, but what's really awesome is that it's super easy to see the code it generates in the background, so if you want to you can totally play with stuff to see how it might be done visually, and then figure out the logic behind it. I personally think that's a great way to introduce people to programming!

It's kind of a weird language though, Haxe I believe, based on Java, but to me it looks really easy.

I kinda forgot part of the reason I ditched DarkBASIC all those years ago was lack of class support. I was trying to create something in AppGameKit earlier today that would have been so easy to do with a class, but was trickier in AppGameKit because there's no class support to speak of! So perhaps I'll do something crazy and start learning AppGameKit TIER 2!

Then I can have structs, proper formatting, classes, and all kinds of C++ fun!

Stencyl is ridiculously easy to make something in, definitely a great way to prototype game ideas! For making an actual game it's obviously still limited but it does have potential! In the mean time it's going to be my prototyper I think, much easier to use than GameMaker. Seriously, screw GameMaker, that thing gave me so many damn headaches haha.


7+ years and counting!
Seppuku Arts
Moderator
21
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 29th Dec 2014 11:44 Edited at: 29th Dec 2014 11:44
Quote: "I kinda forgot part of the reason I ditched DarkBASIC all those years ago was lack of class support. I was trying to create something in AppGameKit earlier today that would have been so easy to do with a class, but was trickier in AppGameKit because there's no class support to speak of! So perhaps I'll do something crazy and start learning AppGameKit TIER 2!"


Pretty much why I'm not using TGC products at the moment for more than just prototyping stuff, DBP is still awesome for it, because you can jump in and get something out very quickly. Yes, I love classes, but I am also a huge fan of C#, if TGC were to release any kind of C# support, then I would be sold. But of course, they'd have to decide if it's worth their while.

I may one day take it upon myself to properly learn C++ and go Tier 2.

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 29th Dec 2014 13:27
Well, if no one wanted these points.

"Giraffe is soft, Gorilla is hard." - Phaelax
Clonkex
Forum Vice President
16
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Dec 2014 14:05
Quote: "It will, but this research you will not regret. If you follow through with researching the logical gate by gate workings of a computer, you will have an ultimately intimate understanding of how computers work."


Yes, this is one reason I really want to do this

Quote: "By the way, if you are doing an 8 bit processor, please know that there will be lots of things you do, like wiring, that will have to be done eight times. However, Logisim's (I think it's called the bus tool) makes that a lot easier."


Yeah I know! I sort of wanted to do a 16-bit processor, but then I thought about all the wires and dropped back to 8-bit Not sure I'm going to use multi-bit wires... I'm probably (definitely) just making unnecessary work for myself, but if at all possible, I actually want to create every single wire by hand. This idea may change once I start actually creating said wires, however

I must say, I wasn't hugely impressed with Logisim when I first started using it, but after creating an 8-bit ripple-carry adder (which worked first go! Huzzah! ) I've actually come to really like using it

I'm making a point of actually understanding every bit of logic I'm creating before I create it so that I actually learn how it all works. It's no good copying circuit diagrams without any understanding of why they work. However, trying to understand the equations behind a carry-lookahead adder is making my brain melt slightly (although this nice Indian guy with nice handwriting has helped significantly - and also made me realise you can work out circuit logic with maths equations! ).

Quote: "So perhaps I'll do something crazy and start learning AppGameKit TIER 2!

Then I can have structs, proper formatting, classes, and all kinds of C++ fun!"


C++ is great! Super powerful and flexible and insanely fast

Quote: "but I am also a huge fan of C#"

Quote: "I may one day take it upon myself to properly learn C++ and go Tier 2."


Weird... I just always assumed that C# was a language you learned after C++. As in, if you knew C# than you almost certainly knew C++. Never really considered it may be more beginner-friendly than C++... and frankly, whenever I see C# code (and I haven't seen that much) I cringe and back away as quickly as possible. The first language I learned (aside from dabbles in LibertyBASIC, which is almost irrelevant) was DBPro. After that I learned C++ so I could make plugins for DBPro. C++ itself was relatively easy to learn and I actually liked it. The conventions and software options surrounding C++.... not so easy. In fact absolutely horrible for a beginner. But the language itself is good...

---------------------------------------------

Meh... I got about 4-5 more small parcels in the mail today containing items such as jumper wires, capacitors and both IMUs, but no Arduino. I'm going to end up with every part I ordered except the Arduino at this rate!

Yodaman Jer
User Banned
Posted: 29th Dec 2014 16:44
Quote: "C++ is great! Super powerful and flexible and insanely fast"


Indeed, I tried to learn it several years ago but found it quite intimidating, not to mention Visual Studio 2008 kind of sucked on my ancient computer (very heavy in resources).

I'm probably going to set up Visual Studio 2010 at some point after work today, just to get that part out of the way, then I'll figure out how to use AppGameKit within it. From the documentation it sounds easy-peasy so I hope to have it done quickly!

But now I'm programming quite well in AppGameKit Tier 1, kind of making a Pong clone just for kicks. I have basic player movement, now I just need to figure out the physics and how to make the opposing paddle go to where the ball will be... artificial intelligence has never been my strong point


7+ years and counting!
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 29th Dec 2014 16:49
Quote: "I'm probably going to set up Visual Studio 2010 at some point after work today,"

NOOOOOOOO
Grab 2013, I recall AppGameKit Tier 2 now supports 2013 compiler.

"Giraffe is soft, Gorilla is hard." - Phaelax
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 29th Dec 2014 17:51
Quote: " Weird... I just always assumed that C# was a language you learned after C++. As in, if you knew C# than you almost certainly knew C++. Never really considered it may be more beginner-friendly than C++... and frankly, whenever I see C# code (and I haven't seen that much) I cringe and back away as quickly as possible. The first language I learned (aside from dabbles in LibertyBASIC, which is almost irrelevant) was DBPro. After that I learned C++ so I could make plugins for DBPro. C++ itself was relatively easy to learn and I actually liked it. The conventions and software options surrounding C++.... not so easy. In fact absolutely horrible for a beginner. But the language itself is good... "

C# is actually almost entirely different than C++. It's closer to Java than it is to C++. C++ has a very complex feature set and can be truly intimidating to learn. I find C or Python a much better starting language.

Quote: " I'm probably going to set up Visual Studio 2010 at some point after work today, just to get that part out of the way, then I'll figure out how to use AppGameKit within it. From the documentation it sounds easy-peasy so I hope to have it done quickly!"

If AppGameKit has VS 2013 support, that would be definitely better. 2010 is a steaming pile of crap compared to 2013. I wonder if it would be possible to bind to Rust? That would be pretty sweet.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 29th Dec 2014 19:43
Quote: "I actually want to create every single wire by hand."
I myself have had the exact same mentality, and then...
Quote: "This idea may change once I start actually creating said wires, however"
That happened.

But yeah, I definitely understand the desire to do each one by hand. It would be more personal, and less cheating, that way.

Quote: "trying to understand the equations behind a carry-lookahead adder is making my brain melt slightly"
Ah! That's actually one of those things I never brought myself to understand.

Oh, the good ol days when I was making logic gates out of strings... Yes, physical strings, made from fiber and the kind you can tie into a knot -- I developed a design that allows you to make any logic gate from those. And yes, the design allows the gates to be connected end on end, and still work! Still work, that is, if it weren't for this insane thing called friction. But individual logic gates have worked. Great fun!

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 29th Dec 2014 21:53
Quote: "I find C or Python a much better starting language."


Unless you want to use strings. (C)
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 29th Dec 2014 22:00
Quote: "Unless you want to use strings."
Just use real strings like I did, and make a whole computer.

Seppuku Arts
Moderator
21
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 29th Dec 2014 22:09 Edited at: 29th Dec 2014 22:12
Quote: "Weird... I just always assumed that C# was a language you learned after C++. As in, if you knew C# than you almost certainly knew C++. Never really considered it may be more beginner-friendly than C++... and frankly, whenever I see C# code (and I haven't seen that much) I cringe and back away as quickly as possible. The first language I learned (aside from dabbles in LibertyBASIC, which is almost irrelevant) was DBPro. After that I learned C++ so I could make plugins for DBPro. C++ itself was relatively easy to learn and I actually liked it. The conventions and software options surrounding C++.... not so easy. In fact absolutely horrible for a beginner. But the language itself is good... "


My guess is that C# is meant as a higher level version of C/C++, but in terms of how it works, it is a lot like Java. It is completely class based and therefore forces you to OOP. I love coding in it, but obviously not as flexible as C++, but certainly a lot more user friendly. I love coding in it and it can mean getting quicker results in a number of situations.

Its usage can be fairly flexible, I mean Unity3D uses it as a scripting language and ASP.NET basically integrates it into server side web development coding, which I guess is attractive to web developers used to using JavaScript and HTML, because it's not a huge jump. Heck, I've found JavaScript incredibly easy to understand because I know C#.

Of course, I would like to learn C++, but my goal is to get a development career using C# as .NET technology is very widely used and there's quite a few jobs out there using it and I enjoy coding with it. So I try to keep practiced in C# so I can blag it when I go for a job doing it.

I suspect I could understand C++ if I invested time learning it. I tried it once before with DarkGDK, because I love working in an OOP environment, I managed to set up a series of classes and had code working well, made a change, it broke it, undid my changed and it still had an error. I know that it holds your hand less compared to higher level languages. At this point in time, I don't have a lot of time to spend on coding, so I'd rather stick to C#. If AppGameKit 2.0 suddenly says "now with C# support" then I will jump right on it.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2014 23:02 Edited at: 29th Dec 2014 23:02
There is a job listing with TGC if I remember correctly, they are doing AppGameKit up for Windows 8 and Phone 8... and if they are clever about it, they will make it C# based... AppGameKit does not need C++ at all...

The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 29th Dec 2014 23:24
Rewriting their whole engine in C# doesn't seem that clever to me

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy

Login to post a reply

Server time is: 2026-07-10 17:56:10
Your offset time is: 2026-07-10 17:56:10