Itis problem of program.
Yep, found that earlier today too.
- Why do you raise DTR? The LM058 does not have DSR/DTR lines, only uses RTS/CTS lines. Having said that, it probably doesn't make a difference.
- Make sure the PC com port is working correctly. Connect pin 2 to 3 and in Hyperterminal clear checkbox 'Echo typed characters locally' in 'ASCII Setup...' then ensure anything typed in HT is echoed back. Break your loopback to see that it no longer echos.
- How are you powering your LM058? If you are using the USB port, make sure it is a high power one as some laptops have a feeble current sinking ability and may not be able to drive the LM058 effectively.
- Make sure the DCE/DTE switch is in the correct position.
- The LM058 will have to be set to your desired baud rate by entering command mode and sending "L1". Hyperterminal can auto syncronise so that may explain why you can send data from the PDA but not to the PDA.
I still think that because there is no activity on the LM058 'data' LED that your problem is other than the OnComm event. If you think that it is not firing for some reason, just send some data (it will be buffered by Basic4PPC) then run the OnComm Sub by a button click.
Hello Zenerdiode!!
Tonight I was working with the pda. I tried to receive data from LM58. I connected the LM58 to COM2 and controlled it by Hypeterminal. I used pocket putty to control the COM6 (bluetooth COM of the pda) to control the pocket pc. With this configuration in pocket putty:
BaudRate=19200 (as same as LM58)
Flow Control=Xon/Xoff
Non parity bit
8 bits data
2 bits Stop
I could receive data from LM58. Every characters I wrote in hyperterminal, they appeared in pocket putty terminal. So it isn't problem of LM58, it send data correctly.
Part of my program is this:
Sub App_Start
Form1.Show
serial.New2 (6,19200,"N",8,2)
serial.XonXoffHandshaking=True
Phone.New1("Form2")
Sms.New2
Intercept.New1
End Sub
Sub OpenPort_Click
If porttrabajo = 0 Then
serial.EnableOnComm=True
serial.PortOpen=True
portflag = 1
End If
End Sub
Sub ClosePort_Click
If porttrabajo = 1 Then
serial.EnableOnComm=False
serial.PortOpen=False
portflag = 0
End If
End Sub
Sub serial_OnCom
TextBox1.Text=TextBox1.Text & serial.InputString
End Sub
I don't know where is the error in the program
I don't know why I can't receive data with basic4ppc.
Thanks for all!
Regards!!!