![]() |
|
|||||||
| Proton Plus Compiler v3 Coding problems and general discussion related to the Development Suite |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi,
on the 16F877 there are a lot of different speed, more very high, but unfortunatelly unsupported by the VB6 MSCOMM. There are any other way to use the non standard speed instead of the use of the API. Ciao Leo |
|
|
|
|
|
#2 |
|
Licensed User
![]() Join Date: Sep 2004
Location: WY USA
Posts: 1,290
![]() |
Hi wirecut,
Can you give a example of what you are talking about? |
|
|
|
|
|
#3 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi
if we would use 250.000 bps, the USART on the PIC can transmit/receive at this speed, but the VB6 have the maximum speed of 115.200 bps. Ciao Leo |
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Sep 2002
Location: St Elswhere
Posts: 2,166
![]() |
I was using WSC32.DLL (google WSC4VB) it was a while back but i am sure it supported 250,000 baud.
It might be worth considering swapping over to USB
__________________
There are 10 types of people in the world Those who understand binary And those who don`t
|
|
|
|
|
|
#5 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi Maverick,
thanks for the suggestion, but as you can see in the link, the maximum speed supported is 115.200 bps. http://www.marshallsoft.com/wsc_ref.htm In the near future will go USB, but now I need to overcome the barrier of 115,200 set by MSCOMM. Ciao Leo |
|
|
|
|
|
#6 | |
|
Licensed User
![]() Join Date: May 2008
Location: Sydney, Australia
Posts: 1,453
![]() |
Quote:
|
|
|
|
|
|
|
#7 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi,
on the data sheet of the 16F877 (page 96 DS30292C) there are mentioned the fantastic speed of 1.250 kbaud or the lesser 1000, 625, 312, 250, 230, 156 kbaud. All of this speed cannot be used by the VB6 due the MSCOMM limitatio to the maximum speed of 115.200 Ciao Leo |
|
|
|
|
|
#8 |
|
Licensed User
![]() Join Date: Sep 2004
Location: WY USA
Posts: 1,290
![]() |
From what I see in the MSDN help for VB6 it goes up to 256000
|
|
|
|
|
|
#9 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
hi Charlie,
please give to me the link of the related info on MSDN. Ciao Leo |
|
|
|
|
|
#10 |
|
Licensed User
![]() Join Date: Sep 2004
Location: WY USA
Posts: 1,290
![]() |
I would if I could.I have MSDN for VB6 installed.I will try to copy the section and paste it in a forum post.
|
|
|
|
|
|
#11 |
|
Licensed User
![]() Join Date: Sep 2004
Location: WY USA
Posts: 1,290
![]() |
OK here is a section from the help.
Take a look at the baud settings. Code:
Sets and returns the baud rate, parity, data bit, and stop bit parameters. Syntax object.Settings [ = value ] The Settings property syntax has these parts: Part Description object Anobject expression that evaluates to an object in the Applies To list. value Anstring expression representing the communications port settings, as described below. Remarks If value is not valid when the port is opened, the MSComm control generates error 380 (Invalid property value). Value is composed of four settings and has the following format: "BBBB,P,D,S" Where BBBB is the baud rate, P is the parity, D is the number of data bits, and S is the number of stop bits. The default value of value is: "9600,N,8,1" The following table lists the valid baud rates. Setting 110 300 600 1200 2400 9600 (Default) 14400 19200 28800 38400 56000 128000 256000 The following table describes the valid parity values. Setting Description E Even M Mark N (Default) None O Odd S Space The following table lists the valid data bit values. Setting 4 5 6 7 8 (Default) The following table lists the valid stop bit values. Setting 1 (Default) 1.5 2 Data Type String |
|
|
|
|
|
#12 | |
|
Licensed User
![]() Join Date: Feb 2002
Location: Sheffield
Posts: 877
![]() |
Quote:
|
|
|
|
|
|
|
#13 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi Richard
I have installed one add on PCI card that have four serial port and the maximum speed show on the instruction is 921000. Hi C_Moore, I have tried this setup: Code:
MSComm1.Settings = "256000,n,8,1" Code:
Run time error '8018' Operation valid only when the port is open, Code:
MSComm1.Output = Chr$(1) & Chr$(19) & Chr$(255) & Chr$(0) & Chr$(0) Code:
MSComm1.Settings = "115200,n,8,1" Ciao Leo P.S. Strange that in the help of MSDN the speed of 115200 in not mentioned. |
|
|
|
|
|
#14 |
|
Licensed User
![]() Join Date: Nov 2008
Location: Nantes France
Posts: 55
![]() |
http://www.8051projects.net/e107_fil...2138_vbcom.pdf
exp : Private Sub MSComm1_OnComm() MSComm1.Settings = "256000,8,n,1" End Sub work whis USB>serial interface Last edited by TEEGEE; 30th November 2009 at 10:08. |
|
|
|
|
|
#15 |
|
Licensed User
![]() Join Date: May 2008
Location: Milano - Italy
Posts: 160
![]() |
Hi TEEGEE,
many thanks for you suggestion. I have read doc at the link, but following the instruction (is show an old version; is for VB5) my problem remain unresolved. I'm using VB6 with SP6 and I use the following statement: Code:
Private Sub Form_Load() On Error Resume Next MSComm1.CommPort = 7 ' MSComm1.Settings = "19200,n,8,1" ' OK ' MSComm1.Settings = "115200,n,8,1" ' OK ' MSComm1.Settings = "128000,n,8,1" ' no message ' MSComm1.Settings = "250000,n,8,1" ' no message ' MSComm1.Settings = "256000,n,8,1" ' no message MSComm1.PortOpen = True MSComm1.Output = "test message" Are you using VB6 with SP6. What do you think about? Ciao Leo |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| code problem | Seafurymike | Proton Plus Compiler v3 | 10 | 17th February 2008 09:36 |
| VB6 mscomm input. | GregZ | Proton Plus Compiler v3 | 21 | 19th October 2006 07:53 |
| SONYOUT & RC5OUT | Roshan | Product Feedback & Wish List | 6 | 13th November 2005 10:05 |
| DC motor speed encoder using 18f458 TMR1 asynchronous counter | donomark | Proton Plus v2.1.5.3 General Discussion | 0 | 29th February 2004 11:31 |