Communicatiosn electronics ...common question - Page 1
Forum section: electronics / beginners

author: Faringdon
author_rank: Super Contributor
timestamp: March 05, 2024, 02:38:58 pm
content: Hi,This has got to be the commonest question at interview• Experience in designing digital interfaces and buses – USB2, SPI, I2C, GPIO etc ?Would you go as far as delving into the possible length of the communication and whether its from inside the same PCB to the same PCB, or to somewhere else outside the PCB, etc etc?Whether or not its diff signalling, whether its bipolar or not, etc etc ?Unipolar signalling seems the easiest form of comms....but nobody ever asks, "why cant you always just use that?"...that would be a great questionand would answer the other question, would you agree?

author: themadhippy
author_rank: Super Contributor
timestamp: March 05, 2024, 03:40:21 pm
content: id just answer the questionExperience in designing digital interfaces and buses – USB2, SPI, I2C, GPIO etc ?- yes/no

author: Gyro
author_rank: Super Contributor
timestamp: March 05, 2024, 07:02:42 pm
content: What's your confusion?You either have experience in designing USB2, SPI, I2C, GPIO etc interfaces or you don't. That doesn't mean just running a couple of tracks across a PCB, it's the associated development too. Do you even have any embedded s/w development experience? if not, the answer to their question is probably no.You can't just quote a question like that in isolation - what are the other questions and what is the role?(Note: This may seem harsh, but the OP most definitely isn't a beginner)

author: tggzzz
author_rank: Super Contributor
timestamp: March 05, 2024, 09:06:06 pm
content: Quote from: Gyro on March 05, 2024, 07:02:42 pmThat's a good open-ended interview question. The OP's response should be enlightening.

author: tooki
author_rank: Super Contributor
timestamp: March 08, 2024, 02:34:59 pm
content: Quote from: Faringdon on March 05, 2024, 02:38:58 pmNobodyeveragrees with your “would you agree?” questions, since all you want is for people to concur with you, but you never listen when people disagree.

author: Faringdon
author_rank: Super Contributor
timestamp: March 09, 2024, 12:43:57 pm
content: Thanks, it seems very odd to me that nowhere on the web, can you find a list of scope shots showing what the digital waveforms look like for I2C, SPI, RS232, RS485, CAN, UART, USB etc etc.And as far as i know, there is only one unipolar signalling protocol which is "allowed" to go off of a PCB , and over a cable, to another PCB/device somewhere else, and that is DALI...but it is limited to 1200Hz signallling rate, and to send a logic zero, needs the sender to be able to pull down a clamped current which could be up to 64mA or so.Common mode noise problems:The fact is that the problem for digital comms when you go off of a PCB to "somewhere else" with signalling, is one main thing...."common mode noise". So we can summarise every single signalling protocol by telling the way that it deals with common mode noise. The main mitigation for common mode noise is "differential signalling".....the reason that this reduces common mode noise is that the receiver of a differential signalling receiver subtracts one of the signal wires from the other...and in so doing, deletes the common mode noise voltage.....but you cannot find any document anywhere that tells you this......then somebody comes up to you and says that unipolar signalling, ie "0v=low, 5v= high", is actually differential signalling.......its just that the centre point of it is 2.5V.....if the receiver has a 2.5V reference, then it can treat an incoming 0v/5v pulse train as a differential signal.......and give you the advanatages of differential signalling without you having gone to pick a differential signalling protocol!

author: tooki
author_rank: Super Contributor
timestamp: March 09, 2024, 08:46:25 pm
content: You can find waveforms for any of those online.And you definitely see explanations of differential signaling.As for the person telling you 0-5V is “differential centered around 2.5V”: they do not know what they’re talking about, simple as that.

author: tggzzz
author_rank: Super Contributor
timestamp: March 09, 2024, 09:00:14 pm
content: Quote from: tooki on March 09, 2024, 08:46:25 pmWe can see such explanations, but the OP might not be able to.OTOH, he might be talking to himself about that 2.5V nonsense.

author: Andy Chee
author_rank: Super Contributor
timestamp: March 10, 2024, 01:37:17 am
content: Quote from: Faringdon on March 09, 2024, 12:43:57 pmwas this somebody an actual person? Or are you using the word "somebody" as a metaphor for the subconscious imaginary engineering expert talking to you in your own head?I remember watching a movie about a guy with voices in his head; "A Beautiful Mind" starring Russel Crowe. It was about the mathematician John Nash.

author: Faringdon
author_rank: Super Contributor
timestamp: March 10, 2024, 11:46:37 am
content: The receivers "0V" might be the senders "2.5V".The only thing about differential signalling is in the receiver...the receiver subtracts one line from the other....and in so doing gets rid of the common mode noise.So the "0v, 5v" could be diff mode signalling.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 10, 2024, 12:50:33 pm
content: Quote from: Faringdon on March 09, 2024, 12:43:57 pmRS232 which is based on UART with level shifters is unipolar and has been used between systems for a very long time. Even direct UART connection on what ever voltage level the system uses is not a problem. Sure the longer the lines the lower the bit rate.Also think about how lots of systems are build with displays and front panels for buttons and knobs. Some use SPI for communication or I2C or direct digital or what ever. These have inter PCB connections all over the place.As per usual yet again another ***** question to haul other members into a silly discussion, and bravo it worked.

