modedefs.bas is included but still doesn't work...
i also tried :
1. inverted TTL N300 to N2400
2. change Define Char_pacing 1000 to 10000
however it still not working...
modedefs.bas is included but still doesn't work...
i also tried :
1. inverted TTL N300 to N2400
2. change Define Char_pacing 1000 to 10000
however it still not working...
Hi,
What is the clock frequency and what do you use as the clock source? For serial communication to be reliable you really should use a X-tal. What baudrate did you set Hyperterminal to when testing the modem? 300baud?
/Henrik Olsson.
I use 4MHz resonator. i did use the same type of resonator before when i did a serial comm project between 2 remote PIC 16F84 at 1200baud.
In Hyperterminal, i tried 300 baud, 1200 baud and 2400 baud. All working fine. The only difference i noticed with this baud rates is the speed and it is obvious when i type AT&V.
A modem should detect the baud rate automatical isn't ?
mychangl
Hi,
Generally you should be fine with the resonator. Are you sure that the PIC is running? Blink a LED a few times at the beginning of the program to make sure. And if you can, try with a X-tal just to be sure.
You do have the PIC's ground and the modems ground connected don't you? The modem ground should be on PIN 5 in the DB9 but you didn't mention that in your original post.
I have no knowledge of AT commands so I can't help with that but assuming it's correct have you tried:
Also, is it possible that the modem needs a linefeed and/or carrage return at the end of the command?Code:SerOut Tx,t300,["ATH1"] ' Off Hook ATH1
/Henrik Olsson.
the LED is blinking. i even put LED to monitor the serial output, it is flickering. Modem ground is connected to PIC gnd.
neither
SerOut Tx,t300,["ATH1"]
SerOut Tx,t300,["ATH0"]
SerOut Tx,t1200,["ATH1"]
SerOut Tx,t2400,["ATH1"]
SerOut Tx,t9600,["ATH1"]
work, i not sure about line feed or carriage.There is no information about linefeed and carriage found in any modem articles, even hyperterminal doue not require that..
Anyway, let me try
Something to try - see if you can get your pic to talk to hyperterminal (using your max232 setup as is). This might help you determine if the problem is closer to the PIC side or closer to the modem side.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Thanks guys. i got the code....
it should has carriage return ( 13 ) after the command.
SerOut Tx,t9600,[65,84,72,49] ' Off Hook ATH1'
SerOut Tx,t9600,[13]
now i am looking into more functions eg connect to other modem...
Thx a lot !
Cheeeeers
Bookmarks