G30 COM2 Issues

@Justin Take note: When I scope the TX pin on the G30 (with it connected to the other board) it will be pulled low when creating the SerialPort object but then will not change after that point (only when floating or connected to the other board does it do this, not during loop back testing or when plugged into my FT232).

he just means he had to pad the answer out from “yes” because the forum forces a 10 character minimum for a reply.

So my only comment is that your tests should make things clear and you should test with the baud settings that you need to use in the final test. Change nothing other than what is connected. If your G30 loopback test with the correct settings shows that it’s all sweet, the problem is your connected board. Is there any way to test that device in isolation?

@Brett Oh ok thank you for clarifying. My test did use the same exact baud, parity, and bit settings…only differences were the connection.

I do not know of a way to isolate it in regards to sending commands to it since the commands need to come from somewhere (it does have a reset button allowing for it to send commands in isolation but not sure how to make it receive without being connected to either a PC or my G30. There is a GPIB port and a serial header…haven’t gotten the GPIB side working yet because my .NET GUI for the PC is taking a bit. I am going to recheck the continuity of the other board’s RX line again tomorrow morning (I did once already but something may have happened since then). I am waiting on the designer to respond with a comment about my loop back test (he was thinking it was the G30 since it wasn’t working isolated but that was clearly because the TX pin on the G30 was floating when I tried it).

try a slower baud rate.

no two stop bits with five bit data only?

What baud rate would you suggest? 57600 works fine receiving just no transmission. I’ll have to reprogram the PIC with whatever baud rate you suggest.

Update: The G30 is in fact transmitting when the TX line is floating or connected to my other board. I think I had the time scale on the scope too small. I am looping a message every 50 ms and trying to read the response back - the scope shows it is being sent fine but am getting no response from the other board. I know the RX line of the G30 is working though because if I hit reset on the other board, I am able to read “hello,” back on the G30. For some reason, the other board isn’t accepting transmissions even though continuity has been verified on both TX and RX lines.

I figured it out. My \r\n was getting dropped for some reason when sending from my G30. I feel so dumb sometimes haha. Fixed! now I just have to test the GPIB half of the board then this massive G30 design project will be finished (besides final PCB).

1 Like

Ok I am reawakening this thread because I am having issues with COM2 on the G30 again and am using the same code.

It seems like my G30 is getting stuck in a loop or something. I can send a command fine with commport.Write("++ver\r\n") for example. It transmits the message but I think it may be doing something extra because the co-processor it is talking to becomes unresponsive. I believe it is the G30 causing issues and not the co-processor because if I use a level shifter from a PC to serial and use teraterm instead of the G30, I can send the same exact commands to the co-processor and it has zero issues / continues working. It is only when I send commands from the G30 that problems arise.

@Justin or @Brett do you guys have any advice? I have been trying to use the scope to get some screenshots of each setup’s behavior but it is hard to record TeraTerm since every character gets sent to the buffer as it is typed. I am wondering if maybe this has something to do with it…at a loss here I have been stuck on this for a couple weeks. Let me know if I need to explain it differently…its a weird issue and hard for me to describe,

Here is a shot of TeraTerm sending “++addr” with CR as the termination character. Ch1 is on TX (yellow) and Ch2 is on RX (blue).

In a few mins I will upload a screenshot of the exact same message being sent from the G30

Here is the same exact message “++addr\r”

It can clearly be seen that the G30 is doing something extra (show in blue in this picture - it is still the RX line on the coprocessor). The coprocessor responds with 20 in both cases (shown in yellow).

I tried splitting the COM signal so that my coprocessor received the commands from the G30 but the signal is also going to the level shifter then to my PC. This way all messages sent from the G30 now pop up on my PC in Tera Term. Since I connected it this way, I have not been able to replicate the error. I am not sure why splitting the signal is making it better. Is COM2 on the development board missing a pullup or something? I could not replicate the failure a single time with the level shifter reading message from the G30/splitting the signal. As soon as I unplugged the level shifter, I instantly began getting the same error.

Have you tried to decode the G30 transmissions? It may be worthwhile to know which characters make up all that extra stuff the G30 transmits when the cable is not split.

I have not tried to decode it yet, I am not skilled enough to do it by hand nor do I have a serial decoder. I am pretty stuck. Took me weeks to realize it works with the level shifter.

My technician is building my prototype PCB right now so I am going to see if it still occurs without wires involved, and if it does, I am going to try adding a very tiny capacitor to attempt to replicate the level shifter’s effects.

Is the co-processor a 5v or 3v3 part?

@Justin Co-processor is a 5V part

The level shifter I am using is 3.3V logic like the G30

So when you use the level shiftier between G30 and Co it works fine?

@Justin I wouldn’t even call it “between.” I split the signals coming off the G30 - the TX pin has a wire going to the RX pin of the coprocessor and the RX pin of the level shifter. The G30 RX is split between the TX pin of the coprocessor and the TX pin of the level shifter. This way, anything I send from the G30 appears on my coprocessor as well as the terminal connected to the level shifter.

When I have it configured like this, it works fine. Also if I remove the G30 and have the levelshifter/TeraTerm sending commands straight to the coprocessor it works fine.

Since the co-pro is 5v surely you would want the G30 and co pro to have the level shiftier

Whip out your Crayons and make a doodle.