New b SX52BD
kirk
Posts: 3
Hi I new to this game and I need some advice.· I am trying to build a 48x12 rs485 router.· I looked at the specs on the SX52BD, it seems this chip could work,· My questions is will this chip pass RS 485 with out messing with the data? And any pitfalls to look out for?· Any help or insite would be great.· Thanks in advanced.
Kirk
Kirk
Comments
The SX52 is a micro-processor. It doesn't know 485, you have to program it to know 485, and add transciever chips to do the hardware signalling. Most 485 installations actually use RS-232 bit-protocols -- you know, start bit, 8 data bits, stop bit, that sort of thing. The SX/B language available from Parallax for the SX52 chip does have SEROUT/SERIN commands which DO know the RS-232 bit-protocol, and have been used for this.
So the question becomes what architecture are you trying to implement? Are you having a microprocessor control a switching matrix made of multiplexors? Do you want the SX52 to BE the switching matrix, implementing stuff in software?
tanks
You have 48 "devices", of which 12 are control processors, or you have 48 devices PLUS 12 control processors. And what a 'device' is, compared to a 'control processor', is not clear. I assume a 'device' is a 'slave' device, like a thermocouple tied to a PIC chip?
You've built a "smaller version with relays", which says to me that you've used relays to switch the signal paths in the past. Do you want to use relays in the future? Or a "multiplexer chip" to select the signals?
I've seen a 16x16 'switch' created, which allowed 16 inputs to be 'selected' by 16 to 1 multiplexers on the output. In that case, the microprocessor's only job is to latch to each of the 16 outputs the input channel the output should be routing. The SX can do that easily.
The other interpretation of what you are trying to do is to use the microprocessor's I/O pins AS the input AND output pins. That COULD work, but ONLY if you know, or can control, the timing of both the input and output signals. MUCH harder job, and much harder to specify if the SX (or ANY microprocessor) can do it.
This is close I Have 48 "slave" devices and 12 "masters" 4 slaves per chip 12 ouputs bused to the masters. I want the sx52bd to replace the 578 relays I would need. The pins would just pass voltage for rs485 One pin for "+" the other "-" ground is shared thu out. The sx52bd will be controled rs232 all bussed to geather a dipswitches to ID them. I hope this is clear with out a picture.
Thanks for the help
That would be a more conventional use of an RS485 bus, and would avoid all this switching / relays.
You _could_ build an enormous switch bank out of an SX52, but witout at least knowing your required baud rate, it's impossible to gve a useful answer.
The SX would have to poll all its input pins, and copy the data onto appropriate output pins - I assume while taking routing instructions from somewhere...
It's definitely possible, but a very odd way of going about things, in an RS485 world... Are you expecting it to update the routing based on headers of packet data? More information will get you better answers...
Steve
There is a problem when a controller hangs up and misses noticing the token was passed to it. In this case you can have a controller that keeps tabs on the bus (a master of the masters if you will), if it notices the last communication was a long time ago (you set what this timeout value is) it assumes that the controller·that last recieved the token·is "lost in space" and creates a new token and passes it to the controller that was next in the chain.
Post Edited (Paul Baker) : 3/7/2005 11:52:28 PM GMT
The original poster needs to provide more information, one way or another, before e gets a definitive answer. RS485 just isn't enough. (for instance - I've seen RS485 systems from 1200 baud to 20MBaud. One's trivial to deal with on an SX, the other would be extremely tricky)
Steve
You have a matrix that is 24 x 12. That is 288 cross points. There's a lot of traffic there. The nearest serial-related Virtual Peripheral Ubicom offers is an octal (8-channel) USART. The USART does bidirectional serial traffic. I read the specs some time ago, and I'm not sure this will do more than 9.6k or 19.2k. And it is _only_ eight channels.
You need one line (not counting ground)·per device (12 masters and 24 slaves), for 36 pins. The SX52 has 40 pins, so at least you have the pins, after reset and 'token-passing' pins, if used.
Internal RAM on the SX52 is only 262 bytes. In this you would have to store comms setup data, assignment data (which master has which slaves), and the actual traffic being sent around.
So, what works is one processor per device. Each 'master' device deals with serial traffic with some 'master' device in the outside world. Every 'slave' device has his own processor, and services an external 'slave' device. In fact, the SX52 may be overkill. An SX48 (36 pins, 262 bytes of RAM) may be adequate for the masters processor. The SX28 (20 pins, 136 bytes of RAM) would suffice for the slaves.
Each processor (master and slave) handles outside traffic using RS485 chips, like the LTC485, as the level translator. Internally each 'master' SX uses a pin for half duplex (single-line, one direction at a time) serial communications to the slave processor. I.e., each master SX has 24 pins·connected to one pin on the slave processors (one master can literally talk to all slaves, if needed!). These can only talk to one slave at a time, so a master SX talking to several slaves will be slow in updating data. Of course, each slave has one pin per master, 12 pins.
And a PC program talks to everything through one MASTER PROCESSOR to hand out assignments, using a serial port, right after you write Visual Basic routines to allow human intervention.
Or not.·You could have the one serial port talk to all master processors at once.·Just use HyperTerminal to pass simple commands to the project and recieve simple messages, like status and errors.Now you·build an address into the messages so the proper processor will know the command/data is his.
Gets a tad complicated, doesn't it?
Well, that was fun. Later!
kenjj