Communications controller?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello everyone,

I'm looking for a cheap system for communication/measurement purposes.
I'd expect a few I/O ports, 1 - 4 A/D inputs, and some communication
port(s).

I've already looked at PICs, AVRs, and lately the ARMs.
Now I've got the following problems/questions:
- I'm expecting to transfer up to 32kBytes (256kBit) fullduplex.
- USB is no good on longer distances - I'm expecting up to 50m.
  How is CAN or I2C in this respect?
- USART/RS232 won't work, as it has to be some bus. I'd like to use
simple
  4 wire telephone cables (ground, Vcc, 2 communication), but maybe
CAT5
  is also ok.
- Ethernet would be possible (and would provide very much bandwidth
reserve),
  but there a few controllers available - or at least not cheap ones.
- I wouldn't mind if the ICs had only 14-20 pins - just power,
communication,
  and I/O pins.

PICs are "just slower" AVRs (a bit overstated, but you get my drift),
but the development tools are available.
ARMs have much better performance - but are there Open Source compilers
or assemblers? Using an embedded linux would be simpler, but does have
much higher cost than the simpler AVRs with only 64kB Flash.


Any tips?


Thanks in advance!


Re: Communications controller?

Quoted text here. Click to load it

With CAN the maximum speed you can reach depends on the maximum cable
length:
http://www.can-wiki.info/CanCabling


Quoted text here. Click to load it
the two CAN cables, CAN_H and CAN_L should be a twisted pair of cables in
your cable.

Quoted text here. Click to load it
gcc is always your friend.

Quoted text here. Click to load it
Heinz

Re: Communications controller?
Quoted text here. Click to load it
Can I make standalone binaries that don't need some runtime environment
like libc etc.? Does gcc include the startup-code for ARM, so that I
simply program the I/O ports as needed?

That would be a good solution.


Thank you very much!


Regards,

Phil


Re: Communications controller?
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

Assuming you are using C, you can always write:

  int main(void)
  {
     init();
     ....

and put whatever system dependant initialization you need in init.
The purpose of the usual prequel is to set up such things as the
malloc arena, the file system, glob command lines, implement
redirection, etc.  All you really need for an embedded system is to
set up the initial stack and program counter.  That probably means
a few assembly instructions starting from wherever a system reset
puts you.  You can customize the rest in an init function.

If you look at the normal loading mechanism in gcc, you will see
that it usually loads a standard module before the main program.
This does the initialization, and calls main.  It may contain or
call a lot of code.  Use the -v switches to watch what gcc does.
You will probably see some references to crt0.o module.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Communications controller?
Quoted text here. Click to load it

Yes, I'd look at serial. For a bus take RS422, that is
a pair of RS485 drivers, one for each direction
connected to the internal UART.
Each direction is a differential pair. This would take
6 wires when the GND and +5V are included. At least the
GND is required for reference. PIC and AVR are 8 bit
machines, while ARM are a different story. What
performance do you need ?

Ah, yes, cheap - that means AVR or PIC.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net

Re: Communications controller?


Quoted text here. Click to load it
A 20MHz AVR may work ok - but I fear that it's cannot be "upgraded" to
some other purposes (like having a display) because of speed
considerations.


Quoted text here. Click to load it
Yes, I thought as much.


Regards,

Phil


Re: Communications controller?

Quoted text here. Click to load it

A display, unless a graphic one, requires very little
resources, provided it is done with a statemachine.
And of course no floating point.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net

Re: Communications controller?
On 23 Jun, in article

Quoted text here. Click to load it

At what speed, as that is only a data quantity stated there. If that is
the 'block' size of data how often is it repeated?

Quoted text here. Click to load it

Cannot comment directly on CAN, I have opinions on I2C for this but
needs answers to above first.

Quoted text here. Click to load it

That is contradictory, unless you are using V24 (ITU.T) specifications
of RS232 to drive a modem, the RS232 is just a signalling level. Simplest
RS232 is - TX, RX, signal ground. Running power (DC) down 50m of cable
will be 'interesting'.

Quoted text here. Click to load it

Work out what you are trying to achieve EXACTLY and what part of the
system is doing what THEN think about comms method and what electronics
where. You seem to be very wooly at the moment as to what you want and
thinking about technology BEFORE knowing what you are trying to achieve.

--
Paul Carpenter          | snipped-for-privacy@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/ PC Services
We've slightly trimmed the long signature. Click to see the full one.
Re: Communications controller?
Quoted text here. Click to load it
Sorry, I didn't make myself clear.
I need to transfer 256kBit per second in both directions
simultaneously, in short bursts of about 16-128 bytes.

Quoted text here. Click to load it
I read CAN can do 500kBit/s on 100m - that should work.

Quoted text here. Click to load it
It won't work because I need to connect more than two devices. So there
has to be some bus arbitration and/or collision detection etc.


Quoted text here. Click to load it
The goal is to have some wall-mounted devices which allows voice
communication to other, identical devices.
Maybe my best bet is to use the two remaining wires in analog form, and
to do just access control to these with some other means.

But then I'd need more than 4 wires, and some additional electronics
(analog switches, amplifiers) - I hoped that it would be mostly a
single-chip solution.


Thank you for your help so far!


Regards,

Phil


Re: Communications controller?


Quoted text here. Click to load it

Analog phone wires are graded for 20 to 30 KHz typical signal.  Jamming
a 500 KHz digital signals on it is just wishful thinking.  It's
difficult to transfer more than 100 Kb/s without compression.  With
compression, your memory and CPU resource requirements go up rapidly.

Quoted text here. Click to load it

USB is just a form of I2C.

Quoted text here. Click to load it

Perhaps on short messages.  Not for constant data at that rate.

Quoted text here. Click to load it

You are probably looking at mid-range ARMs.

Quoted text here. Click to load it

(from another message)
Thinking about display also and you are looking at high end ARMs.

Quoted text here. Click to load it


Re: Communications controller?

Quoted text here. Click to load it

What kind of rusty barbed wires are you using as telephone lines in
your part of the world :-)

