hi
i wanted to know how exactly handshaking signals (RTS and CTS) be included in the program.
we are using a wavecom modem that use AT commands.
we have also included MAX232 for ttl to rs232 conversion.
command to accept call is ATA. i wanted to know whether to trasmit ATA command as a string through Serial port(TXD) or transmit chatracters A,T,A separately or is there some other equivalent code that is being transmitted when using the hyperterminal
Thanks
Hey Iyer configure your serial port in NULL modem and you won't have to worry about any handshaking signals once you are done with it transmit your at commands serially character by character and don't forget to transmit "ENTER" after each command and try searching these forum threads a little there are lot of similar topics Best of luck
thanks for the help..
i'll try that out and will let you know
bye
how exactly to configure the serial port in NULL modem
No, a Null-modem cable is not what you require here:
A so-called "Null-modem" cable is what you need for connecting two DTEs together.
What you need, if you're not going to implement hardware flow control, is to loop-back the modem's CTS output to the modem's RTS input - see:
www.wavecom.com/.../viewtopic.php
"whether to trasmit ATA command as a string through Serial port(TXD) or transmit chatracters A,T,A separately"
The 8051's UART can only ever transmit a single character at a time - so a string will be transmitted as a sequence of separate characters!
Do not transmit the NUL that marks the end of the 'C' string!
"don't forget to transmit 'ENTER' after each command"
There's no such character as 'ENTER'.
AT commands need to be terminated with a Carraige-Return character - ASCII code 0x0D.
See my post titled "AT Command Termination Character" (21-Mar-2007 20:14) in this thread: http://www.keil.com/forum/docs/thread9483.asp
hi, if i am using handshaking signals in the program then where exactly to include them in the code.
exactly where they need to be handled!
The handshaking allows the modem to tell your 8051 when it can accept input and, conversely, allows your 8051 to tell the modem when it can accept input.
Therefore, you must observe the signals from the modem, and not send unless the modem is indicating that it's ready;
Similarly, you must ensure that your handshaking lines to the modem accurately tell it when you are and are not ready to accept input. You should allow for a little "overrun" before the moden recognises your change from "ready" to "not ready"
hi while using keil for IO directed to COM port, i have already used MODE and ASSIGN command for the COM port.
What are the registers (in and Out) to be used in ASSIGN command. i have attached the GSM modem(WAVECOM) to the COM port.
could u please give an example of any instruction to be used to transfer/receive data from COM port using keil.
Thanks.
"What are the registers (in and Out) to be used in ASSIGN command."
It's all in the Manual - see: http://www.keil.com/support/man/docs/uv3/uv3_cm_assign.htm
"please give an example of any instruction to be used to transfer/receive data from COM port using keil."
There aren't any!
The Simulator is simply using the PC's COM port to simulate the 8051's UART - so your program just uses the 8051 UART as usual.
As far as I know, you can't control the handshaking lines on the PC's COM port from the Simulator.
:-(
hi, i am not able to understand what u meant when u said tht Simulator is simply using the PC's COM port to simulate the 8051's UART - so your program just uses the 8051 UART as usual.
i jus want to knw tht suppose modem is connected to COM port, can i send AT commands using keil(ie IO directed towards COM port).
If yes, could u please tell me how to do it because no in and out registers r defined for COM port.
thanks
You do understand that Keil uVision is not for developing applications to run on the PC, don't you?
Keil tools are cross-development tools, used to develop applications that will run on embedded microcontroller systems; ie, software that will run on boards like these: http://www.keil.com/boards/
uVision provides a Simulator that allows you to run your embedded application in a simulation on the PC.
See: www.keil.com/.../uv3_sm_uartcommunication.htm
i have developed a program for blinking LED which is
i am not getting the syntax right here please manage to read through this
while(1) {
LED=~LED;//LED is sbit LED=P1.0 defined earlier// delay(); // delay is subroutine defined to be delay of .5 seconds have used timer1 for delay of 50ms then a for loop for 21 loop approx .5 seconds }
this works fine but this program doesn't
this is for blinking LED 5times then stop
for(k=1,k<=10;k++) { LED=~LED; delay(); }
note that there is no overall while loop in second case
will this effect the result when i am implementing in hardware not in keil
Please read the instructions on how to post source code - they are really quite clearly stated: www.danlhenry.com/.../keil_code.png
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...