Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

ascii character problem

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-28-2008, 03:52 PM
Junior Member
 
Join Date: May 2007
Location: Chicago Illinois USA
Posts: 23
Default ascii character problem

I am trying to send information via a serial port to an electronic machine. The machine requires a coding of "K" to start, followed by CHR(02). At the end of machine coding I need to send CHR(03). Instead, the characters being sent are chr(191) and chr(192). Is there some way to force the serial program to send the correct 02 & 03 ASCII characters?
Reply With Quote
  #2 (permalink)  
Old 05-28-2008, 03:59 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should use Serial.Output2 to send the required bytes.
The Bitwise library allows you to convert strings to bytes and vice versa.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm want function UTF-8 to ASCII or utf-8 to tis620 thaidelphi Questions (Windows Mobile) 3 08-05-2008 08:25 PM
Character encoding / code pages TWELVE Questions (Windows Mobile) 10 05-29-2008 03:17 PM
how to display chinese characters (High-ASCII, double-byte) using sqlite3 dennychuang Questions (Windows Mobile) 5 05-22-2008 04:39 PM
Serial terminal ,send ASCII/HEX alex_up Russian Forum 0 12-15-2007 11:18 AM
Problem with "%" character francisco cobos Questions (Windows Mobile) 4 11-19-2007 09:01 AM


All times are GMT. The time now is 09:37 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0