Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 23rd May 2004, 08:20 AM   (permalink)
Default Can chr$(0) be received using mscomm in VB?

In ASCII code, 0x0 represent NULL.
The VB code written by my fren could receive any other ASCII, except for chr$(0).
Could any one tell me how to do it?
StupidDum is offline  
Old 23rd May 2004, 08:26 AM   (permalink)
Default

I am not familar with BASIC (I'm program in C/C++), but ASCII 0 is used to terminate strings (when stored as null-terminated strings), and is often used as EOF (end of file) and EOT (end of transmission). If VB is interpreting ASCII 0 as any of those 3 things then it would appear not to be received.

When you receive the data, are you storing it into a string or a Byte array? You should be using the latter.

Dan East
Dan East is offline  
Old 23rd May 2004, 08:36 AM   (permalink)
Default

http://msdn.microsoft.com/library/de...ldisc_comm.asp
Exo is offline  
Old 23rd May 2004, 08:37 AM   (permalink)
Default

http://msdn.microsoft.com/library/de...ldisc_comm.asp
Exo is offline  
Old 23rd May 2004, 01:12 PM   (permalink)
Default

Quote:
Originally Posted by Exo
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbpronulldisc_comm.asp
THank a lot!!!
A few sentences solve my problem!!!!
I was thinking to re-define the communication protocol that defined by me, because the VB code written by my IT guy couldn't receive NULL
StupidDum is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 05:44 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker