nitish_R
Newbie level 4
- Joined
- Oct 23, 2013
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 149
Your schematic is incomplete, and from what I can tell, incorrectly wired up to the DB9 serial port connector. At minimum, you will need to have the TxD and RxD pins on the connector wired to your MAX232 chip, and likely CTS and RTS (though many modems use the DTR pin for switching between command and data mode - but if ou are just sending simple text msgs then you won't need that). And Ground,(Pin5) of course.
The modem will have a port that is configured as DCE (Data Communication Equipment), and your circuit board would have its pinout configuration as DTE (Data Terminal Equipment). So, Pin3 of DB9 connector should be your TxD (data OUT to modem) and Pin2 should be your RxD (data IN from modem). Likewise connect up the other signal pins as you need (RTS/CTS) or (DTR/DSR). Check the manual of the modem you choose to see how it can be configured for flow control - they usually support hardware and software (Xon/Xoff characters). you can reference this as a guide for your pinout on the connector.
**broken link removed**
Code C - [expand] 1 TL1=0xFd; //setup for 9600 baud
Code C - [expand] 1 2 EA = 1; ES = 1;
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void send_serial(unsigned char *s) { while(*s) sendByte(*s++); } void sendByte(unsigned char Byte){ SBUF = Byte; while(!TI); TI = 0; } // if attempt == 4 send_serial("AT\r\n"); delay(400); send_serial("AT+CMGF=1\r\n"); // 2 sec delay send_serial("AT+CMGS=\"09582703501\"\r\n"); // 1 sec delay delay(400); send_serial("Security Breach!\r"); // 100 ms delay sendByte(0x1A); sendByte(0x0D); // attempt = 0
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?