RS232 question

Hey gang,
Does this screen shot look correct for a burst of RS232 data?
I'm looking at pin14 of a MAX232 driven by ATMega1284 Serial port 1 (pin17).
I can't my PC to recognize it - port is connected to RS232/USB cable with a Prolific chip in it.

I was expecting the output to sit High and then go low for the start bit, this seems upside down to me.
TI MAX232IN (DIP,industrial temp range, 9600 baud) with 0.1uF caps.

Here's the input.
Code is just standard Serial1.begin();
with 3 statements:
Serial1.print ("RelayNumber ");
Serial1.print (relayNumber);
Serial1.println (" On");

and

Serial1.print ("RelayNumber ");
Serial1.print (relayNumber);
Serial1.println (" Off");

Looks reasonable -- RS232 says idle line state is negative voltage. I think Prolific USB-to-serial devices need their own drivers; you can't just plug them in and have them work right away.

Maybe zoom in on the horizontal scale and verify the baud rate?

--
The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

Same thing going out the Serial port to FT232RL module shows up fine on serial monitor

Serial.print ("RelayNumber ");
Serial.print (relayNumber);
Serial.println (" On");

and

Serial.print ("RelayNumber ");
Serial.print (relayNumber);
Serial.println (" Off");

I have Prolific drivers- Windows says they installed and working.

Here it is zoomed in some,still set for9600

Looks odd now...your first image was bipolar (I'm assuming that little red marker on the left represents 0V and the green marker represents the trigger level?) The first image swung from -8V to 8V, this latest image isn't ever going negative.

Your probe is set for 1:1...is that the case? I usually set osc probes on 1:10 for less loading.

Baud rate looks pretty good though.

--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins

That last is the input - I can't get a trigger on the bipolar one. Stupid DPscope.

Any chance your birthday is coming up? :wink:

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

Just passed.
Something to consider - think I want more bandwidth tho.
Am wondering if my pins 2/3 are swapped - gonna make an adapter.

I can't get programs downloaded with this:

any ideas? Have +5,Gnd, Rx, Tx, pressing reset on board after IDE says
Binary sketch size: 3830 bytes (of a 129024 byte maximum)
it continues with
avrdude: stk500_getsync(): not in sync: resp=0x00
Have been "Upload using programmer"- did I wipe out my bootloader? Sketch seems to start immediately with power.

Depends which bootloader it is. The latest optiboot starts up pretty fast and a manual hand on the reset button needs fairly precise timing.

Maybe there is a Tx/Rx<-->Rx/Tx mixup on the pinouts?

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

RS232 says idle line state is negative voltage.

Yes. I'm working on board with RS-232 right now (not Arduino related), and with nothing happening and no RS-232 connection, there is around -11V on the TX line.

You may already know this stuff, but here are some common problems with RS-232 connections:

  • Wrong cable/connection. One device has to be wired DTE, and the other DCE, or you need a "null modem cable". i.e. If you connect two computers together with a "straight" pin-to-pin cable, TX from one computer will be connected to TX on the other computer and it can't work. A null modem cable properly criss-crosses the TX & RX lines, as well as the handshaking lines.

  • Baud rates don't match.

  • Mis-matched handshaking or protocol settings (start bits, stop bits, etc.). If you are not using all of the handshake lines, sometimes you need to fake-out the transmitter or receiver by pulling the handshake lines constantly-high or constantly-low.

Where I work, we have a "make it work" cable that somebody here made. It's got the handshaking lines looped-back to fake-out both ends.

I've got an adapter made up so that I can go 2-2, 3-3, or 2-3, 3-2, no difference still not receiving anything on either end.
Baud rates match.

With sketch Loaded via Programmer, sketch seems to start immediately.
Serial works, Serial1 ('1284P) does not.

void setup(){
Serial.begin(9600);
Serial1.begin(9600);}

void loop(){
  if (Serial.available()>0){
    Serial.print (Serial.read()-48);
  }
    if (Serial1.available()>0){
    Serial1.print (Serial1.read()-48);
  }
}