Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Piclist | RS-485 problem.

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

RS-485 problem. - thor69uk - May 18 11:51:46 2006

Hi,

I hope someone can help with a little problem I have!=20=20

I am trying to get several 18F PICs to communicate over RS-485.=20=20

I will outline the basic idea behind the problem so it at least=20
makes a bit more sense!=20=20

I have several chips communicating via I2C to a local 18F PIC which=20
is then relaying the data to a master controller(18F PIC) which is=20
then passing the data to a host PC via USB.=20=20

My problem is one of bandwith.=20=20

The chips communicating over I2C are running at 400kHz which is fine=20
as the local PIC han handle it. This is then passing the data to=20
the master controller via '485. There will be several of these=20
types of boards so I would like to have a much bandwith on the=20
backbone as possible. I had originally looked at using a CAN=20
backbone but have had to scrap this as there will be too much data=20
trying to go down it. What I have found is that you can get RS-485=20
transceivers that can run upto 50MBps.=20=20

I realise that this is way too fast for every PIC I have found=20
(unless someone can suggest otherwise!) so I was looking at dropping=20
this down to the region of 10-20Mbps, which 'should' be achievable=20
with an 18F PIC? (Please correct me if I am wrong)

My problem is how do I get a PIC to communicate at this kind of baud=20
rate. Every data sheet I have found for the 18F series gives=20
115kbps as the max baud rate according to the register settings.=20=20

Has anyone any experience of this? Have I got it very wrong?

What I had thought is that when dealing with the CAN protocol you=20
can get buffer chips that allow you to write to the inbuilt buffers=20
via SPI for example and it then deals with the comms for you.=20=20

If there is nothing like this already I am happy to make one but it=20
makes me wonder how others are doing it? If they make RS-485=20
tranceivers that run at these speeds what are they using to feed=20
them with data?=20=20

Do I need to seriously upgrade my hardware away from PICs to=20
something more industrial?=20=20

If anyone can help I would be very grateful.=20=20

Kind regards,

Andy

=20

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s=20

=20



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


RE: RS-485 problem. - Wouter van Ooijen - May 18 12:25:40 2006

> My problem is one of bandwith.=20=20
> What I have found is that you can get RS-485=20
> transceivers that can run upto 50MBps.=20=20

I don't think that is easy, did they also state which types of cables
will handle this speed, and at which distances?

> I realise that this is way too fast for every PIC I have found=20
> (unless someone can suggest otherwise!) so I was looking at dropping=20
> this down to the region of 10-20Mbps, which 'should' be achievable=20
> with an 18F PIC? (Please correct me if I am wrong)

10 Mbps is still basic old Ethernet speed, without overhead one byte
every 1us, which is=20
one byte every 10 instructions (18F at 40 MHz). Can you program a PIC to
handle that? I don't think I can, at least not with any processing.

> My problem is how do I get a PIC to communicate at this kind of baud=20
> rate. Every data sheet I have found for the 18F series gives=20
> 115kbps as the max baud rate according to the register settings.=20=20
> Has anyone any experience of this? Have I got it very wrong?

I think you are not realistic in the bandwidth you want. Anyway, how do
you get this amount of data into the PC? A UART won't handle it.

> Do I need to seriously upgrade my hardware away from PICs to=20
> something more industrial?=20=20

I think you should first make a realistic estimate of the bandwitdth you
need. For instance, 400kb I2C does not generate 400kbps of data. And
does the data realy change every 10 us?

Next you can find suitable hardware.=20

Or you can tentatively select hardware (18F PICs, RS485) and estimate
the bandwidth you can achieve.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu
=20

=20

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s=20

=20



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 problem. - Harold Hallikainen - May 18 12:28:10 2006

The usart in a pic, with brgh=1, can go up to Fosc/16. With Fosc=40MHz,
that'd be 2.5Mbps. Running 8N1, a byte would arrive every 4us. That
doesn't leave you a whole lot of time to do much with the data (40 or less
instructions per received byte).

Good luck!

Harold

> Hi,
>
> I hope someone can help with a little problem I have!
>
> I am trying to get several 18F PICs to communicate over RS-485.
>
> I will outline the basic idea behind the problem so it at least
> makes a bit more sense!
>
> I have several chips communicating via I2C to a local 18F PIC which
> is then relaying the data to a master controller(18F PIC) which is
> then passing the data to a host PC via USB.
>
> My problem is one of bandwith.
>
> The chips communicating over I2C are running at 400kHz which is fine
> as the local PIC han handle it. This is then passing the data to
> the master controller via '485. There will be several of these
> types of boards so I would like to have a much bandwith on the
> backbone as possible. I had originally looked at using a CAN
> backbone but have had to scrap this as there will be too much data
> trying to go down it. What I have found is that you can get RS-485
> transceivers that can run upto 50MBps.
>
> I realise that this is way too fast for every PIC I have found
> (unless someone can suggest otherwise!) so I was looking at dropping
> this down to the region of 10-20Mbps, which 'should' be achievable
> with an 18F PIC? (Please correct me if I am wrong)
>
> My problem is how do I get a PIC to communicate at this kind of baud
> rate. Every data sheet I have found for the 18F series gives
> 115kbps as the max baud rate according to the register settings.
>
> Has anyone any experience of this? Have I got it very wrong?
>
> What I had thought is that when dealing with the CAN protocol you
> can get buffer chips that allow you to write to the inbuilt buffers
> via SPI for example and it then deals with the comms for you.
>
> If there is nothing like this already I am happy to make one but it
> makes me wonder how others are doing it? If they make RS-485
> tranceivers that run at these speeds what are they using to feed
> them with data?
>
> Do I need to seriously upgrade my hardware away from PICs to
> something more industrial?
>
> If anyone can help I would be very grateful.
>
> Kind regards,
>
> Andy
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
>



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 problem. - Vasile Surducan - May 20 2:54:11 2006