author: tooki
author_rank: Super Contributor
timestamp: March 10, 2024, 05:27:08 pm
content: Quote from: pcprogrammer on March 10, 2024, 12:50:33 pmGiven the original post’s wording, which mentions both unipolar/bipolar and differential, I interpret it to mean this:Unipolar: only one voltage polarity used. (E.g. 0V and 5V, or -12 and 0V)Bipolar: both polarities used (e.g. -12V and +12V)So RS-232 would be single-ended bipolar, RS-485 is differential unipolar, and TTL UART is single-ended unipolar. I can’t think of any digital signal off the top of my head that would be differential bipolar, but differential analog audio would be an analog example.

author: tooki
author_rank: Super Contributor
timestamp: March 10, 2024, 05:30:38 pm
content: Quote from: Faringdon on March 10, 2024, 11:46:37 amYou’re missing the point: “differential” doesn’t imply anything about signal levels as such. What makes differential signaling “differential” is the existence of TWO signal lines (in addition to ground!!!), one of which is inverted with respect to the other.So not only the receiver is different, so is the transmitter, since it must produce the inverted signal as well.

author: tggzzz
author_rank: Super Contributor
timestamp: March 10, 2024, 05:55:48 pm
content: Quote from: tooki on March 10, 2024, 05:27:08 pmFaringdon, dear boy, Faringdon.You are wise to assume Faringdon is channelling Humpty Dumpty...“I don't know what you mean by 'glory,' " Alice said.Humpty Dumpty smiled contemptuously. "Of course you don't—till I tell you. I meant 'there's a nice knock-down argument for you!' ""But 'glory' doesn't mean 'a nice knock-down argument'," Alice objected."When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean—neither more nor less.""The question is," said Alice, "whether you can make words mean so many different things.""The question is," said Humpty Dumpty, "which is to be master—that's all.”https://www.goodreads.com/quotes/tag/humpty-dumptyQuote from: tooki on March 10, 2024, 05:30:38 pmSo are youFaringdon, dear boy, Faringdon.

author: Faringdon
author_rank: Super Contributor
timestamp: March 10, 2024, 07:28:06 pm
content: QuoteThankyou yes indeed...the attached shows what you get for a diff signalling system......you get the diff amp at the receiver.....the reason the signals are "mirrors" of each other, (differentials) around ground, is that the common mode gain for each of them will be the same, and the common mode noise thus is exactly cancelled.Obviously in a real diff mode receiver, you dont actually have an opamp as such, but more the internal transistors of it, and in an arrangement which can switch very quickly....but is kind of angling toward being a differantial opamp.The whole principle is based on the fact that a differential signal receiver subtracts the noises that are common to both inputs...and this solves the common mode noise problem.LTspice and PNG as attached.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 10, 2024, 07:48:32 pm
content: Quote from: tooki on March 10, 2024, 05:27:08 pmI see your point, and accept the usage of the terms in this way. Should have addressed RS232 as single ended communication. The unipolar or bipolar does not matter that much in respect to digital communication as long as we are only talking about single bits per clock period being transferred. (Even two bits per clock period, one on every edge is also fine, but apart from with memory I don't know if this is used in communication interfaces, and even here Low Voltage Differential Signaling is often used.)The business about noise suppression in common mode from Faringdon's second batch of oil on the fire, bears some truth, apart from the 2.5V rubbish, but is not the only way communication interfaces deal with this. A modern UART uses multiple samples to decide 0 or 1 and with this reduces the impact of noise. Another setup is error checking schemes and with some of these data recovery is possible.And then there are communication interfaces that use modulation schemes to transfer more data per clock period and have al sorts of error checking setups to deal with data corruption. Reaching high speeds without a lot of problems. Ethernet for instance. This one certainly goes from system to system.So all that Faringdon did here, was like I wrote earlier, pulling us into some discussion about digital interfaces to show case our knowledge either correct or false and getting off on it in some way. Probably his fetish is reading other peoples post disagreeing with his alleged vision.tggzzz seems to be on to something with Humpty Dumpty

author: Gyro
author_rank: Super Contributor
timestamp: March 10, 2024, 08:00:45 pm
content: Aren't you getting rather far from your original question, Faringdon?Quote from: Faringdon on March 05, 2024, 02:38:58 pmIt's transparently obvious that you are looking at a bullet point in a job spec, and also quite clear that you don't have it. Babbling about common mode didn't do you any good last time...https://www.eevblog.com/forum/beginners/what-does-common-mode-mean-412636/I can't see that it's going to help here.

author: tggzzz
author_rank: Super Contributor
timestamp: March 10, 2024, 08:10:27 pm
content: Quote from: pcprogrammer on March 10, 2024, 07:48:32 pmIt is from a pair of books from 1865 and 1872 that is (or was) familiar to every educated child, written by a logician.Manymanymemes originated in those books