Author Topic: Communicatiosn electronics ...common question  (Read 1044 times)

0 Members and 1 Guest are viewing this topic.

Offline FaringdonTopic starter

  • Super Contributor
  • ***
  • Posts: 1998
  • Country: gb
Communicatiosn electronics ...common question
« on: March 05, 2024, 02:38:58 pm »
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 question
and would answer the other question, would you agree?
« Last Edit: March 05, 2024, 02:53:02 pm by Faringdon »
'Perfection' is the enemy of 'perfectly satisfactory'
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #1 on: March 05, 2024, 03:40:21 pm »
id just answer the question
   Experience in designing digital interfaces and buses – USB2, SPI, I2C, GPIO etc ?- yes/no

 
The following users thanked this post: Faringdon

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #2 on: March 05, 2024, 07:02:42 pm »
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)
« Last Edit: March 05, 2024, 07:06:14 pm by Gyro »
Best Regards, Chris
 
The following users thanked this post: tooki, Faringdon

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19515
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Communicatiosn electronics ...common question
« Reply #3 on: March 05, 2024, 09:06:06 pm »
What's your confusion?
...
(Note: This may seem harsh, but the OP most definitely isn't a beginner)

That's a good open-ended interview question. The OP's response should be enlightening.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: David Aurora, Kean, Faringdon

Online tooki

  • Super Contributor
  • ***
  • Posts: 11550
  • Country: ch
Re: Communicatiosn electronics ...common question
« Reply #4 on: March 08, 2024, 02:34:59 pm »
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 question
and would answer the other question, would you agree?
Nobody ever agrees with your “would you agree?” questions, since all you want is for people to concur with you, but you never listen when people disagree.
 
The following users thanked this post: Faringdon

Offline FaringdonTopic starter

  • Super Contributor
  • ***
  • Posts: 1998
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #5 on: March 09, 2024, 12:43:57 pm »
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!
« Last Edit: March 09, 2024, 01:01:37 pm by Faringdon »
'Perfection' is the enemy of 'perfectly satisfactory'
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11550
  • Country: ch
Re: Communicatiosn electronics ...common question
« Reply #6 on: March 09, 2024, 08:46:25 pm »
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.
 
The following users thanked this post: Kean, Faringdon

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19515
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Communicatiosn electronics ...common question
« Reply #7 on: March 09, 2024, 09:00:14 pm »
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.

We can see such explanations, but the OP might not be able to.

OTOH, he might be talking to himself about that 2.5V nonsense.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: Faringdon

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: au
Re: Communicatiosn electronics ...common question
« Reply #8 on: March 10, 2024, 01:37:17 am »
.....then somebody comes up to you and says that unipolar signalling, ie "0v=low, 5v= high", is actually differential signalling.......

was 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.
« Last Edit: March 10, 2024, 01:40:13 am by Andy Chee »
 
The following users thanked this post: Kean, tooki, Faringdon

Offline FaringdonTopic starter

  • Super Contributor
  • ***
  • Posts: 1998
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #9 on: March 10, 2024, 11:46:37 am »
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.
'Perfection' is the enemy of 'perfectly satisfactory'
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3710
  • Country: nl
Re: Communicatiosn electronics ...common question
« Reply #10 on: March 10, 2024, 12:50:33 pm »
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.

RS232 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.  :clap:   :palm:


Online tooki

  • Super Contributor
  • ***
  • Posts: 11550
  • Country: ch
Re: Communicatiosn electronics ...common question
« Reply #11 on: March 10, 2024, 05:27:08 pm »
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.

RS232 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.
Given 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.
 
The following users thanked this post: pcprogrammer, Faringdon

Online tooki

  • Super Contributor
  • ***
  • Posts: 11550
  • Country: ch
Re: Communicatiosn electronics ...common question
« Reply #12 on: March 10, 2024, 05:30:38 pm »
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.
You’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.
 
The following users thanked this post: Kean, Faringdon

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19515
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Communicatiosn electronics ...common question
« Reply #13 on: March 10, 2024, 05:55:48 pm »
Given the original post’s wording, which mentions both unipolar/bipolar and differential, I interpret it to mean this:
...

Faringdon, 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-dumpty

You’re missing the point:
...

So are you  >:D

Faringdon, dear boy, Faringdon.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: Faringdon

Offline FaringdonTopic starter

  • Super Contributor
  • ***
  • Posts: 1998
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #14 on: March 10, 2024, 07:28:06 pm »
Quote
You’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.
Thankyou 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.
'Perfection' is the enemy of 'perfectly satisfactory'
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3710
  • Country: nl
Re: Communicatiosn electronics ...common question
« Reply #15 on: March 10, 2024, 07:48:32 pm »
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.

RS232 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.
Given 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.

I 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  :-DD

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9507
  • Country: gb
Re: Communicatiosn electronics ...common question
« Reply #16 on: March 10, 2024, 08:00:45 pm »
Aren't you getting rather far from your original question, Faringdon?

Hi,
This has got to be the commonest question at interview

•   Experience in designing digital interfaces and buses – USB2, SPI, I2C, GPIO etc ?
...

It'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.
« Last Edit: March 10, 2024, 08:03:46 pm by Gyro »
Best Regards, Chris
 
The following users thanked this post: tooki, Faringdon

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19515
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Communicatiosn electronics ...common question
« Reply #17 on: March 10, 2024, 08:10:27 pm »
tggzzz seems to be on to something with Humpty Dumpty  :-DD

It is from a pair of books from 1865 and 1872 that is (or was) familiar to every educated child, written by a logician.

Many many memes originated in those books :)
« Last Edit: March 10, 2024, 08:14:07 pm by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: Faringdon


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf