Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development


Reply
 
Share Thread Tools Display Modes
Old 01-10-2005, 03:53 AM   #1
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
mscomm32 help.

I'm working on my VFD7000 software (www.hnetinc.com under software). I'v found out that mscomm32 for some reason wont let me send more than 15 ascii letters or numbers at once and I need to be able to send more than that. For the test I'm sending data with it like this.

vfdCom.Output = "1234567890abcdefghij"

Comm settings are:
38400,n,8,1

Thanks for the help in advance.
hcker2000 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 01-10-2005, 05:30 AM   #2
Phone Control Moderator
 
zorro's Avatar
 
Join Date: Mar 2004
Location: Munich, Germany
Posts: 1,902
zorro is on a distinguished road
Usually you set the .OutputBufferSize property of the control.
Since the default setting of MSCOMM is 512 bytes, it could be that your receiving device doesn't support more then 15 characters at once. You may check that.
This also could be a handshaking issue.
__________________
Skinning to go... VisualDesigner2!
zorro is offline   Reply With Quote
Old 01-10-2005, 09:04 PM   #3
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
I doubble checked to make sure that the vfd can handle that much data and it can handle 20 with no problem. I'v also tryed changing the outputbuffer to 1024 but that dosnt help eather. I also checked into the handshaking by using hyperterminal to send 20 chars and made sure to remember the handshaking it used. I then made sure and set my comm32 controler to the same thing and it still dosnt want to work.
hcker2000 is offline   Reply With Quote
Old 01-11-2005, 02:43 AM   #4
Phone Control Moderator
 
zorro's Avatar
 
Join Date: Mar 2004
Location: Munich, Germany
Posts: 1,902
zorro is on a distinguished road
Can you explain what exactely happens after the 15th char?
__________________
Skinning to go... VisualDesigner2!
zorro is offline   Reply With Quote
Old 01-11-2005, 05:05 AM   #5
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Well in the small test it just sends 15 then nothing is displayed on the vfd. If I run my software and set it to display a winamp song name for example it will display all 20 chars but the last 5 seem to be random letters. I'v surched around but couldent find much.
hcker2000 is offline   Reply With Quote
Old 01-11-2005, 05:12 AM   #6
Phone Control Moderator
 
zorro's Avatar
 
Join Date: Mar 2004
Location: Munich, Germany
Posts: 1,902
zorro is on a distinguished road
I can hardly believe that this is because of the MSComm control.

Go to http://www.sysinternals.com and download the "Port Monitor". It's a free tool and you can trace everything that is outgoing and incoming from or to a COM port.
__________________
Skinning to go... VisualDesigner2!
zorro is offline   Reply With Quote
Old 01-11-2005, 05:33 AM   #7
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Thanks this should help figure out what is going on with it. I can't realy think of what else it coulabe considering I'v sent the data as simply as I can and I get the same basic result. I guess this will help see whats going on. Of corse I will have to wate to get home from work before I can test it out.

Last edited by hcker2000; 01-11-2005 at 05:42 AM.
hcker2000 is offline   Reply With Quote
Old 01-11-2005, 08:19 PM   #8
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Here is the log file. As you can see there is a difference in the way hyperterminal and my software sends the data to the port. I'm not sure why it is making any difference though. Coulden't find the attatch file button so here is the text.

