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

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

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Bit Set/Clear Serial Transmit program.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2010, 03:41 PM
pdablue's Avatar
Senior Member
 
Join Date: Sep 2007
Posts: 113
Arrow Bit Set/Clear Serial Transmit program.

Hi,

This program will allow you to Set or Clear individual bits in an 8-bit byte
and then transmit that binary pattern out the serial port across a wireless
Bluetooth serial port connection.

This program was written on an HP IPAQ H2210 PDA with a 320 x 240 screen.
This program was compiled to run on a 320 x 240 screen.

There are 8-bits numbered:

Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7

Each Bit has a Num Up/Down control, a Checkbox control and a Textbox
control associated with it. The Num Up/Down control is used to set the
Bit to a 0 or 1. The Checkbox control is used to select the Bit's Textbox
control so that it can be cleared when the "CS" button is pressed. The
"CS" stands for "Clear Selected". This way you can clear selected
Textboxes while leaving others alone. The Textbox controls allow you to
enter a short Text description of the Bit's functional purpose.

The program lets you define 4 sets of 8-Bit descriptions and save the
information to a file. When you startup the program again at a later
time you can Read the data file and recover the last saved set of Bit
descriptions.

After entering text into the 8 textboxes you must press the "Enter"
button to save the text into the internal working variables for the
selected data set. There are 4 data sets, which can be viewed by
pressing the "V1", V2", "V3" and "V4" buttons.

Here are the button descriptions:

"Open" Pressing this button opens the bluetooth com port.
"Close" Pressing this button closes the bluetooth com port.
"Read" Pressing this button reads in the data file.
"Save" Pressing this button saves the current data to the data file.
"CS" Pressing this button clears text in the selected textboxes.
"CA" Pressing this button will clear text in all 8 of the textboxes.
"Enter" Pressing this button will enter the text in the textboxes.
"V1" Pressing this button will view the 1st set of textbox data.
"V2" Pressing this button will view the 2nd set of textbox data.
"V3" Pressing this button will view the 3rd set of textbox data.
"V4" Pressing this button will view the 4th set of textbox data.
"TX" Pressing this button will transmit the current 8-bit byte value.

"SIP ON" Pressing this MenuBar selection will turn the SIP keyboard ON.
"SIP OFF" Pressing this MenuBar selection will turn the SIP keyboard OFF.

"Bit.sbp" is the Basic4ppc source code file for this program

"Bitpic10.jpg" is a screenshot of the main program screen.

"Bitpic11.jpg" is a screenshot of selected textbox entries that
have been cleared by pressing the "CS" button.

"Bitpic12.jpg" is a screenshot with the SIP keyboard turned ON.

"Bitpic13.jpg" is a screenshot when the "Save" button is pressed.

"Bitpic14.jpg" is a screenshot when the "CA" button is pressed.

"BitSetClearZip.zip" is the zipped up (.CAB) installation file.
Attached Images
File Type: jpg Bitpic10.jpg (22.3 KB, 29 views)
File Type: jpg Bitpic13.jpg (18.9 KB, 9 views)
File Type: jpg Bitpic14.jpg (17.5 KB, 11 views)

Last edited by pdablue : 02-25-2010 at 04:00 PM.
Reply With Quote
  #2 (permalink)  
Old 02-26-2010, 05:38 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I'm sure you don't need 255 If statements in this Sub.

Won't the example below work ?

Code:
Sub ImageButtonSendTx_Click
num=label17.Text
label20.Text=
"TX = " & num
b1()=
Array(num)
serial.Output2(b1())
End Sub
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
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
Serial Port Binary Character (0-255) Transmit program. pdablue Share Your Creations 2 02-18-2010 09:28 AM
Serial Port ASCII character (0-127) Transmit program. pdablue Share Your Creations 4 02-18-2010 09:25 AM
Bluetooth serial port program with Automatic Sequence repeat function. pdablue Share Your Creations 2 04-08-2009 03:10 PM
Bluetooth Serial Port communication program for the PDA. pdablue Share Your Creations 3 03-30-2009 03:45 PM
Open serial port crashes program on device Steve Bug Reports 2 05-23-2007 10:52 PM


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


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