When you see such specifications, you should first check who made such
specification and for what purpose. You should look at the impedance
levels and maximum allowed attenuation.

Those figures sounds like trying to run high quality audio at a
nominal 600 ohm level through a telephone grade twisted pair, in which
the frequency response is limited by the cable distributed capacitance
in a voltage feed system.

However, if you drive the cable as a transmission line system with the
generator and load impedance matching the cable characteristic
impedance (about 100 ohms), the attenuation is mostly due to
dielectric losses due to the wire insulation and thus much less
frequency dependent.

Ordinary telephone pairs have been used to feed broadband signals for
quite a while, video since the 1930's (BBC 405 line out-of-brodcast
camera feeds from the streets of London), for a few decades to carry
T1/E1 digital telephone over two pairs (24/30 calls 1.5/2 Mbit/s).
Although out of specs, even the 10BaseT (10 Mbit/s) works in quite a
few practical situations. All of these use quite simple envelope
signals and at least in the video case needs a simple frequency
equalisation.

More complex modulation methods, such as OFDM, can run to several
megabits/s at several kilometers (ADSL) and tens of megabits below 1
km (VDSL). These distances are mostly limited by crosstalk between
different pairs in a thick cable, which limits the transmitter power
and hence the allowed attenuation and bandwidth.

Even if a cable may work at a very limited bandwidth in some
applications (high quality audio), the same restrictions might not
apply in a different situation with different requirements.
  
Paul
    

Re: Communications controller?


Quoted text here. Click to load it

It's not just the wires.  The taps (or phone jacks) are creating little
inductors everywhere.

Quoted text here. Click to load it

Yes, you are talking about carrier frequencies.  But RS232,I2C and/or
USB don't use carrier frequencies.  At 1 MHz, the corners of such
signals would be terriblely distorted.

Quoted text here. Click to load it

Again, these are broadband signals, not baseband.

Quoted text here. Click to load it

Yes, if you place enough equipments (and money) on it.  You can run any
distance you want.

Quoted text here. Click to load it

But frequency response does matter in simple baseband transmittions.
Why do you think I2C and USB are limited to a couple of meters?  Sorry,
my mistake to lump them together, but they are in the same class.

Quoted text here. Click to load it


Re: Communications controller?


Quoted text here. Click to load it

A branch in the transmission line becomes significant only when it is
more than 1/10 of the wavelength. Even with the total 50 m cable
length specified by the OP, this would correspond to 500 m wavelength
and 400 kHz (vf=0.66), thus the bus would definitely need termination
at both ends. However, branches from the main bus would certainly be
much less and thus a 1-3 m branch that might be typical for an indoor
systems, the critical frequency gets much higher.

Quoted text here. Click to load it

The dielectric losses are usually proportional to the square root of
the frequency i.e. 3 dB/octave (while simple RC attenuation would be
directly proportional to frequency i.e. 6 dB/octave) so indeed, the
corners of the square wave would be rounded and thus, the eye pattern
would be reduced.

To get something resembling a square wave, you would have to include
at least the 3rd and possibly also the 5th harmonic of the baseband
signal.  Also note that when using NRZ (which the usual UART signal
is), the highest frequency when sending the ...01010... sequence is
f/2, thus if the data rate is 500 kbit/s, the highest base band
frequency is 250 kHz and the transmission medium should pass the 750
kHz frequency quite accurately and also pass the 1.25 MHz frequency
with some fidelity.

The waveform can become badly corrupted if there are long,
unterminated stubs (branches), which will mess around the group delay.

Quoted text here. Click to load it

Just wondering what your definition of broadband is :-). At least over
here it has been mainly a political question.

