In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Kramer, RS-232 and RS-485 are serial protocol standards, and it is only logical that within the standards it is necessary to specify certain limits, like cable lengths, cable types, capacitance between the wires, etc. Each device specified to be conform with these standards must naturally fullfill the specifications. On the other hand, when you are going to build some proprietary system that will never be connected to a standard RS-232 or RS-485 device, you are free, and can use a design that works for you on one hand but which is also less expensive on the other hand. Any communication over wires will reach limitations by some means. Let's assume a simple two-wire cable. There are several factors causing limits: The resistance of the wires, the capacity between the wires, the incuctance of the wires, the isolation between the wires, electro-magnetic losses, etc. The most critical factor is the capacity between the wires. In general, the capacity will increase with the cable length. When you feed such a cable with AC (and a serial data stream is "kinda" AC), the higher the signal frequency (the baud rate) is, the higher the losses due to the cable capacity are. When you feed 60 Hz AC into a cable, say 1000 m long, you can be pretty sure that you will have almost the same signal at the other end. When you feed in 100 kHz, or 1 MHz you will notice losses at the other hand, increasing with the signal frequency. Things become even worse when we talk about serial data. Here, the signal usually switches between two different voltage levels, -12/+12, 0/+5, etc. where the transitions between the two levels shall have very short rise and fall times, i.e. we are talking about rectangular signals here. According to Mr. Fourier, a rectangular signal is composed of many harmonic sine waves, where a periodical square wave is composed of the basic sine wave f, plus odd harmonics, i.e. f*3, f*5, f*7, etc. with decreasing amplitudes. When you filter out, or suppress the harmonics (and this is what a cable does), the signal at the end of the cable will not only have a lower amplitude but the signal edges will be rounded, and thus can cause wrong decoding on the receiver's side. For a remote system, the cable costs can become really an issue when you think of high-quality data cables. Therefore, it is my idea to find work-arounds when using less expensive cable types, like telephone cables. In order to minimize losses, you should use the lowest applicable data rate, and the highest possible signal level. I'm currently designing a system with one master, and (theoretically) up to 256 slaves, where each slave can control up to 16 LEDs used to indicate positions in a high rack storage area. I'm going to transfer data from the master to the slaves at 300 Baud, and I'm planning to use a 24V signal level, i.e. 0 or +24V. Depending on the size of the storage area, a total cable length of several 1000 m can be the case. I will use regular 3-wire electric cable with one wire for common ground, one for the +24V power supply for the slaves, and one for the serial data. I don't need bi-directional data communication in this case, so the three wires are all I need. Once again, back to the brown-out feature. I agree with you, it's main purpose is to make sure that an Sx-controlled system does not become unreliable when the power supply voltage drops below a certain level. When the SX detects a brown-out, it enters its reset-state, i.e. it stops executing the program, and sets all I/O pins as inputs, i.e. to high impedance. This does not automatically mean that external components will also "behave well". Therefore, a careful design is required in any case. In a bad design, for example, a solenoid, driven by a pair of transistors may become active when the base of the first transistor floats, i.e. when it is not pulled low by an SX output pin. In some of my applications, very "strong" power supplies are used, i.e. even when turned off, the supply voltage drops quite slowly. Without brown-out detection, it happened from time to time that the SX did not correctly do a reset after turning power on again shortly after a power off. Setting the brown-out level to 4.2 V completely cured this problem. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94020#m94369 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)