delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/30/17:30:04

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: hex bytes thru BCSerio
Date: Mon, 30 Jul 2001 22:25:56 +0100
Lines: 15
Message-ID: <8pjbmtg5dcffm3gekae6p430e85igb1rs1@4ax.com>
References: <F78auNjVuMhvqgStMVh00008aa8 AT hotmail DOT com>
NNTP-Posting-Host: modem-11.neptunium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 996528386 20015 62.136.66.11 (30 Jul 2001 21:26:26 GMT)
NNTP-Posting-Date: 30 Jul 2001 21:26:26 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Rinkle Roff" <esusx AT hotmail DOT com> wrote:

> ahlan,
> 
> i am trying to use BCSerio to send bytes of hex to my serial port.
> using 8-N-1, i want to specify each of the data bits as high or low.
> 
> BCSerio lets me send chars to the com port.  I could convert the hex
> i want to send into ascii, then send it, but but ascii chars go up to 0x7f.  
> if i wanted to send 0x9b, or some hex byte that doesn't have
> an ascii equivalent, i'd be stuck.

I haven't used the BCSerio library myself, but it sounds like you are
looking for unsigned char.  That gives you the range 0x00-0xff and is,
generally speaking, what you want for serial comms.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019