EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Communicating with rcm3100 through serial port component in vb.net

Started by tije...@yahoo.com October 5, 2009
SGkhDQpJIHdvdWxkIGxpa2UgdG8ga25vdyBob3cgdG8gdXNlIHNlcmlhbCBwb3J0IGNvbXBv
bmVudCBpbiB2Yi5uZXQgdG8gY29tbXVuaWNhdGUgd2l0aCBwb3J0IHBpbnMgb24gdGhlIHJh
YmJpdCByY20zMTAwPyBGb3IgZXhhbXBsZSwgc2F5IEkgYW0gdXNpbmcgcG9ydCBBIGFuZCBJ
IHdvdWxkIGxpa2UgcGluIFBBNSB0byBnbyBsb3cgb3IgaGlnaCwgaG93IGRvIEkgYWNjb21w
bGlzaCB0aGlzIHdpdGggdmIubmV0IHNlcmlhbCBwb3J0PyBJIHdlbnQgb3ZlciB0byAiaGVs
cCB3aXRoIHZiIGdyb3VwcyIgYnV0IEkgZ290IG5vIHJlc3BvbnNlLg0KDQpTdGVmYW4NClNl
bnQgZnJvbSBteSBCbGFja0JlcnJ5riB3aXJlbGVzcyBkZXZpY2UgYXZhaWxhYmxlIGZyb20g
Ym1vYmlsZS4KCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQoKWWFob28h
IEdyb3VwcyBMaW5rcwoKPCo+IFRvIHZpc2l0IHlvdXIgZ3JvdXAgb24gdGhlIHdlYiwgZ28g
dG86CiAgICBodHRwOi8vZ3JvdXBzLnlhaG9vLmNvbS9ncm91cC9yYWJiaXQtc2VtaS8KCjwq
PiBZb3VyIGVtYWlsIHNldHRpbmdzOgogICAgSW5kaXZpZHVhbCBFbWFpbCB8IFRyYWRpdGlv
bmFsCgo8Kj4gVG8gY2hhbmdlIHNldHRpbmdzIG9ubGluZSBnbyB0bzoKICAgIGh0dHA6Ly9n
cm91cHMueWFob28uY29tL2dyb3VwL3JhYmJpdC1zZW1pL2pvaW4KICAgIChZYWhvbyEgSUQg
cmVxdWlyZWQpCgo8Kj4gVG8gY2hhbmdlIHNldHRpbmdzIHZpYSBlbWFpbDoKICAgIG1haWx0
bzpyYWJiaXQtc2VtaS1kaWdlc3RAeWFob29ncm91cHMuY29tIAogICAgbWFpbHRvOnJhYmJp
dC1zZW1pLWZ1bGxmZWF0dXJlZEB5YWhvb2dyb3Vwcy5jb20KCjwqPiBUbyB1bnN1YnNjcmli
ZSBmcm9tIHRoaXMgZ3JvdXAsIHNlbmQgYW4gZW1haWwgdG86CiAgICByYWJiaXQtc2VtaS11
bnN1YnNjcmliZUB5YWhvb2dyb3Vwcy5jb20KCjwqPiBZb3VyIHVzZSBvZiBZYWhvbyEgR3Jv
dXBzIGlzIHN1YmplY3QgdG86CiAgICBodHRwOi8vZG9jcy55YWhvby5jb20vaW5mby90ZXJt
cy8KCg=
Hi Stefan,

You need to write some code to send and receive serial data to the Rabbit.
You then need to receive this on the Rabbit, decode the message and then
switch the Port as required. Is quite trivial to do if you know how to send
and receive serial data on the Rabbit and in VB.

For VB, simply drop a serial port component on the form, set the properties
to match the speed of the Rabbit serial port and then add a call to send
data on the serial port. Remember to open it first.

For example, to switch the port ON send something like this.

Dim Telegram As String
Telegram = "$1#"
SerialPort1.Write(Telegram)

The $ is the header (always useful to locating the start of a message), the
1 is the state of the Port Pin and # is the end of telegram.

To switch the port off, use this.

Dim Telegram As String
Telegram = "$0#"
SerialPort1.Write(Telegram)

This time, the 0 says to switch it off.

This is just a little insight into the way to do this as there is many more.
In most cases I also add a CRC/checksum to the message to act as a check
that the data was good.

You'll need code on the Rabbit to receive this and decode it.

If you can get this all working on your own, then you will have a great
understanding of how serial comms works and how to programme it for the
Rabbit. There is a quite a few samples supplied with the Rabbit so I am sure
you will figure it all out! Good luck.
Hope this helps

Regards
Dave...
---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---
-----Original Message-----
From: r... [mailto:r...] On
Behalf Of t...@yahoo.com
Sent: 01 October 2009 19:02
To: r...
Subject: [rabbit-semi] Communicating with rcm3100 through serial port
component in vb.net

Hi!
I would like to know how to use serial port component in vb.net to
communicate with port pins on the rabbit rcm3100? For example, say I am
using port A and I would like pin PA5 to go low or high, how do I accomplish
this with vb.net serial port? I went over to "help with vb groups" but I got
no response.

Stefan

Thank you for your response. I will give it a shot! I will keep intouch to let you know my progress.

Best regards
Stefan
Sent from my BlackBerry wireless device available from bmobile.

-----Original Message-----
From: "Dave McLaughlin"
Date: Mon, 5 Oct 2009 14:54:37
To:
Subject: RE: [rabbit-semi] Communicating with rcm3100 through serial port component in vb.net

Hi Stefan,

You need to write some code to send and receive serial data to the Rabbit.
You then need to receive this on the Rabbit, decode the message and then
switch the Port as required. Is quite trivial to do if you know how to send
and receive serial data on the Rabbit and in VB.

For VB, simply drop a serial port component on the form, set the properties
to match the speed of the Rabbit serial port and then add a call to send
data on the serial port. Remember to open it first.

For example, to switch the port ON send something like this.

Dim Telegram As String
Telegram = "$1#"
SerialPort1.Write(Telegram)

The $ is the header (always useful to locating the start of a message), the
1 is the state of the Port Pin and # is the end of telegram.

To switch the port off, use this.

Dim Telegram As String
Telegram = "$0#"
SerialPort1.Write(Telegram)

This time, the 0 says to switch it off.

This is just a little insight into the way to do this as there is many more.
In most cases I also add a CRC/checksum to the message to act as a check
that the data was good.

You'll need code on the Rabbit to receive this and decode it.

If you can get this all working on your own, then you will have a great
understanding of how serial comms works and how to programme it for the
Rabbit. There is a quite a few samples supplied with the Rabbit so I am sure
you will figure it all out! Good luck.
Hope this helps

Regards
Dave...
---
Very funny Scotty, now beam down my clothes!!!
---
http://www.embeddedcomputer.co.uk
---
-----Original Message-----
From: r... [mailto:r...] On
Behalf Of t...@yahoo.com
Sent: 01 October 2009 19:02
To: r...
Subject: [rabbit-semi] Communicating with rcm3100 through serial port
component in vb.net

Hi!
I would like to know how to use serial port component in vb.net to
communicate with port pins on the rabbit rcm3100? For example, say I am
using port A and I would like pin PA5 to go low or high, how do I accomplish
this with vb.net serial port? I went over to "help with vb groups" but I got
no response.

Stefan

Memfault Beyond the Launch