<h1>THE FORUM HAS MOVED,  VISIT US AT OUR NEW SITE www.picbasic.org. Access to this Archive is restricted. Visit the NEW site at www.picbasic.org.  Unless you use the url http://www.picbasic.org you will not gain access to the support forum, wiki and knowledge base. Visit WWW.PICBASIC.ORG  Do not try to log in or register here, use your keyboard and enter the url http://www.picbasic.org directly into your browser. </h1>  

Go Back  

THE FORUM HAS MOVED, VISIT US AT OUR NEW SITE www.picbasic.org. Access to this Archive is restricted. Visit the NEW site at www.picbasic.org. Unless you use the url http://www.picbasic.org you will not gain access to the support forum, wiki and knowledge base. Visit WWW.PICBASIC.ORG Do not try to log in or register here, use your keyboard and enter the url http://www.picbasic.org directly into your browser.

> Proton Development Suite > Proton Plus Compiler v3

Proton Plus Compiler v3 Coding problems and general discussion related to the Development Suite

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 26th November 2009, 06:51   #1
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default 16F877 USAR & no standard MSCOMM VB6 speed

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
wirecut is offline   Reply With Quote
Old 26th November 2009, 17:50   #2
C_Moore
Licensed User
 
Join Date: Sep 2004
Location: WY USA
Posts: 1,290
C_Moore is on a distinguished road
Default

Hi wirecut,

Can you give a example of what you are talking about?
C_Moore is offline   Reply With Quote
Old 27th November 2009, 22:37   #3
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

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
wirecut is offline   Reply With Quote
Old 29th November 2009, 00:47   #4
Maverick
Super Moderator
 
Maverick's Avatar
 
Join Date: Sep 2002
Location: St Elswhere
Posts: 2,166
Maverick is on a distinguished road
Default

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
Maverick is offline   Reply With Quote
Old 29th November 2009, 06:18   #5
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

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
wirecut is offline   Reply With Quote
Old 29th November 2009, 09:35   #6
wastrix
Licensed User
 
Join Date: May 2008
Location: Sydney, Australia
Posts: 1,453
wastrix is on a distinguished road
Default

Quote:
Originally Posted by wirecut View Post
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
Where does it say that? All I could see is that that is the maximum set speed, but directly below that it said you can use different baud rates if you want.
wastrix is offline   Reply With Quote
Old 29th November 2009, 10:55   #7
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

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
wirecut is offline   Reply With Quote
Old 29th November 2009, 12:30   #8
C_Moore
Licensed User
 
Join Date: Sep 2004
Location: WY USA
Posts: 1,290
C_Moore is on a distinguished road
Default

From what I see in the MSDN help for VB6 it goes up to 256000
C_Moore is offline   Reply With Quote
Old 29th November 2009, 13:19   #9
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

hi Charlie,

please give to me the link of the related info on MSDN.

Ciao

Leo
wirecut is offline   Reply With Quote
Old 29th November 2009, 13:28   #10
C_Moore
Licensed User
 
Join Date: Sep 2004
Location: WY USA
Posts: 1,290
C_Moore is on a distinguished road
Default

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.
C_Moore is offline   Reply With Quote
Old 29th November 2009, 13:35   #11
C_Moore
Licensed User
 
Join Date: Sep 2004
Location: WY USA
Posts: 1,290
C_Moore is on a distinguished road
Default

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
C_Moore is offline   Reply With Quote
Old 29th November 2009, 18:34   #12
Richard
Licensed User
 
Richard's Avatar
 
Join Date: Feb 2002
Location: Sheffield
Posts: 877
Richard is on a distinguished road
Default

Quote:
but the VB6 have the maximum speed of 115.200 bps.
If you're using a standard PC's serial port you will not get above 115200 baud. I hit the same problem and had to get a PCMCIA serial card which will go to 921600.
Richard is offline   Reply With Quote
Old 29th November 2009, 19:00   #13
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

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"
and the compilation goes without error, but when I run the program, sending something to the serial port (Com:7) this message appear:
Code:
Run time error '8018'
Operation valid only when the port is open,
and pushing debug button, is show the statement in error:
Code:
MSComm1.Output = Chr$(1) & Chr$(19) & Chr$(255) & Chr$(0) & Chr$(0)
but consider if I set this set up
Code:
MSComm1.Settings = "115200,n,8,1"
all work perfectly.

Ciao

Leo

P.S. Strange that in the help of MSDN the speed of 115200 in not mentioned.
wirecut is offline   Reply With Quote
Old 30th November 2009, 10:06   #14
TEEGEE
Licensed User
 
Join Date: Nov 2008
Location: Nantes France
Posts: 55
TEEGEE is on a distinguished road
Talking mscomm seting 256000 baud !

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.
TEEGEE is offline   Reply With Quote
Old 5th December 2009, 00:02   #15
wirecut
Licensed User
 
wirecut's Avatar
 
Join Date: May 2008
Location: Milano - Italy
Posts: 160
wirecut is on a distinguished road
Default

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"
I have uncommente every setup and you can see the result for every trial.

Are you using VB6 with SP6.

What do you think about?

Ciao

Leo
wirecut is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


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


All times are GMT +1. The time now is 22:00.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright © Crownhill Associates Limited 2002 - 2009