2 0.00742224 hypertrm.exe IRP_MJ_CREATE VCP0 SUCCESS Options: Open
3 0.00001386 hypertrm.exe IOCTL_SERIAL_SET_QUEUE_SIZE VCP0 SUCCESS InSize: 8192 OutSize: 8192
4 0.00000248 hypertrm.exe IOCTL_SERIAL_CONFIG_SIZE VCP0 SUCCESS Size: 0
5 0.00000148 hypertrm.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
6 0.00000165 hypertrm.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
7 0.00000146 hypertrm.exe IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
8 0.00000130 hypertrm.exe IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
9 0.00000138 hypertrm.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
10 0.00000129 hypertrm.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
11 0.00000129 hypertrm.exe IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
12 0.00000128 hypertrm.exe IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
13 0.00066370 hypertrm.exe IOCTL_SERIAL_SET_BAUD_RATE VCP0 SUCCESS Rate: 38400
14 0.00097487 hypertrm.exe IOCTL_SERIAL_SET_DTR VCP0 SUCCESS
15 0.00097406 hypertrm.exe IOCTL_SERIAL_SET_LINE_CONTROL VCP0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
16 0.00000144 hypertrm.exe IOCTL_SERIAL_SET_CHAR VCP0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
17 0.00195148 hypertrm.exe IOCTL_SERIAL_SET_HANDFLOW VCP0 SUCCESS Shake:80000009 Replace:80000080 XonLimit:80 XoffLimit:200
18 0.00000159 hypertrm.exe IOCTL_SERIAL_SET_TIMEOUTS VCP0 SUCCESS RI:10 RM:0 RC:0 WM:0 WC:5000
19 0.00094416 hypertrm.exe IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RLSD ERR
20 62.97265914 hypertrm.exe IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
21 62.97272452 hypertrm.exe IRP_MJ_READ VCP0 CANCELLED Length 80
22 0.00074096 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 1
23 0.00000726 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
24 0.00094864 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 2
25 0.00000311 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
26 0.00095499 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 3
27 0.00000316 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
28 0.00095872 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 4
29 0.00000266 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
30 0.00095842 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 5
31 0.00000277 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
32 0.00095796 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 6
33 0.00000263 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
34 0.00095954 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 7
35 0.00000302 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
36 0.00095887 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 8
37 0.00000288 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
38 0.00095776 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 9
39 0.00000279 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
40 0.00095845 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 0
41 0.00000257 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
42 0.00095883 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 1
43 0.00000296 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
44 0.00095871 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 2
45 0.00000251 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
46 0.00095790 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 3
47 0.00000304 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
48 0.00095868 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 4
49 0.00000265 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
50 0.00096030 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 5
51 0.00000271 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
52 0.00147317 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 6
53 0.00000275 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
54 0.00072735 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 7
55 0.00000434 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
56 0.00099269 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 8
57 0.00000295 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
58 0.00087606 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 9
59 0.00000455 hypertrm.exe IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
60 0.00095860 hypertrm.exe IRP_MJ_WRITE VCP0 SUCCESS Length 1: 0
61 0.00057133 hypertrm.exe IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RLSD ERR
62 0.00000922 hypertrm.exe IOCTL_SERIAL_PURGE VCP0 SUCCESS Purge: TXABORT RXABORT
63 0.00000810 hypertrm.exe IRP_MJ_CLEANUP VCP0 SUCCESS
64 0.11017314 hypertrm.exe IRP_MJ_CLOSE VCP0 SUCCESS
65 0.00791635 VB6.EXE IRP_MJ_CREATE VCP0 SUCCESS Options: Open
66 0.00088282 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
67 0.00000169 VB6.EXE IOCTL_SERIAL_SET_QUEUE_SIZE VCP0 SUCCESS InSize: 1024 OutSize: 512
68 0.00000712 VB6.EXE IOCTL_SERIAL_PURGE VCP0 SUCCESS Purge: TXABORT RXABORT TXCLEAR RXCLEAR
69 0.00000161 VB6.EXE IOCTL_SERIAL_SET_TIMEOUTS VCP0 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:5000
70 0.00000193 VB6.EXE IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
71 0.00000204 VB6.EXE IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
72 0.00000153 VB6.EXE IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
74 0.00000167 VB6.EXE IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
73 0.00065363 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
75 0.00000186 VB6.EXE IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS
76 0.00000147 VB6.EXE IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS
77 0.00000138 VB6.EXE IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS
78 0.00000129 VB6.EXE IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS
79 0.00153235 VB6.EXE IOCTL_SERIAL_SET_BAUD_RATE VCP0 SUCCESS Rate: 38400
80 0.00195251 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
81 0.00000225 VB6.EXE IOCTL_SERIAL_CLR_RTS VCP0 INVALID PARAMETER
82 0.00193413 VB6.EXE IOCTL_SERIAL_SET_DTR VCP0 SUCCESS
83 15.98119787 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
84 0.00097337 VB6.EXE IOCTL_SERIAL_SET_LINE_CONTROL VCP0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8
85 0.00000155 VB6.EXE IOCTL_SERIAL_SET_CHAR VCP0 SUCCESS EOF:1a ERR:0 BRK:0 EVT:0 XON:11 XOFF:13
86 0.00194836 VB6.EXE IOCTL_SERIAL_SET_HANDFLOW VCP0 SUCCESS Shake:80000001 Replace:80000000 XonLimit:256 XoffLimit:256
87 0.00000604 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
88 0.00110108 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 1: .
89 0.00000345 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
90 0.00000252 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
91 0.00000192 VB6.EXE IOCTL_SERIAL_GET_PROPERTIES VCP0 SUCCESS
92 0.00087770 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
93 0.00181072 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 20: 12345678901234567890
94 0.00000521 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
95 0.00189737 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
96 0.00000321 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
97 0.00000193 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
98 0.00000170 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
99 0.00000667 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
100 0.00090692 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
101 0.00000326 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
102 0.01995878 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0 SUCCESS
103 0.00092289 VB6.EXE IOCTL_SERIAL_SET_WAIT_MASK VCP0 SUCCESS Mask: RXCHAR TXEMPTY CTS DSR RLSD BRK ERR RING
104 0.00000375 VB6.EXE IOCTL_SERIAL_GET_COMMSTATUS VCP0 SUCCESS
105 0.00000000 VB6.EXE IOCTL_SERIAL_WAIT_ON_MASK VCP0
hcker2000 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 01-11-2005, 10:16 PM   #9
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,157
Curiosity will become famous soon enough
Try slowing it down. Send 1 byte at a time or each character of the string in a loop. The LCD display probably has a small buffer and is getting too far behind trying to display it all. If the 1 char at a time loop is still too fast, you may need a Sleep() between each char, but small like even 1ms.
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam
Curiosity is offline   Reply With Quote
Old 01-12-2005, 12:50 AM   #10
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Well I guess I'm going to have to look up some tutorials on how to get individual charectures out of a var so i can send them one at a time in a loop.
hcker2000 is offline   Reply With Quote
Old 01-12-2005, 02:27 AM   #11
Phone Control Moderator
 
