Author |
Topic |
|
steve
28 Posts |
Posted - 17 Apr 2003 : 15:45:28
|
Hi, I'm trying to use COM2 for TTL, and I don't think I have it set up right, because it's not functioning. Can you verify that these are the right registry settings for a Bitsy+. I've also tried "IRSerialPort"=dword:0 Thanks. -Steve
;--------------------------------------------------------------------- ; COM2 ; Disable COM2(0) if JP7 jumpers are unconnected ; Set IR keys to 1 if JP7 jumpers are configured for IrDA ;--------------------------------------------------------------------- ;[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2] ; "INT_Disable"=dword:0
;[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IrDA] "IRSerialPort"=dword:1
;--------------------------------------------------------------------- ; IrDA ; Set IR keys to 1 if JP7 jumpers are configured for IrDA ; ; TxDelayDisable and TxOnly keys are available in ; ADS CE builds 2.21 and later. These keys are useful ; for IrDA transmit-only applications. ;--------------------------------------------------------------------- [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IrDA] "IRSerialPort"=dword:0 ; 1=Serial2 is IrDA (logic polarity ; and pulse width is different) "TxDelayDisable"=dword:1 ; 0=delay 10ms between end of transmit and ; turning on receiver (IrDA is half duplex) ; To use ActiveSync, this key should be 1 "TxOnly"=dword:0 ; 1=disable IrDA receiver
|
|
steve
28 Posts |
Posted - 17 Apr 2003 : 16:01:16
|
Just as an added note: The problem manifests itself as a message box in eVB 3 saying that the port is unavailable. Also, I've tried various combinations of uncommenting out [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2] and the line below it. The file is shown here as it was given to me by ADS. Thanks.
|
Edited by - steve on 17 Apr 2003 16:02:42 |
|
|
akidder
1519 Posts |
Posted - 17 Apr 2003 : 16:23:52
|
It sounds like something might be using the serial port already. Have you tried using the ComTest/ComTerm application posted at topic 256? That would filter out application or language issues that might be going on.
Just to make sure the registry entries aren't the issue, you might try using the following settings. Our initial releases of the REG files for Bitsy Plus configured the port for IrDA. These updated settings correct some of the comments in the original files and are easier to follow.
;--------------------------------------------------------------------- ; Serial 2 and IrDA ; ; Enable IR if personality board uses Serial 2 for IrDA. Logic polarity ; and pulse width are different for IrDA than for EIA/TIA-232. ; ; TxDelayDisable and TxOnly keys are useful for IrDA transmit-only ; applications. ;--------------------------------------------------------------------- [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial2] "INT_Disable"=dword:0 ; 0=normal Serial 2 operation ; 1=disable Serial 2
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IrDA] "IRSerialPort"=dword:0 ; 1=Serial2 is IrDA "TxDelayDisable"=dword:1 ; 0=delay 10ms between end of transmit and ; turning on receiver (IrDA is half duplex) ; 1=no delay (use this for ActiveSync) "TxOnly"=dword:0 ; 1=IrDA is transmit-only ; (disables IrDA receiver)
|
|
|
steve
28 Posts |
Posted - 21 Apr 2003 : 11:42:56
|
Well, I have trouble running any of the touch screen programs because I'm not using a touch screen on my system. I have this test program, which is very simple in just opening the port, which I've used in the past. It fails with the "port unavailable" error dialog box. I'm not sure at this point if it's a hardware config problem, or just a dumb programming mistake on my part. I had done successful comm programming with the Bitsy a couple months ago, so I'm not sure what I could have made a mistake on now. Thanks guys, -Patrick
Private Sub Form_Load() Comm1.CommPort = 2 Comm1.Settings = "128000, N, 8, 1" Comm1.Handshaking = comNone Comm1.PortOpen = True MsgBox "Opened" End Sub
|
|
|
akidder
1519 Posts |
Posted - 21 Apr 2003 : 12:02:07
|
Thanks Patrick. The problem might be the baud rate. CE supports up to 115200 baud. You might try that or one of the other standard baud rates first (like 9600, 19200 or 57600). |
|
|
steve
28 Posts |
Posted - 21 Apr 2003 : 13:12:03
|
I hope Chris would confirm the fact that for the Comm1.Settings, the speed 115200 is represented by the string 128000. Presumably because of differences in metric prefixes, or baudrate vs bps. Either way, when I switched 57600, it worked. I had actually tried that earlier this morning, but had fat fingered the speed to 576000 which truly is outside the range of the Bitsy. I'm just glad it's working. Thanks. -Patrick
|
|
|
ctacke
877 Posts |
Posted - 21 Apr 2003 : 14:05:45
|
CBR_115200 and CBR_128000 are two separate CE defined speed values (from winbase.h), so I don't believe that 115200 and 128000 are the same.
|
|
|
steve
28 Posts |
Posted - 21 Apr 2003 : 16:56:23
|
Really? I know that they don't list 115200 in the eVB help file, not that it is ever a handy reference. I know talking to my Linux board, which is running at 115, I have used the Bitsy at 128. I never really gave it any more thought, other then what I said above about conversion issues. Ooops. -Patrick
|
|
|
ctacke
877 Posts |
Posted - 22 Apr 2003 : 08:29:12
|
Yep. Take a look in Help under SetCommState. THat takes a DBC struct, which contains the baud rate. You'll see both options listed. We've successfully tested up to 115200. |
|
|
|
Topic |
|