CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Capturing ECHO and OK of a modem in AT commands

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

Capturing ECHO and OK of a modem in AT commands
PostPosted: Thu Aug 04, 2005 8:30 pm     Reply with quote

I have this small application for a modem and micro, now what I encountered is that in hyperterminal when I type AT<CR>, hyperterminal echoes back, AT<CR> and OK. When I give ATS0=1<CR>, hyperterminal echoes back ATS0=1<CR> and OK. And you can see also that the modem accepted the said command because the LED in modem showing AA (Auto Answer) turns on.

Now, if the modem is connected to the PIC micro, and I excute the same commands, the modem reacts the same way, shows that it can receive the command by turning the AA led ON, but my problem is that I cannot see in the LCD the OK reply nor the command I gave, AT<CR> and ATS0=1<CR>.

Thanks.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 05, 2005 6:15 am     Reply with quote

Did ya print them to the LCD as well? Sending them out the serial port doesn't print them to the LCD also. That would be a separate printf.
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

PostPosted: Fri Aug 05, 2005 8:43 am     Reply with quote

Yes, I print it to LCD using this command, printf(lcd_putc,"");
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 05, 2005 8:45 am     Reply with quote

Well if you can print data to the LCD and this works okay then you should be able to print the command to the LCD as well.

As far as the response, you are going to have to receive that data and then print it to the LCD
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

PostPosted: Fri Aug 05, 2005 8:54 am     Reply with quote

Hi,

I used the printf....., but there is no any text that was printed, and I know my format is correct.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 05, 2005 10:34 am     Reply with quote

post a code snippet showing this
glenjoy



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

PostPosted: Fri Aug 05, 2005 10:50 am     Reply with quote

I got now the echo in display, my problem now is capturing the OK reply from the modem.

When I execute AT<CR>, I can now echo them on the LCD, now after the <CR>, the modem will respond with OK, I cannot get the OK. But the modem responds that the command reached it.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 05, 2005 11:08 am     Reply with quote

Mark wrote:
post a code snippet showing this
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group