Mithun_K_Das
Advanced Member level 3
- Joined
- Apr 24, 2010
- Messages
- 899
- Helped
- 24
- Reputation
- 48
- Reaction score
- 26
- Trophy points
- 1,318
- Location
- Dhaka, Bangladesh, Bangladesh
- Activity points
- 8,254
HI, I was working with GSM module "MOD9001". I tried with PC and my PIC board. The modem is working very fine with my PC at BR:115200; also the circuit I designed is working good with PC @ BR115200; But the modem is not working with circuit.
I can't find the fault here. Can you help me?
here is the code I'm trying...
I can't find the fault here. Can you help me?
here is the code I'm trying...
Code:
/******************************************************************************
Program for VTS_with_GSM
Program written by Engr. Mithun K. Das
Email: mithun060@gmail.com
MCU: PIC16F877A; X_Tal: 8MHz(external)
Date: 23/11/2013;
******************************************************************************/
// LCD module connections
sbit LCD_RS at RB7_bit;
sbit LCD_EN at RB6_bit;
sbit LCD_D4 at RB5_bit;
sbit LCD_D5 at RB4_bit;
sbit LCD_D6 at RB3_bit;
sbit LCD_D7 at RB2_bit;
sbit LCD_RS_Direction at TRISB7_bit;
sbit LCD_EN_Direction at TRISB6_bit;
sbit LCD_D4_Direction at TRISB5_bit;
sbit LCD_D5_Direction at TRISB4_bit;
sbit LCD_D6_Direction at TRISB3_bit;
sbit LCD_D7_Direction at TRISB2_bit;
// End LCD module connections
unsigned char uart_rd; // read the received data,
void UART()
{
uart1_write_text("AT");
UART1_Write(13);
UART1_Write(10);
delay_ms(100);
uart_rd = UART1_Read(); // read the received data,
Lcd_Out(2,1,uart_rd);// and send data via UART
//uart1_write_text("AT+CMGF=1");
uart1_write_text("ATD01722448270;");
UART1_Write(13);
UART1_Write(10);
delay_ms(20000);
uart1_write_text("AT+CMGF=1");
UART1_Write(13);
UART1_Write(10);
delay_ms(5000);
UART1_Write_text("AT+CMGS=\"01722448270\"");
UART1_Write(13);
UART1_Write(10);
delay_ms(5000);
UART1_Write_Text("Testing123");
UART1_Write(0x1A);// enter Ctrl+Z
UART1_Write(13);
UART1_Write(10);
delay_ms(5000);
}
void main()
{
Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Delay_ms(1000);
uart1_init(115200);
delay_ms(5000);
while(1)
{
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,1,"AT");
Delay_ms(1000);
UART(); //Call function
Delay_ms(3000);
Lcd_Cmd(_LCD_CLEAR);
}//while
}//void