The video signal is definitively baseband, since it is just a level
shifted version of what comes out of the camera tube (or whatever toys
they use these days :-). The T1/E1 is some kind of three level pulses
to avoid any DC components, but otherwise quite baseband. On other
networks, using some kind of Manchester coding does not IMHO prevent
calling it baseband.

Quoted text here. Click to load it

In the 1980's use of the word "broadband" would indicate that an RF
carrier is modulated by the digital data stream, thus ADSL, COFM-VDSL
and cable modems would fit this definition.

Quoted text here. Click to load it

The primary problem is the voltages used and thus the driver power
required. Also ground potential issues becomes critical in longer
cables.

Ask yourself, what is the difference between a telephone cable (CAT 3)
and a CAT 5 cable.

For the CAT5 cable the characteristic impedance is specified as well
as turns/m and losses at some specific frequencies (thus dictating the
isolation material). For a random selection of existing (installed)
telephone cables, no guaranties are available of their high frequency
performance. In some installations e.g. 10BaseT will work, but in
other, it does not work.

Paul


Re: Communications controller?


Quoted text here. Click to load it

It might not be a problem for end-to-end transmission.  However, for
stations tapping in the middle of the line.  The main line now become
branches, which are quite significant (between 1/8 to 1/16 wavelength).

Quoted text here. Click to load it

I am sure both ends are open (unterminated).  If the OP idea is to make
use of unconnected phone lines.

Quoted text here. Click to load it

Not a simple signal drive by I2C (open wired-or) for instance.

Quoted text here. Click to load it

Higher voltage is needed because of lower impendance at higher
frequency.

Quoted text here. Click to load it

Different bus configurations, not cable differences.

Quoted text here. Click to load it


Re: Communications controller?


Quoted text here. Click to load it


Exactly where did he say that they should be unconnected phone lines ?

The OP wrote:

Quoted text here. Click to load it

The OP might be willing to consider using CAT5 cabling, but would
prefer to use cheaper and thinner, easier to bend telephone cable. I
don't see any references to existing phone cables.

Quoted text here. Click to load it

The characteristic impedance for coaxial cables and twisted pairs
remains constant for a quite large frequency range. At very low
(audio) frequencies it is higher and at several GHz some strange
waveguide mode will emerge, causing impedance fluctuations. For
practical frequencies used in data communication, it is quite safe to
assume that the twisted pair characteristic impedance is in the
100-120 ohm range.

Paul


Re: Communications controller?


Quoted text here. Click to load it

If he is not dealing with existing wires, forget about phone wires and
jacks.  Just use cat5 and ethernet (cheaper than CAN).

Quoted text here. Click to load it
communication),
Quoted text here. Click to load it

He is also asking for multiple taps on the line, similar to the phone
wires are connected.

Quoted text here. Click to load it

Significantly higher.  It is at least several hundred kilo-ohms at DC.
For example, to use it for I2C, both signals (SDA, SCK) need to be
pulled up by 1.5K resistor.  If you terminate both ends with 100 ohms,
there is no hope for a high logic state.

Quoted text here. Click to load it

beyond a minimum frequency, perhaps 10K Hz.

Quoted text here. Click to load it


Re: Communications controller?


Quoted text here. Click to load it

The problem with CAT5/6 is that it is quite thick and in order to
operate at the specified speeds, the bending radius rules must also be
obeyed.  Thus, doing any pretty surface mounting will become quite
hard.

However, using a telephone cable CAN or RS-485 system at a reasonable
speeds allows a thin cable with a small bending radius to be used,
which makes it possible to do a pretty surface installation.
 
Quoted text here. Click to load it

I guess there might be some difference if there is a 10 cm-2 m branch
from the main bus, compared to some 100-1000 m unterminated stub :-).

Paul


Re: Communications controller?
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

POTS pairs have an impudence (spelling deliberate) of about 600
ohms at voice frequencies, but become a pretty good 100 or so ohms
by 1 Mhz.  The losses (and thus attenuation per unit length) become
greater at the higher frequencies.  We have been able to resolve
picosecond timings over several hundred feet in the past (30 years
ago), as shown by the S/N of PWM modulated audio, and repeaters
extend this almost indefinitely.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Communications controller?

[...]
Quoted text here. Click to load it

Huh?

Either you know nothing about USB, or you know nothing about I2C, or
you would be just as happy with the statement that "Ethernet is just a
form of HDLC."  Or some combination thereof.

FTR: The only thing USB has in common with I2C is that it involves
electrical signals changing over time.

Regards,

                               -=Dave
--
Change is inevitable, progress is not.

Re: Communications controller?
Quoted text here. Click to load it

Which, in turn, invokes the "everything is a line" mantra.  This
ties Ethernet, HDLC, USB, I2C, RS485, and the telephone together
quite neatly. :-)

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline