Go Down

Topic: trouble with rs232 comunication (solved) (Read 971 times) previous topic - next topic

finthugo

the one that i found on google is that one http://www.extremeelectronics.co.in/avrtutorials/images/rs232_sche.GIF

the arduino tutorial say:
1 capacitor between 1 - 3
1 capacitor between 1 and ground
1 capacitor between 4 - 5
and 1 between 6 and ground

the on o googles tutorial say
1 capacitor between 1 - 3
1 capacitor between 2 and vcc
1 capacitor between 4 - 5
and 1 between 6 and ground
and 1 more between vcc and ground

i tried both ways with the same result =(

the arduinos tutorial also say to jump all the unused pins to vcc. the google one just say to keep it non conected.

finthugo

i tried something that this tutorial said http://extremeelectronics.co.in/avr-tutorials/rs232-communication-the-level-conversion/

that says to plug out your mcu (arduino in case) and jump rx and tx to see if the comunication with the computer is working, then you open hyperterminal and the character that you send it should give you back. That has a good result so the problem is problaby in the code, does anyone already tried the code that i posted before ? ty all.

PaulS

See reply #4. It is impossible to try your code without knowing what you are trying to talk to.

finthugo

i´m tring to comunicate the arduino with the computer rs232 port using hiperterminal software (im doing that for a test to comunicate with a rs232 sensor later but for now forget the sensor) the both tutorial that i posted is for that arduino <--> max232 <--> pc.

finthugo

#9
Oct 15, 2012, 04:41 pm Last Edit: Oct 16, 2012, 01:53 pm by finthugo Reason: 1
I solved the problem :D i dont know why but the computer recognized what i was tried to type when i used this simple code below
with this schematic tutorial http://extremeelectronics.co.in/avr-tutorials/rs232-communication-the-level-conversion/

Code: [Select]
#include <SoftwareSerial.h>
SoftwareSerial portOne(6, 7);

void setup()
{

 Serial.begin(9600);
   portOne.begin(9600);
}



 
void loop()
{


 portOne.write('x');
 float x = portOne.read();
 delay(100);
 portOne.write('y');
 float y = portOne.read();
 delay(100);

 Serial.print(x);
 Serial.println(y);  

}  

ty all

Go Up