zorro's Avatar
 
Join Date: Mar 2004
Location: Munich, Germany
Posts: 1,902
zorro is on a distinguished road
The interesting part is :
93 0.00181072 VB6.EXE IRP_MJ_WRITE VCP0 SUCCESS Length 20: 12345678901234567890
which shows success. This means, it leaves your PC without problems. So I guess the problem is with the VFD.

You might try to slow down the transmisson and set it to 9600 baud.

The other way is:

Code:
Dim Msg As String Dim i As Integer Msg = "1234567890abcdefghijk" For i = 1 To Len(Msg) vfdCom.Output Mid(Msg, i, 1) Next

__________________
Skinning to go... VisualDesigner2!
zorro is offline   Reply With Quote
Old 01-12-2005, 03:34 AM   #12
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Thaks man that will save some time on my end. I hate dealing with strings lol.
hcker2000 is offline   Reply With Quote
Old 01-12-2005, 05:32 AM   #13
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Well I got all the worked out thanks to you guys. Would any of you super vb people like to help me figure out how to make a trackbar sub? Basicly it would look like this:

: ~ :

and of corse this tilda would move along with the track bar in winamp. I just got to figure out a way to make a sub to crate the graph when it needs to be updated (ie: when the song has moved far enough along that the tilda needs to move a block over).
hcker2000 is offline   Reply With Quote
Old 01-12-2005, 09:24 AM   #14
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,157
Curiosity will become famous soon enough
I'm not a VB guy, but can do math.

' width would be the width of the display
width = 10
' position and duration of song in seconds, converted to 0-9 range
pos = position * width / duration
' don't update unless it changed
if(pos = lastpos) then return
lastpos = pos
' make a 10 char string with the ~ somewhere in the middle
Dim str
str = String(pos, " ") + "~" + String(width - pos - 1, " ")

Well, okay that's a starting point at least.
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam
Curiosity is offline   Reply With Quote
Old 01-12-2005, 11:25 PM   #15
Variable Bitrate
 
Join Date: Sep 2004
Posts: 440
hcker2000 is on a distinguished road
Thanks thats a good start. Of corse the little bar I made on here the forums removed the extra spaces :/ oh well I think you got the jist of it. Now off to to refine it.
hcker2000 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 07:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics