can i connect p0.0 and p0.1 of mcb2140 to modem's Rx and Tx or should i use serial ports com 0 and com1 of mcb2140 and give its output to max232.
gsm modem is of simcom and i find that it has an in built max232
The GSM modem having max232 converter,
Connect Tx(P0.0) pin of MCB2140 to Rxd pin of GSM and
Connect Rx(P0.1) pin of MCB2140 to Txd pin of GSM.
Use the these commands for sending msg
UART_transmit("AT");
UART_transmit("AT+CMGF=1");
UART_transmit("MOBILEnum");
data to sent
UART_transmit(0x1A); //for termination
can i connect p0.0 and p0.1 of mcb2140 to modem's Rx and Tx or should i use serial ports com 0 and com1 of mcb2140 and give its output to max232.
gsm modem is of simcom and i find that it has an in built max232
MCB2140 has dusl RS232 porst. If your SIM900 modem has RS232 port then directly interface both using a RS232 cable to the DB9 connectors. If SIM900 has TTL 5V or 3.3V type which match with TTL pins of Dev board then you can interface using TTL pins but you need to have access to Rx and Tx TTL pins of MCU on the Dev board.
I saw the board. It has header out for P0 and P1. They are TTL pins and it seems that they are 3.3V type. So, you can't connect SIM900 RS232 pins to them directly. Also are you sure P0.0 and P0.1 are UART lines of the MCU on Dev board ? I haven't checked the schematics in detail. If they are not UART pins then it is of no use if you connect 3.3V TTL pins of SIM900 if any to P0.0 and P0.1.
Edit:
I checked the schematics and indeed it is a 3.3V TTL device which is on dev board and also P0.0 and P0.1 are UART pins and they are connected to DB9 connectors through MAX232. You can interface SIM900's RS232 DB9 connector to dev boards RS232 P2 DB9 connector.
Provide link for SIM900 modem board which you have. Just to check if it has TTL or RS232 ports.
sir my project is overheating alert in remote areas using gsm. i have wriiten the code for it. but dont know where is the error. i am posting the code please help us
I have never used LPC MCUs. I have modified your code. Please check if it works. I can't tell anything about your core UART code.
You need a 12V 2A adapter because SIM900 draws 1 to 1.5A while sending SMS. Connect SIM900A to dev board using RS232 DB9 connectors. Use a serial cable.
Sir i tried the code given by u but still i was not able to get the output.i checked the modem through hyperterminal and was able to send messages successfully. Can u help us to figure the problem
What sensor are you using ? PT100 ? Change if(x > 300.0) to if (x) and see. Maybe you are getting x < 300. If you are using LM35 then your calculation is wrong.
If LM35 is used you get 1.5V for 150 degree C. If your MCU works at 3.3V then you get 1023 for 3.3V adc input.
In code you are using UART1 and not UART0. So, use COM1 DB9 Connector to connect to SIM900's DB9 connector.