Forums

high speed serial synch RS422

Started by ioanc October 20, 2010
I have an external device that's streaming synchronous data on 2
differential lines, clock and data, with RS422 electrical characteristics.
The data is not framed/formatted, words 16 bit long are streamed out.
Between words there is a pause, during which the clock is not ticking, of
the same length as a word. The clock is at 2.5 MHz (but it doesn't tick
between words), so on average I get 1.25 Mbs data. I don't afford losing
any cos they have to be interpreted together.

I'm looking for an acquisition card to import this data on a PC, possibly
through some higher level Windows drivers that could be easily called from
a C/C++ application. Other options would be streaming it further over
ethernet from an embedded board. Any suggestions what I could use?


	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
On Wed, 20 Oct 2010 06:16:52 -0500, "ioanc"
<ionut.cleju@n_o_s_p_a_m.gmail.com> wrote:

>I have an external device that's streaming synchronous data on 2 >differential lines, clock and data, with RS422 electrical characteristics. >The data is not framed/formatted, words 16 bit long are streamed out. >Between words there is a pause, during which the clock is not ticking, of >the same length as a word. The clock is at 2.5 MHz (but it doesn't tick >between words), so on average I get 1.25 Mbs data. I don't afford losing >any cos they have to be interpreted together.
Is this some kind of self clocking Manchester coded signal (Biphase-M) with some 16 bit data and 16 bit constant (0 or 1) data sequences ?
ioanc skrev:
> I have an external device that's streaming synchronous data on 2 > differential lines, clock and data, with RS422 electrical characteristics. > The data is not framed/formatted, words 16 bit long are streamed out. > Between words there is a pause, during which the clock is not ticking, of > the same length as a word. The clock is at 2.5 MHz (but it doesn't tick > between words), so on average I get 1.25 Mbs data. I don't afford losing > any cos they have to be interpreted together. > > I'm looking for an acquisition card to import this data on a PC, possibly > through some higher level Windows drivers that could be easily called from > a C/C++ application. Other options would be streaming it further over > ethernet from an embedded board. Any suggestions what I could use? > > > > > --------------------------------------- > Posted through http://www.EmbeddedRelated.com
Any decent USB microcontroller board with an SPI on a connector could do that. Just add the RS-422 receivers. I am not sure but think the USB serial driver can support higher baudrates than 115 kbps on reception. You just need to add some framing info in the micro. -- Best Regards Ulf Samuelsson These are my own personal opinions, which may or may not be shared by my employer Atmel Nordic AB
>On Wed, 20 Oct 2010 06:16:52 -0500, "ioanc" ><ionut.cleju@n_o_s_p_a_m.gmail.com> wrote: > >Is this some kind of self clocking Manchester coded signal (Biphase-M) >with some 16 bit data and 16 bit constant (0 or 1) data sequences ? >
It's simpler, the data comes already on 2 lines (clock and data). The only problem is that the clock pauses, so circuits that use a DPLL to recover it and clock the input shift register might have a problem. It requires a simple solution where the shift register is clocked directly by the input clock. ______________|-|_|-|_...._|-|_|-|____________|-|_|-|_...._|-|_|-|____ _______________-------------------_____________-------------------____ Ioan --------------------------------------- Posted through http://www.EmbeddedRelated.com
On Oct 20, 7:20 pm, Ulf Samuelsson <u...@a-t-m-e-l.com> wrote:
> ioanc skrev: > > > I have an external device that's streaming synchronous data on 2 > > differential lines, clock and data, with RS422 electrical characteristics. > > The data is not framed/formatted, words 16 bit long are streamed out. > > Between words there is a pause, during which the clock is not ticking, of > > the same length as a word. The clock is at 2.5 MHz (but it doesn't tick > > between words), so on average I get 1.25 Mbs data. I don't afford losing > > any cos they have to be interpreted together. > > > I'm looking for an acquisition card to import this data on a PC, possibly > > through some higher level Windows drivers that could be easily called from > > a C/C++ application. Other options would be streaming it further over > > ethernet from an embedded board. Any suggestions what I could use? > > > --------------------------------------- > > Posted throughhttp://www.EmbeddedRelated.com > > Any decent USB microcontroller board with an SPI on a connector > could do that. Just add the RS-422 receivers. > > I am not sure but think the USB serial driver can support > higher baudrates than 115 kbps on reception. > You just need to add some framing info in the micro.
I don't see how he can use SPI for this without some external circuitry. He may be able to use an EIA-422 interface if he can feed the clock to a third input through resistor in parallel with a diode. A capacitor and parallel resistor should be across the input. This will capture the clock pulse peaks with a decay time constant to detect the clock gap. The trailing edge of this signal would be the framing indication. This could be done inside connector shell on the end of the cable going to the EIA-422 adapter. The component values would depend on the values of the existing circuit components. If there is a load resistance across the EIA-422 lines this would have to be included in the calculations, even if it is a few kOhms. A smaller value resistor might be used across the EIA-422 input to set the value rather than letting it be a variable default. |\ | CLK+ --+--| >|--+----+-----+---->>--- DTR+ | |/ | | | | | | | / +--/\/\--+ --- \ --- / | \ | | CLK- ----------------+-----+---->>--- DTR- If the clock idle state is 0 and the clock is rising edge active, this may miss the first bit if used with an SPI input. But if the output of this circuit is used to flag the end of a word, it should work just fine. Any EIA-422 interface for a PC with at least three inputs should do the job. You may have to do some low level software work to make the UART sync up to the data frame. If you can't do the low level PC software work and you can't find a card that will work with this design, it would be rather simple to use an MCU to receive the data and then to spit it back out as EIA-232 data which the PC could receive without any work. There are any number of shortcuts you could take depending on the details of your application. If you can't figure out how to rig this up, I can help you. Rick