PDA

View Full Version : Serial i/o not working on new board



T Chap
10-13-2006, 10:34 AM
Just got some boards in, I thought I had duplicated the Prop Stick schematic identically, but no Prop found.

Here are some diagnostics and comparisons to Prop stick behavior:

1. On power up, Prop on new board will show similar activity on pins 37/38 to EEPROM to that of PStick at power up.

2. On attempt to send program to new board, Rx pin 40 shows same activity as on PStick.

3. Pins 37,38, 39, 40 trace out identically to MAX3232ECPE and 24LC256, all have 3.3v

4. On F10, Propstick pin 39 Tx goes from low-high(activity)-low

5. New board on F10 pin 39 Tx is always high no matter what, cutting the 10k pullup will leave it sitting low

6. Pin 11 Reset always high on new board

7. Tried 2 different Props

8. Tried 2 crystals

Since the new board Prop seems to be talking to the EEPROM, would that confirm the Prop is running?

Since the new board seems to Rx the same info to pin 40, but does not acknowledge, what other reasons could there be the Prop doesn't want to respond?

Thanks for any suggestions

T Chap
10-13-2006, 04:39 PM
8 hours into trying to get this thing to program but still no Prop found. I have compared everything I can back and forth between the Propstick, all the connections seem right. I have metered out the serial able to the Max3232, and from the Max3232 to the Prop a hundre4d times. Pin 40 gets the same signal on F10 on both Popstick and newboard. Pin 29 on the Propstick always acknowledges, new board doesn't. On reset, the newboard talks to the eeprom.

More tests:

1. Pulled Propeller out of Propstick, pulled Max3232 out of new board, ran jumper wires from the board sockets 39, 40 to the Propstick same pins to test the new max3232 on the Propstick direct to the new board, no luck.

2. I pulled the Propeller out of the new board, ran the Propstick's max3232 pins to the new board Propeller, no luck.

3. Tested the crystal on the scope from the Propstick, not sure really how to read these but only in sin wave measuring I saw a sine wave in the low ms, probably to slow to be the 5mhz signal. No obvious square wave clock

4. Tested the same idea on te new board, no sine wave present, no obvious square wave clock

Any more test suggestions would be greatly appreciated! I'll start making a new board now just in case it is a mechanial problem.


**New board == no change.

Post Edited (originator99) : 10/13/2006 9:35:45 AM GMT

Paul Baker
10-14-2006, 12:58 AM
I've talked with Chris about your circuit, he thinks that you need to bypass the DTR signal so it is going directly from the serial connector to C11 because the MAX232 is inverting the signal and the circuit you have connected is expecting a non-inverting signal. If you are still experiencing problems, also disconnect R18 from the circuit.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

T Chap
10-14-2006, 03:39 AM
Great! Thanks Paul. I took the Max3232 out of the path and it programs fine. I am not sure why the Propstick works when it has the same schematic as what I posted, but at least things are moving forward.

Paul Baker
10-14-2006, 04:12 AM
Because the MAX232 inverts the signals it passes through. That is what the triangle with the end-bubble indicates in the MAX3232 data sheet. Glad to see it's now working for you.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

parts-man73
10-16-2006, 10:34 AM
I also made the mistake of using part of the propstick schematic when designing my own board. I just received 5 prototype boards, soldered everything up, and sure enough, no communication. I first made a solder bridge between pins 12+13 on the MAX3232. Then thought about it for a few minutes, if the input is low, the MAX3232 will invert it, making it high, and when it's high....well...you get the point... it will always be high.

So then I got the bright idea of cutting legs 12 and 13 off the max3232 chip and leaving the solder bridge on the circuit board. Still nothing though.

Well, my major question is.... Is the propstick schematic shown in the documentation PDF incorrect? I don't have a propstick to check if the actual hardware matches the documentation. Up till now I've been using the 3 transistor interface method. I should have tried the MAX3232 circuit on a solderless breadboard before I made my boards manufactured. http://forums.parallax.com/images/smilies/shakehead.gif

Brian

Phil Pilgrim (PhiPi)
10-16-2006, 12:56 PM
Guys,

I've rechecked the PropSTICK schematic against the board layout, and they do agree.

Originator99, I notice in your schematic that you're using 15K resistors in the reset circuit, instead of the 10Ks used in the PropSTICK. It might be that you're not getting enough base drive through 15K with a 3.3V signal, but enough of one when driven directly by RS232 levels.

Because the reset circuit is AC-coupled, it's edge-triggered and will probably be insensitive to polarity, given that the reset pulse from the IDE is only 50mS wide. This is to say that whether it triggers on the rising edge or the falling edge of DTR might not matter. This very subject was covered in exhaustive detail during the development of the PropSTICK here (http://forums.parallax.com/showthread.php?p=581907). The outcome of that thread is that it's best to drive the reset transistor from the MAX3232 chip (i.e. through an inverter). This, in fact, is also how the Demo Board is configured, except from the FTDI chip instead of the MAX.

However, in rereading that thread and upon looking at the Demo Board schematic (http://www.parallax.com/dl/docs/prod/prop/PropDemoDschem.pdf), I've uncovered a possible misconception that could turn this argument around. The assumption seems to be that the DTR signal emerging from either receiver (MAX3232 or FT232R) is positive-going when, in fact, it's not. In RS232, the handshaking signals are true on the RS232 lines and inverted on the logic side — just the opposite of how the signal lines are treated. This means that the "DTR" signal coming out of either receiver should be labeled, "/DTR". When DTR is "asserted", it takes a positive voltage on the RS232 lines and a logic "low" going into the driver on the PC end and coming out of the receiver on the Propeller end. So now I'm not sure that either the PropSTICK or the Demo board have optimal reset circuits. The evidence is weakly circumstantial, to be sure, but enough to raise doubts in my mind.

Incidentally, the one variance I've made from Chip's suggestion (and from the Demo Board circuit) is the inclusion of a 10K resistor in series with the .01uF cap. (I guess I was hoping to alleviate any chances of overdriving the transistor's base.) So you might try eliminating this resistor (or using smaller value) to see if that helps.

I'm sure all this will spur more discussion of a matter I assumed had been laid to rest months ago. Hopefully, we can drive a wooden stake through its heart this time! http://forums.parallax.com/images/smilies/smile.gif

-Phil

parts-man73
10-16-2006, 09:45 PM
Funny... I started that first thread you mentioned, with my suggestion to use the MAX3232 chip.

I put my project on hold for awhile. But now I'm trying to get it done. I understand now the reset circuit. I have 2 different brands of MAX3232. I used the "dallas/maxim" brand chip, I also have a "ST Micro" brand. But the pinouts look identical. My Propeller stopped responding last night though when I was trying to fix this problem. So now I have to wait for a replacement to continue testing.

I'll have to post a copy of that part of my schematic, it's a little cluttered, as this daughterboard has both the programming interface, and 2 mini-din connectors for keymouse and mouse input.

Also, What is the purpose of the pullup on P30? I haven't noticed anyone else putting a pullup there.

Thanks,
Brian

Phil Pilgrim (PhiPi)
10-16-2006, 11:39 PM
Brian,

I use the STMicro version. It's less expensive and has the same capabilities. But I do buy the "E" version when it's available, since it has better input protection circuitry.

When the Propeller resets, all its pins are inputs. The '3232 has built-in pull-downs on the inputs to its receivers, but no pullups on the inputs to its drivers. The pullup on P30 is to keep TxD in a marking state until the program can take over and drive it. This will keep the system from sending a spurious BREAK signal when it powers up.

-Phil

kelvin james
10-17-2006, 01:08 AM
I noticed in the other schematics that there is a some type of direct ground connection between the serial port and the max chip. It does not show on your circuit. May not be an issue, but thought i would bring it up in case. Nice board, are you going to sell them?

kelvin

T Chap
10-17-2006, 03:01 AM
All I can say about the schematic issue is I went through the PropStick the best I could, and it seemed like the schematic agreed. On my boards, the schematic didn't work, granted I did have have in 15k's instead of 10's as noted above. I never tried it with 10's after it worked by removing the max3232 from the path from pin 4 of the serial cable.

As far as selling the board, I built it primarily so I could divorce myself from MAXNC who made the machine, with whom I have had nothing but a bad experience for 10 months. I also needed drivers for other projects requiring steppers and encoders, and since I wanted my own software control, the home brew was the best option. The boards are working great, I am still sorting out the encoder comparing and reset issues which will tighten up this week. If anyone wanted a board I suppose that could be arranged, althought I wasn't looking at them as a product by themselves as there are many boards available. The beauty of this board is that one Prop runs the whole show for a 3 axis system.

The new board does the following:

1. Sends signal to PC for pause on missed step
2. Receives signal from PC for reset
3. Receives 3 step and 3 direction signals
4. Receives Flood/Mist signal with its own mosfet and connector to send where you want
5. Receives Spindle signal, pwm or on/off, with it's own mosfet and conntector, with SSR for spindle 120v control
6. 24v regulated 3amp supply, 5volt, 3volt
7. Accepts 3 encoders, compares and triggers pause/stop to PC
8. Adjustable Off Time PWM
9. Retrofit for Maxnc 10 CL machine

Some of this was worked out with the help of Phil Moore who is one of the top guns at CNCzone.com.

I plan on an LCD version with it's own fancy box in the near future.

Post Edited (originator99) : 10/16/2006 7:28:09 PM GMT

parts-man73
10-18-2006, 08:24 AM
I attached a picture of the programming section of my board. I just revised it by removing the MAX3232 for the reset circuit. Is that the optimal solution? Or should I send the signal through the MAX3232?

In my diagram... some wires go out of the screen capture and some explainations. IC1 is the MAX3232, I/O-8 is connected to P31 on the propeller, I/0-7 is connected to P30. the other end of R3 is connected to 3.3 VDC, Pin 16 of IC1 also goes to 3.3 VDC. Pin 19 on the connector is GND. The collector of T1 is connected to RES on the Propeller, the line goes across GND in the schmatic, but it is not connected, I verified this on the board.

It just didn't seem to work in it's current state.

Anybody spot anything I'm doing wrong???

Thanks,
Brian

T Chap
10-18-2006, 09:15 AM
What processor is that? Hard to tell not knowing what micro you have shown, The Prop 40 pin dip would use pins 39 and 40.

parts-man73
10-18-2006, 10:27 AM
Sorry, I should have been more specific. The object on the right side on the picture is not a micro. It's a 20 pin connector. My design has the propeller on a main board, and this programming board will plug into the main board. I/O1-8 correspond to A24-A31 on the propeller, specifically in this example, I/O-7 is A30(pin 39) and I/O-8 is A31(pin 40). There's other pins in the connector dedicated to other functions, such as +5VDC, +3.3VDC, GND and RES.

As soon as I get all the bugs worked out of it, I will start a new thread introducing my design and give alot more details about it.

Thanks
Brian

Bill Henning
10-18-2006, 02:24 PM
Hi guys,

Since I am prototyping up a propeller with a MAX232N I thought I'd post the schematic for how I plan to use it... hopefully I did not make any errors! I would not be surprised if I did, I've been out of electronics for a few years.

Btw, the capacitors are .1uf ceramics (the data sheet I have for the Max says I can use ceramics)

T Chap
10-18-2006, 02:45 PM
Not sure that it matters on the MAX232, but on the MAX3232 the schematics are drawn with V+ to GND, you have it to +5. Also, not sure about you inverting the TTL side, although level shifting with 4049 or 4050 is fine for that putpose. Why not just use the MAX3232 ECPE which runs on 3.3v, and levels shifts to rs232? Eliminate the 4049s in the process. Just tyoe in the part number on digikey. Ceramics are fine.

Peter Jakacki
10-18-2006, 02:48 PM
Hey Bill! are they inverter gates that you hooked-up to the max? The max already inverts the signal and all you need to do is to feed that directly into the prop. Since the max you are using is running off +5V you can use a 10K-100K series resistors to the RxD and RESn to limit the current. Otherwise use a CD4050 non-inverting buffer (I wouldn't bother).

*Peter*

Phil Pilgrim (PhiPi)
10-18-2006, 03:01 PM
Hi Bill,

If you use a MAX3232 (ST3232), you can run it from 3.3V and won't need any level shifters. The CD4049s are inverters, anyway, and will yield the wrong signal polarity. Also, the RESn signal should be AC-coupled to yield a low-going pulse on the DTR edge. (Which edge seems to be the subject of debate again. See the discussion above.) You can use an open-collector transistor to drive the RESn pin: it has a built-in pullup resistor. Also, any uncommited "TTL-ins" on the MAX part should be tied to Vdd or Vss. And, although not everyone does it, I would recommend pulling TxD up to Vdd with a 10K resistor.

Take a look in the forum at what others have done. There's plenty of prior art available to take inspiration from without having to reinvent from scratch — and plenty of discussion to go along with it!

-Phil

cgracey
10-18-2006, 04:14 PM
The PC Propeller Tool triggers a reset on the Propeller chip by "setting" DTR and then "clearing" DTR. Like many aspects of RS-232, polarity is usually opposite at the line level and "set" might mean "clear", and vice-versa. Bottom line is this: at the 3.3V logic-level pins of the FTDI chip, the signal labeled "DTR" goes low, then high, in response to "setting" and "clearing". It is the high-going edge that triggers the low-going reset pulse on RESn. If you are dealing with a raw (inverted, +/-12V) RS-232 DTR signal, you can just couple it to RESn via a .1uF cap.·Otherwise (logic-level, 3.3V), you'll·need to use an·NPN·device where the emitter is tied to VSS, the collector is tied to RESn, and the base is fed by DTR through a 10nF cap with a·10K resistor·at the cap/base junction tied to VSS. Whew! I hope that helps.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


Chip Gracey
Parallax, Inc.

Phil Pilgrim (PhiPi)
10-18-2006, 05:15 PM
Chip, I do believe the vampire has been slain! http://forums.parallax.com/images/smilies/smile.gif Thanks!

Bill Henning
10-19-2006, 01:05 PM
Hi guys, sorry, non-propeller work intruded...

Originator99:

The data sheet I have says V+ can go to ground or +5V; however I can easily tie it to ground instead.

I was inverting the TTL side due to comments in this thread about inverting RESn; lack of sleep made me assume I'd
have to inver the rest...

In the future I will use MAX3232's, I just already have a pile of MAX232N's, and I thought I'd also use the 4049
to take care of the 5V to 3.3V interfacing issue (I also have a pile of 4049's)

Peter Kakacki:

My bad, thanks to you guys I won't wire it up and be puzzled why it is not working :)

Good idea, I'm leaning towards ditching the buffer and going to current limiting resistors.

Phil Pilgrim:

Ah, but I have a lot of MAX232N's hand... I will in the future shift to MAX3232's

I will drop the 4049 and just use current limiting resistors. The debate above
(and insufficient sleep) is why I inverted everything... I was wondering about that
as I never inverted Max232's for PIC's or AVR's...

Chip Gracey:

Thanks, that clears up the DTR business :)

I LIKE THE .1uF cap idea!!!!! I'll try that!

For now I'll use MAX232's for the first few proto boards, but I will switch to MAX3232's
in the future.

Thanks, it does help!

Phil Pilgrim (PhiPi)
10-19-2006, 01:42 PM
Bill,

Regarding whether to ground that cap or tie it to Vdd: the only reason to choose Vdd is to permit a cap with a lower DC working voltage. Other than that, there should be no difference in performance. (I always ground mine.)

-Phil

Bill Henning
10-19-2006, 02:05 PM
Thanks Phil.

My analog side is very weak.. I have to do a quick refresher, its been too many years since I did anything with analog elecronics (other than feed an a2d)