Hello, I am use arduino mega 2560 for get weight form Weight Scale by rs232 to ttl
I try all buad rate but Can't read data
i use
rx = 14 > tx rs232 to ttl > and ek 310i
tx = 15 > rx rs232 to ttl > and ek 310i
rs232 vcc > 5V
MAX3232 RS232 to TTL / Female Serial TTL / serial module / Brush board MAX3232 chip
RS232 to TTL / Female Serial TTL / serial module / Brush board MAX3232 chip line to send Dupont
The products are widely used in radio modification, cell phones Brush, XBOX360 Brush, GPS, vehicle inspection, DVD Brush, hard disk repair, set-top box upgrades.
Can be used to program the microcontroller type:
STC microcontroller
STM32 MCU
NXP microcontroller
Renesas MCU
NEC MCU
Communications chip: Domestic MAX3232
Operating voltage: 3.3V-5.5V
Interface: TX RX VCC GND
Sorry i am bad english. Please forgive my stupidity.
Post a link to the datasheet or user manual for the scales.
Don't post pictures of code - they are unreadable and they can't be copied to a text editor. Just copy and paste the code as text and use the code button </> so it looks like this. See How to use the Forum
Have a look at the examples in Serial Input Basics - simple reliable ways to receive data.
It was a real PITA to get a PDF of that manual. Anyway ...
It says at the start of Section 9 "Transmission form Asynchronous, bi-directional, half-duplex" and I am not sure what is the implication of "half-duplex".
If the second example in my Serial Input Basics does not work at 9600 baud then you will need to research what needs to change to deal with half-duplex.
I am assuming 9600 baud is the default as I can't see how you change the baud rate on the scale.
Thank you brother.
I was Try the second example.
but no data send to my arduino,I look at rx led on arduino board. LED does not blink .
Is it possible If it is about IC of rs232?
I use Max3232 in now,And will it be possible if I use IC Max232cpe?
I ask webmaster of weight Scale. Him told me "buad rate is 2400" and pin of rs232c in scale is db9 use pin 2 3 5 And do not need to send data to get weight. Scale will send weight data regularly.
rx = 2
tx = 3
5v = 5
Oh sorry ,Please forgive my stupidity.
Thanks you for teaching me.
I will try in tomorow.
Current time is 09:53pm in thailand.
thanks you again and again
Please don't post pictures of code as it can't be read and it can't be copied to a text editor.
Just copy and paste code and error messages as text and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum
w(); is i try serial print serial of rs232 with out serial available >0
When I post I delete this code but I forgot delete w();
out put have a not This just in ... I thik output is -1 form w();
void w(){
int a;
a = Serial1.read();
Serial.print(a);
delay(1000);
}
and I was try another code form other website but I don't remember where website of this code.
output is 8bit FFFFFFFF
You are a person of very few words - some extra comment would help.
I can't understand why you have created your w() function when you are supposed to be trying my code. Remove the w() function and try again.
And (as a separate issue) w is a very unhelpful name for a function. Using meaningful names for functions and variables makes code easier to understand and less likely to contain silly mistakes.