From: Tim Wescott on 11 Jun 2010 20:58 On 06/11/2010 04:14 PM, ScadaEng wrote: > "Bit Farmer"<bit.farmer(a)yahoo.com> wrote in message > news:V9-dnQM0RuB8Io_RnZ2dnUVZ_tGdnZ2d(a)giganews.com... >> ScadaEng wrote: >>> I have worked allot with RS232, and other serial protocols, but this is >>> my first RS485 project. It seemed straight forward to me, but now I have >>> a big problem. >>> >>> I am using the max490 chip. I'm doing full duplex, 4 wire. Each of my >>> nodes have the max490 communicating with a 16F877A pic chip. The whole >>> project will have 25 nodes. I just built two pcb's (nodes) and >>> individually they work as expected. However when I put both of them on >>> the rs485 bus, I can't talk to either of them! Probably some kind of >>> collision, but as it turns out my scope just died and I'm on a tight >>> deadline. Any help is greatly appreciated. >> >> Check your output enables. You can't have both on at the same time. The >> system must be designed to allow only one transmitter to be on at a time. >> The easiest way to do this is to have the master poll each device in turn. >> When polled, each device can then send either a NoData packet or reply >> with the data that it needs to send. This approach was used for several >> generations of point of sale systems and works quite well. You will need >> to have unique addresses for each device and a means of setting them. >> >> b. Farmer > That's the thing, there are no output enables with the max490 chip. I do > have unique addresses, and I can call each board by itself with it fully > functioning. Its when I put more than one board on the network(485) that I > can't commmunicate with any of them. Not that it should matter, but I am > using a modified RTU Modbus protocol. You have to turn the transmitter on under processor control, and for that you have to have an enable pin on the transceiver. That chip isn't really an RS-485 transceiver at all -- it's more a 422 transceiver without internal terminations. Sorry. That's the breaks. Either daisy-chain everything, with board 1 transmitting to board 2 etc., back to board 1, and wait for the system failure when one board fails, or rip out the 490 and put in a real 485 transceiver, like the MAX-485. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
From: ScadaEng on 11 Jun 2010 21:15 "Tim Wescott" <tim(a)seemywebsite.now> wrote in message news:UvednQJjt_R8Ro_RnZ2dnUVZ_gWdnZ2d(a)web-ster.com... > On 06/11/2010 04:14 PM, ScadaEng wrote: >> "Bit Farmer"<bit.farmer(a)yahoo.com> wrote in message >> news:V9-dnQM0RuB8Io_RnZ2dnUVZ_tGdnZ2d(a)giganews.com... >>> ScadaEng wrote: >>>> I have worked allot with RS232, and other serial protocols, but this is >>>> my first RS485 project. It seemed straight forward to me, but now I >>>> have >>>> a big problem. >>>> >>>> I am using the max490 chip. I'm doing full duplex, 4 wire. Each of my >>>> nodes have the max490 communicating with a 16F877A pic chip. The whole >>>> project will have 25 nodes. I just built two pcb's (nodes) and >>>> individually they work as expected. However when I put both of them on >>>> the rs485 bus, I can't talk to either of them! Probably some kind of >>>> collision, but as it turns out my scope just died and I'm on a tight >>>> deadline. Any help is greatly appreciated. >>> >>> Check your output enables. You can't have both on at the same time. >>> The >>> system must be designed to allow only one transmitter to be on at a >>> time. >>> The easiest way to do this is to have the master poll each device in >>> turn. >>> When polled, each device can then send either a NoData packet or reply >>> with the data that it needs to send. This approach was used for several >>> generations of point of sale systems and works quite well. You will >>> need >>> to have unique addresses for each device and a means of setting them. >>> >>> b. Farmer >> That's the thing, there are no output enables with the max490 chip. I do >> have unique addresses, and I can call each board by itself with it fully >> functioning. Its when I put more than one board on the network(485) that >> I >> can't commmunicate with any of them. Not that it should matter, but I am >> using a modified RTU Modbus protocol. > > You have to turn the transmitter on under processor control, and for that > you have to have an enable pin on the transceiver. That chip isn't really > an RS-485 transceiver at all -- it's more a 422 transceiver without > internal terminations. > > Sorry. That's the breaks. > > Either daisy-chain everything, with board 1 transmitting to board 2 etc., > back to board 1, and wait for the system failure when one board fails, or > rip out the 490 and put in a real 485 transceiver, like the MAX-485. > > -- > Tim Wescott > Control system and signal processing consulting > www.wescottdesign.com Yeah, thats what I was affraid of. I was grabing at straws, I was hoping someone would see a way out of this. Thats what happens when you get caught up in the rush, and get talked into "not waisting time making a prototype". I think I will order the max491 and hack the hell out of 25 boards. Thanks to everyone for your responses.
From: Glenn Gundlach on 12 Jun 2010 00:15 On Jun 11, 6:15 pm, "ScadaEng" <scada...(a)optonline.net> wrote: > "Tim Wescott" <t...(a)seemywebsite.now> wrote in message > > news:UvednQJjt_R8Ro_RnZ2dnUVZ_gWdnZ2d(a)web-ster.com... > > > > > > You have to turn the transmitter on under processor control, and for that > > you have to have an enable pin on the transceiver. That chip isn't really > > an RS-485 transceiver at all -- it's more a 422 transceiver without > > internal terminations. > > > Sorry. That's the breaks. > > > Either daisy-chain everything, with board 1 transmitting to board 2 etc., > > back to board 1, and wait for the system failure when one board fails, or > > rip out the 490 and put in a real 485 transceiver, like the MAX-485. > > > -- > > Tim Wescott > > Control system and signal processing consulting > >www.wescottdesign.com > > Yeah, thats what I was afraid of. I was grabbing at straws, I was hoping > someone would see a way out of this. Thats what happens when you get caught > up in the rush, and get talked into "not waisting time making a prototype". > I think I will order the max491 and hack the hell out of 25 boards. > > Thanks to everyone for your responses. FYI the video post production industry uses 422/485 as in figure 2 pg 8 of the data sheet. Each machine gets it own port on the computer running at 38.4 Kbaud. I know this doesn't help you but there are places those chips are useful. Sorry about your predicament. I've been there too - for the same reason. Never time to do it right but always time to fix it. G²
From: Paul Keinanen on 12 Jun 2010 02:55 On Fri, 11 Jun 2010 19:14:42 -0400, "ScadaEng" <scadaeng(a)optonline.net> wrote: > >"Bit Farmer" <bit.farmer(a)yahoo.com> wrote in message >news:V9-dnQM0RuB8Io_RnZ2dnUVZ_tGdnZ2d(a)giganews.com... >> ScadaEng wrote: >>> I have worked allot with RS232, and other serial protocols, but this is >>> my first RS485 project. It seemed straight forward to me, but now I have >>> a big problem. >>> >>> I am using the max490 chip. I'm doing full duplex, 4 wire. Each of my >>> nodes have the max490 communicating with a 16F877A pic chip. The whole >>> project will have 25 nodes. I just built two pcb's (nodes) and >>> individually they work as expected. However when I put both of them on >>> the rs485 bus, I can't talk to either of them! Probably some kind of >>> collision, but as it turns out my scope just died and I'm on a tight >>> deadline. Any help is greatly appreciated. >> >> Check your output enables. You can't have both on at the same time. The >> system must be designed to allow only one transmitter to be on at a time. >> The easiest way to do this is to have the master poll each device in turn. >> When polled, each device can then send either a NoData packet or reply >> with the data that it needs to send. This approach was used for several >> generations of point of sale systems and works quite well. You will need >> to have unique addresses for each device and a means of setting them. >> >> b. Farmer >That's the thing, there are no output enables with the max490 chip. You can use that chip only on the master. In a "4 wire RS-485" network, the master will always have both the Tx as well as Rx active all the time. The slaves will always have the Rx enabled (listening for the master Tx pair), however, the slave Tx must only be activated, when that slave has been addressed and is ready to send the response to the master. Have you looked at e.g. MAX485, which has separate ReceiverEnable and DriverEnable pins, which you need for the slaves. I do not know about the PIC UART, but make sure that actually the last stop bit for the last byte has been transmitted out of the shift register, before turning off the transmitter. Some stupid UART designs such as the 14550 family generate an interrupt when the last byte has been loaded into the Tx shift register, however, you can not turn of the transmitter at time, but you have to wait for the last byte has actually been shifted out. For Modbus, you should actually keep the transmitter enabled for an additional 3.5 character times after the last data byte has actually been transmitted (thus sending constant Mark state), however, with a properly terminated line, this is not necessary as the last stop bit will put the line into the Mark state and the "fail-safe" termination will keep the line in Mark state, even if the transmitter is disabled.
From: Nico Coesel on 12 Jun 2010 03:51
"ScadaEng" <scadaeng(a)optonline.net> wrote: >I have worked allot with RS232, and other serial protocols, but this is my >first RS485 project. It seemed straight forward to me, but now I have a big >problem. > >I am using the max490 chip. I'm doing full duplex, 4 wire. Each of my nodes You can't do full duplex on a RS485 bus with more than two nodes unless you use some kind of hub. Every device needs to receive the transmit signal from all other devices. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico(a)nctdevpuntnl (punt=.) -------------------------------------------------------------- |