--- In p...@yahoogroups.com, "Wouter van Ooijen"
wrote:
>
> > My problem is one of bandwith.
> > What I have found is that you can get RS-485
> > transceivers that can run upto 50MBps.
>
> I don't think that is easy, did they also state which types of
cables
> will handle this speed, and at which distances?
Transmitted a continuos 1010... at 40Mhz using an RS485 driver, on
a standard twisted cable + ground works without problems at 100m (I
suppose it's ok even at 500m or more, seing the signal shape).

BTW, an 1Vpp 70MHz video signal may be transmitted on the same
twisted cable over 250m using analogic differential drivers/receivers
(maxim)with very good SNR.

greetings,
Vasile

>
> > I realise that this is way too fast for every PIC I have found
> > (unless someone can suggest otherwise!) so I was looking at
dropping
> > this down to the region of 10-20Mbps, which 'should' be
achievable
> > with an 18F PIC? (Please correct me if I am wrong)
>
> 10 Mbps is still basic old Ethernet speed, without overhead one byte
> every 1us, which is
> one byte every 10 instructions (18F at 40 MHz). Can you program a
PIC to
> handle that? I don't think I can, at least not with any processing.
>
> > My problem is how do I get a PIC to communicate at this kind of
baud
> > rate. Every data sheet I have found for the 18F series gives
> > 115kbps as the max baud rate according to the register settings.
> > Has anyone any experience of this? Have I got it very wrong?
>
> I think you are not realistic in the bandwidth you want. Anyway,
how do
> you get this amount of data into the PC? A UART won't handle it.
>
> > Do I need to seriously upgrade my hardware away from PICs to
> > something more industrial?
>
> I think you should first make a realistic estimate of the
bandwitdth you
> need. For instance, 400kb I2C does not generate 400kbps of data. And
> does the data realy change every 10 us?
>
> Next you can find suitable hardware.
>
> Or you can tentatively select hardware (18F PICs, RS485) and
estimate
> the bandwidth you can achieve.
>
> Wouter van Ooijen
>
> -- -------------------------------------------
> Van Ooijen Technische Informatica: www.voti.nl
> consultancy, development, PICmicro products
> docent Hogeschool van Utrecht: www.voti.nl/hvu
>



to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: RS-485 problem. - Leon Heller - May 20 4:35:46 2006

----- Original Message -----
From: "Vasile Surducan"
To:
Sent: Saturday, May 20, 2006 7:53 AM
Subject: [piclist] Re: RS-485 problem.
> --- In p...@yahoogroups.com, "Wouter van Ooijen"
> wrote:
>>
>> > My problem is one of bandwith.
>> > What I have found is that you can get RS-485
>> > transceivers that can run upto 50MBps.
>>
>> I don't think that is easy, did they also state which types of
> cables
>> will handle this speed, and at which distances?
> Transmitted a continuos 1010... at 40Mhz using an RS485 driver, on
> a standard twisted cable + ground works without problems at 100m (I
> suppose it's ok even at 500m or more, seing the signal shape).
>
> BTW, an 1Vpp 70MHz video signal may be transmitted on the same
> twisted cable over 250m using analogic differential drivers/receivers
> (maxim)with very good SNR.

You don't need a ground with twisted pair, unless the wires are shielded;
the shield would need to be grounded, of course.

Leon

---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]



to unsubscribe, go to http://www.yahoogroups.com and follow the instructions



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: Re: RS-485 problem. - Wouter van Ooijen - May 20 4:53:48 2006

> You don't need a ground with twisted pair

I very much think you do. Without a ground the common mode voltage can
easily exceed the range the receiver chip can handle. Or have you found
chips with a few 100 volts of common mode?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu



to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: RS-485 problem. - Leon Heller - May 20 5:29:16 2006

----- Original Message -----=20
From: "Wouter van Ooijen"
To:
Sent: Saturday, May 20, 2006 9:51 AM
Subject: RE: [piclist] Re: RS-485 problem.
>> You don't need a ground with twisted pair
>=20
> I very much think you do. Without a ground the common mode voltage can
> easily exceed the range the receiver chip can handle. Or have you found
> chips with a few 100 volts of common mode?

Of course, you are correct.

Leon
---
[This E-mail has been scanned for viruses but it is your responsibility=20
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]

=20

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s=20

=20



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )