Updated MaxSonar-EZ1 Datasheet and Updated Website

All, I really want to get the data sheet correct, please : ).
So from your response, I will change the data sheet to state
"inverted" instead of "not inverted". Is this what you are stating? But when I go on to state that one must invert before connecting to a MAX232, that is clear to you guys, correct? Please, no double talk.
The ability to interface to stamps is a no brainer! To state that the MaxSoanr-EZ1 has any trouble interfacing with stamps, is just not true. Stamps like the 0 to 5V serial inverted or not. Have you ever used stamps for serial input? Nothing is easier! Nothing!
The Basic Stamp Manual 1.8, page 319, states "Serout through the I/O pins is limited to logic-level voltages of 0V and 5V; however, most RS232 devices are designed with sufficient leeway to accept logic-level Serout Transmissions, provided they are inverted.." (The stamps use a PIC with 20mA drive capability just like my product.)
You know, I read the above statement in the mid 1990s and I have used it ever since, without any trouble. This is on XT, 286, 386, 486, Pentium, and more. I have used only 9600 baud and it has always worked. I have built it into many systems (Ouch!) and these have always worked! (Are you saying you tried the MaxSonar-EZ1 output and it didn't work? Didn't another post already state that it worked? Not sure how much you are getting from pushing this?) I have years of history of this serial interface working.
As for connecting it up wrong. If you connect it up to the wrong pin, I am very sorry, but I do not recommend this : ). Again, are you stating it didn't work for you? Did you connect it up wrong?
I mention RS232 format (but state 0-5V) because many programming languages and application notes refer to serial as RS232. Again, I make sure to separate myself from this Recommended Standard (RS) by stating 0-5V. My understanding of this Recommended Standard, is just that, a Recommended Standard, but if you deviate, you must let people know. So this is what I did.
So blast Parallax if you want. Blast my personal experience if you want. But I am really just trying to get the data sheet and the web site accurate. This is a new product release and it has been very well received! The performance/price is unmatched! In addition, I am working to accommodate the other polarity soon. (I currently have 1000s in WIP. This is to keep the costs very low to the end user. I really am truing to keep the profits low so you guys get a good deal! Because of the volume, correcting this is not easy.)
So, I do hear you guys. I do know that you would like the other polarity. But first, my customers and I really need to have an accurate data sheet (and follow this with an accurate user manual) to correctly represent what I have. Then when this is ironed out, I really do plan to accommodate the other polarity.
Bob Gross
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
All, I am working to fully flush out the data sheet for the MaxSonar-EZ1.

now, it has been confusing for some people. The reason for this is that while the MaxSonar-EZ1 serial 0-5V output is not inverted, most serial 0-5V outputs are inverted. (The reason that the 0-5V outputs are inverted, is so that they can be inverted again, when the are brought up to full RS232 voltage levels.) (I may still change the datasheet further, but I am not sure exactly what wording to change, as of yet. I am trying to iron this out.)
When I was designing the MaxSonar-EZ1, I was using these three controllers to test out my product Basic Stamp, BasicX, and BasicAtom. These all work fine with the MaxSonar-EZ1 serial and pulse width interfaces. In addition, the micros with analog to digital converters function well with the MaxSonar-EZ1 analog output.
In addition I used various PCs. This 0-5V connection to the PC has been tested and works well, but it is outside of the recommended standard. To those that would like (or require) full levels, please invert the output, and use a MAX232 or MAX233. So the people that like the PC interface are not complaining and I have received reports that this is how they evaluated the product and that they really like this interface.
Since the products release, I have learned that some microcontroller serial interfaces require the serial to be inverted when at the 0 to 5V levels (some 8051s, some AVRs, etc.). The hardware on these micro's (serial UART) actually require the inverted 0-5V, and this is why the complaints are happening. Again this is easily solved with an external inverter.
I know that this product is under priced when compared to the competition, so I could take the loss now, and change the product, and increase the price to everyone to cover the losses. I hate price increases!
I do not want to drive the costs up by having to change this product mid stream. I will eventually have to make some profit to keep this product on the market. (At the current sales rate and margins, it would be over one year before I make a profit with the product as it now stands.) So, I would like to continue to offer this product at the current good deal. This is good for the robotics community.
For you that would like the inverted serial output, when the inverted serial output can also be included in the product, I will include this.
Bob Gross
For you guys that have not looked at the actual product, and have only read the discussions about the serial interface, please have a look. The product is the next leap forward in ultrasonic range finder technology. www.maxbotix.com
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bob (Robot Wars Thumper 1997) wrote:

[snip]
I think you are still a little confused about what is inverted or not. First, in 0-5V electical levels, 0V = 0 = L and 5V = 1 = H. When a UART shifts the data out is, it is *not* inverted. When the character 'C' = 0100 0011 is transmitted it is transmitted as follows:
What: I I I I S 0 1 2 3 4 5 6 7 P I I I I I Data: 1 1 1 1 0 1 1 0 0 0 0 1 0 1 1 1 1 1 1 Voltage: 5 5 5 5 0 5 5 0 0 0 0 5 0 5 5 5 5 5 5 RS232C: - - - - + - - + + + + - + - - - - - -
Where I = line idle, S = start bit, 0-7 = data bits, P = stop bit, 1 = high, 0 = low (or 0 volts), 5 = +5 volts, - = -12 volts and + = +12 volts. The data byte is shifted out least significant bit first and it is *not* inverted. A 1 in the byte is represented as 5 volts. If a 1 bit in your data is represented as 5V on the output pin, it is non-inverted (i.e. true). Conversely, if a 1 bit in your data is represented as 0V on your output pin, the data is inverted.
Since your product is representing a 1 in the data as 0V and a 0 in the data as 5V, your product is currently using *inverted* signalling. Period. Full stop. End of discussion.
Next, I am not aware of any hardware UART constructed in the past 30 years that uses *inverted* signalling. All of them use non-inverted signalling. I would be interested if you can identify *any* hardware UART that uses inverted signalling.

Nice try, but the PIC16F676 that you use does not have a hardware UART, so you must be bit banging the serial output out in software. It should be trivial to go into your software and invert the bit. No PCB changes are required, just software. You can sell two versions of the product, the current one with *inverted* data, and one with *non-inverted* data.
The people on this list have overwhelmingly said that they want *non-inverted* serial data. The choice is yours.
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes!
There are some micros that have bit settings to allow inverted input, but not all, or even most, can handle and inverted output.
And I still hold, while an inverted output can often work with RS232 recievers, it should be avoided as a "potentially product-killing accident waiting to happen" design.
I don't know if the Stamps use inverted, non-inverted serial, or selectable settings. If someone knows for certain, I'd be curious to know. Most of the micros I produce do not accept inverted inputs. In the case of our software serials, I guess we could mod them to accept inverted serial, but it seems like a step backwards to me.
As you say, it's Bob's choice what he wants to sell, and we have no say. I think he made the worse of two choices, but that's his perogative. But when the nomenclature is used abused or wrong, confusing the public, (bad thing, and even legally actionable, if customers have losses) as it has been about what is inverted and non-inverted, I think it is important to try to eliminate the confusion from the public forums.
--
Randy M. Dumse
www.newmicros.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

I've never seen them. Can you name a couple?

No argument from me. For me, I will either do RS232 right or not at all.

Parallax Stamps can bit-bang serial data in both inverted and non-inverted mode. The Parallax Javelin can do the same. The OOPIC can also do both inverted and non-inverted. The OOPIC also allow you to hook up to the on-board hardware UART, and that is non-inverted (of course!) I suspect that the BSX24 and ATOM can do both as well.
One of my close friends has used the Parallax Basic Stamp in bunch of robots and he has talked with many modules using serial protocol and never had to use Stamp's the ability to invert the data.
> Most of the micros I produce do not accept inverted inputs. In the

Agreed.
The serial communication protocols evolved over time and they can be quite confusing. For example, why did the RS232 folks choose -12V for "1" and not +12V? They did and we've had to live with the confusion ever since.
At least Bob asked for feedback and he has been willing to *listen* to the feedback. No complaints from me on that aspect. Hopefully, some other people are reading this thread and it is helping them understand serial communication protocols a little better.
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Well, a series at least. The DSP56xxx in our 'Pod's line of micros have a POL polarity bit. From the DSP56F801-7UM.pdf manual:
12.6.2.6 Polarity (POL)-Bit 10
This bit determines whether to invert the data as it goes from the transmitter to the TXD pin and
from the RXD pin to the receiver. All bits, START, DATA, and STOP, are inverted as they leave
the Transmit Shift register and before they enter the Receive Shift register.
. 0 = Doesn't invert transmit and receive data bits (Normal mode)
. 1 = Invert transmit and receive data bits (Inverted mode)
Note: It is recommended the POL bit be toggled only when both TE and RE = 0.
Think MCORE might have had this feature too, but not sure. Just have the sense this isn't the only micro I've seen it on. Again, not sure.
--
Randy M. Dumse
www.newmicros.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

[snip]
Thanks!
Have you ever seen a micro that only does inverted output from its UART?
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Never.
Or at least not any I can remember.
I think I've got a pretty good idea why RS-232 is "inverted" (by my understanding of it being inverted at least). The normal amplification mode of a transistor in common emitter inverts the signal. Almost always with single sided drivers, in order to use the least transistors possible, you would use an inverter. It takes less transistors to make an inverter than a non-inverting buffer. Back in the day, transistors cost like processors do today. And another reason to use an inverter instead of a buffer, with less stages, its faster. So to make the most economical, fastest, line driver then, you used one stage of inversion in the driver, and another stage of inversion in the receiver.
This is also the reason 7400 NANDs, 7402's NOR's and 7404's inverters were the low number (first) 7400 series gates made. Simpler and faster than AND's OR's or Buffers.
--
Randy M. Dumse
www.newmicros.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

Same here. If you want to be able to hook up to a microcontroller UART, the safe choice is always to use non-inverted signalling. 'nuf said on that topic.

You walk into your final exam for digital 101 and it provides the following table:
Value CMOS RS232C ======================= "1" 5V -12V "0" 0V +12V
Now design a circuit that converts a CMOS signal into an RS232C signal and another circuit that converts an RS232 signal into a CMOS signal.
My solution to this problem would be to use a MAX232 chip. If you want to call it an inverter, I guess I really do not care, but given that a "1" on one side produces a "1" on the other side, I do not call it an inverter. We may have to agree to disagree on this one.
It is way past my bed time. I'm going to give the topic a rest.
Later,
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Wayne, you can add AVRs using the Bascom compiler to the list that support inverted and non-inverted. The problem comes with the hardware UART - the MCUs I've used don't have the option of changing the polarity of the serial data.

Agreed, Bob is reaching out to a large audience to get feedback. Let's not hammer him too hard in the process :-)
Eddy Wright
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Randy M. Dumse wrote:

Note that many people have *very* different ideas about what Bob has been saying.
I will note that while he has the choice of what he wants to sell, we have the choice of what to buy.
If I find that I can't access this via standard TTL-level asynchronous serial, I may not buy a second one. If I want to access a component like this from my PC, I will use a level-shifter.
If this can be changed by a firmware upgrade, I would go for it. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bob -
I've ordered a pair (they haven't arrived yet) - I'm intending to connect them directly to my PIC's USART pin(s), since the +/-5V obviously works perfectly for this.
Question: Will the 'R' be decoded as decimal 82 (= 0x52 = 0b01010010) or the inverse 173 (=0xAD = 0b10101101)?
I don't really care which it is - experimentation will tell me, and it's easy to invert the byte received before using it, but it's always nice to get the code right first time :)
My 2c on the datasheet thing - Personally, I think that a statement that "0=0V, 1=5V" (or vice versa - which ever is correct, obviously) would be much simpler for everybody. It's unambiguous, and that means that nobody can get upset.
To propose an alternative for the ds:
"TX - Delivers asynchronous serial with 0 bit = 0V, 1 bit = 5V. The output is an ASCII capital "R", followed by three ASCII character digits representing the range in inches up to a maximum of 255, followed by a carriage return (ASCII 13).
Note: Although the voltage of 0-5 V is outside the RS232 standard, most RS232 devices have sufficient margin to read 0-5V serial data. If standard voltage level RS232 is desired, invert, and connect an RS232 converter such as a MAX232."
This separates what the MaxSonar produces from the way to make it into a "real" RS232-compatible signal, and I think avoids all the confusion...
IMHO...
Andrew Merton
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Andrew Mertron,
Thanks for the datahseet advice.
I opened up this thread to get these kind of things on the table.
Thanks again,
Bob Gross
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Actually, it almost certainly won't work perfectly, precisely because of the reasons pounded into the ground in the preceeding discussions.
Your PIC's USART, just like my 8051's UART, expects the idle signal to be a +5V TTL level (I would say "1", but I don't want to reawaken Wayne's ire), with "true" data bits at 0V TTL level ("0" to me...) and "false" data bits at 5V TTL also. The MaxSonar-EZ1's output is exactly the inverse of this.
Since the USART depends upon the logically "true" start bit to begin its asynchronous reception, it will always be seeing what's known as a break condition, and won't be able to synchronize on the beginning of each character frame. Were the output inverted, as many posters have requested, then it would work fine. However, "out-of-spec" pseudo-RS232 direct connection to a standard PC serial port would then not work, for the same reason.
Of course, if you're bit-banging the reception with code, then it really doesn't matter. -- Mark "I prefer heaven for climate, hell for company."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Mark Moulding wrote:

"Bother," said Pooh...
Back to bit-banging, then...
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Dear Nobody,
Your inputs (and everyone else the participated) will really help us when we do the next datasheet update (the next datasheet update is scheduled for mid February).
We at Maxbotix would like to thank everyone that contributed to this discussion. We would like to do so in a tangible way (by sending you a gift). I have emailed everyone that contributed, but when I tried to email you, the email bounced. Please email me at bob@max .... remove this area (spam)... botix.com and I will let you know the details.
Thanks again,
Bob Gross
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
All, I do bit bang with the PIC. It may seem trivial for a hobbyist to change the serial output but this is not a hobby operation. One thing to remember is that I live in AZ and the product is built in MN. Labor costs are low in MN. The production test fixtures are in MN. Distributors are already selling this product and it is doing very well. Right now changing this product would be costly for me and for this operation. To think other wise is to not understand business.
Currently I do not believe that this product will get changed. There have been 2100 started. All of the 1st 1000 have been programmed and 100s shipped in less than one month! The product has been very well received indeed, because the actual press release has not been done yet! Another 1000 are being planned for RoSH compliance. Product success means a great deal. These are the real votes. Changing the product right now really does not make good sense. People have been using this product and they like it.
There are three interfaces to this product right now. Choose the one you like best. I am working to get a datasheet that is technically accurate.
Best regards,
Bob Gross
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.