Using MSCOMM to read from an exterior source

arwen_undomiel
11-24-2005, 02:42 AM
Hi, :chuckle:

would like to post a question on using MSCOMM.
since my last post.. my project has been progressing, although i must say it's rather slow.. but anyway.. bk to the main issue..

I have 2 situations with me now... :confused:

1) I have to read from an exterior source let's say like a bread board.. this bread board will give me some signals or ascii codes and i have to read and display it in my program..

2)Once the above is completed, i have to read via RS232 from a microprocessor and for those who have seen my introduction before.. i'm actually reading real time temperature..

for the above two, the results will be sent to a textbox -> multi line set to true.

any one who can tell me wat source code i should include to initialise the comm ports through MSCOMM? for the (1) and (2), are they to be written in different programs since they will be retreiving the results from different sources? If so, what will be the difference? if you are directly writing the code in your reply, pls put in comments so that i can understand what each set of instructions are for.. tks

:D Arwen :D

by_m
11-24-2005, 05:19 PM
Sorry, this isn't a place to get code handouts, but if you have any specific questions feel free to ask.

arwen_undomiel
11-24-2005, 09:00 PM
:huh: soory.. but i don't really understand...

u mean i can't ask for someone to tell me wat codes to put in? :confused:

i just want to know wat codes i should add in if i want to receive a string of characters from an RS232 which is connected to a microcontroller.. the microcontroller that i'm using is a CYGNAL C8051F040. I understand u have to use MSCOMM for that.. but that's how far i know.. is there anyone who can help me get started? :) the results will be displayed in a text box.

tks..

:D arwen :D

by_m
11-25-2005, 12:09 PM
If you are using VB.net 2005 this will be your best bet: http://msmvps.com/coad/archive/2005/03/23/39466.aspx
It's in C# but should be very easy to translate. Also, it talks about the .net 2.0 and VS.net 2005 being in beta. That is no longer the case, and you can freely download the 2005 express versions from Microsoft.
It also seems that MSCOMM is not available for VB.net. In 1.0 and 1.1 they didn't even have a replacement class for it. If you are using VB.net 2002 or 2003, I'd recommend you look here: http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en
What I was saying before is that this is not a place where we just hand out free code. We are supposed to point you in the right direction so that you can figure it out for yourself. I hope you found the information I gave you useful, and if you have any specific questions on implementation feel free to ask.

arwen_undomiel
11-30-2005, 07:01 PM
thanks for your help.. my MSCOMM part is resolved.. I'm actually using VB 6.0. now I have a new problem but i don't know if i shld post it on this thread or create a new thread.. i'll probably create a new thread under 'GENERAL'. tks again!! :D

arwen

by_m
11-30-2005, 07:16 PM
OK cool. For your information though, you may notice that this site seperates VB.net and legacy VB (vb6, vb5, etc.). You posted this in the vb.net section (see the link hierarchy towards the top of this page) so I assumed you were using .Net, which ended up in some confusion.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum