Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2006, 05:17 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default hex num changed..

Dear All,

i found that if i send out a hex num that bigger than 7F, which is 80 to FF in hex format, it actually sending out a 3F instead of "80" or "8F". i short my serial port pin2 n pin3 so that i can read what i've sent out. below is my codes for ur review:

Dim num1 As String = strwhole.Substring(0, 2)
Dim tmp1 As Integer=Integer.Parse(num1,System.Globalization.Nu mberStyles.HexNumber)
Dim c1 As Char = Convert.ToChar(tmp1)
    port.WriteLine(c1)
Dim ch1 As Char = port.ReadLine()
    tmp1 = Convert.ToInt16(ch1)
Dim str1 As String = Convert.ToString(tmp1)
    Response.Write(str1)

if i try send 7F in hex, it did send 7F. Any idea? where did i wrong? pls advice.

Best Regards
life's Ng

 
Old October 30th, 2006, 12:41 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

Dear All,

Any idea for this? is .net cant sent out a hex format that more than 7F thru comm port...? or anything else that i went wrong above?

Best Regards
life's Ng






Similar Threads
Thread Thread Starter Forum Replies Last Post
convert byte[] to hex value gunjan.sh C# 2005 4 January 24th, 2008 05:15 AM
Help: check the NUM,CAPS,SCROLL key state gmbalaa General .NET 0 August 11th, 2007 07:10 AM
Server was unable to process request. ---> The num tqbinh .NET Web Services 1 March 22nd, 2007 10:14 PM
convert byte[] to hex wkm1925 C# 1 December 14th, 2006 09:07 PM
Select where hex aliali SQL Server 2000 5 October 16th, 2006 11:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.