I connected an Arduino Mega2560 to a SIM800C module. when I program the Mega with a blank sketch, SIM800 module is responding to at commands using serial monitor (via pins 0,1). But when I connect it to other serial ports like serial1 the at commands was sent to SIM800 and it recieve and work (i sent some sms to my mobile no and recieved) but the response has some invalid characters. for example when i send AT, its response in hex format is like as bellow: 505548A848F80 (the string equivalent: PUH¨Hø)
I connected Sim800 TXD to Mega RX2 and Sim800 RXD to Mega TX2 and GND to GND.
but Also I found that there is about 1.8V on mega rx2, rx3, rx1 and tx1, tx3 pin when those are offline. just the tx2 pin is 5V.
may be there is a problem?
I disconnected the mega completely and found that there is about 2V voltage on about all I/O pins?!!!
Could anybody guess where is the problem.
The question is that if the board has a problem why arduino IDE can detect and program the board without any problem?
After a Serialx.begin(), the RX and TX pins of the Mega should idle HIGH.
I disconnected the mega completely and found that there is about 2V voltage on about all I/O pins?!!!
Could anybody guess where is the problem.
You are probably measuring floating pins.
I connected Sim800 TXD to Mega RX2 and Sim800 RXD to Mega TX2 and GND to GND.
The Sim800 is 3.3v. Are you using level shifters or a voltage divider, or is the module on some sort of shield/board which can interface directly with the 5v TTL serial of the Mega?
I Found that SIM800C UART2 is working. may be there is a problem with UART1. But for my knowledge:
cattledog:
After a Serialx.begin(), the RX and TX pins of the Mega should idle HIGH.
The Tx pin is high but Rx is about 1V floating and 2.8V connected to SIM800 TXD pin.
cattledog:
You are probably measuring floating pins.
I think that floating pin voltage should be 0V. is this true?
cattledog:
The Sim800 is 3.3v. Are you using level shifters or a voltage divider, or is the module on some sort of shield/board which can interface directly with the 5v TTL serial of the Mega?
I devided SIM800 RX pin by 1K and 2.2K(to GND). but GSM TX pin is directly connected to Mega Rx directly.
The Tx pin is high but Rx is about 1V floating and 2.8V connected to SIM800 TXD pin.
The 2.8v is not high enough to guarantee a HIGH reading by the Mega. The spec for a guaranteed HIGH is .6 Vcc.(3v) Try adding an external pullup to 3.3v on this line? If this doesn't work you really should use a bidirectional level shifter.
I devided SIM800 RX pin by 1K and 2.2K(to GND). but GSM TX pin is directly connected to Mega Rx directly.
This is correct.
I think that floating pin voltage should be 0V. is this true?
No, a floating pin is undefined and can read any value which often moves around.