Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
output format of ADCtoCom1(82, 500)

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
Paul Lamar



Joined: 14 May 2010
Posts: 46

Posted: 15 May 2010, 1:00 AM    Post subject: output format of ADCtoCom1(82, 500) Reply with quote

This is a nifty sub routine and almost perfect for our needs.

I need to convert the extended ASCII output characters from ADCtoCom1(82, 500)
to a decimal number characters so they can be loaded into
a spread sheet for plotting on the PC.

So far I had to run it through "more > newfile.dat"

And then searched and replaced /' with nothing.

That gave me an asci hex file that looked like "fffefffe".
Now I could process that using QB and convert it to three byte
decimal numbers but there must be a better way.

Paul Lamar



compresion-test-output.jpg
 Description:

Download
 Filename:  compresion-test-output.jpg
 Filesize:  114.63 KB
 Downloaded:  1236 Time(s)

Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR

Posted: 15 May 2010, 2:13 AM    Post subject: Re: output format of ADCtoCom1(82, 500) Reply with quote

Paul Lamar wrote:
This is a nifty sub routine and almost perfect for our needs.
This subroutine is provided for compatibility with BasicX. Note, particularly, that the analog input range is limited to 1.25V to 3.75V (when running on 5 volts). Analog inputs below 1.25V will result in a value of zero while inputs above 3.75V will result in a value of &Hff.

Paul Lamar wrote:
I need to convert the extended ASCII output characters [...] to a decimal number characters so they can be loaded into
a spread sheet for plotting on the PC.
On the PC side, each byte will represent a value from 1.25V (0) to 3.75V (&Hff). You should be able to read the bytes, one at a time, in QuickBasic and output the decimal equivalents to a text file in a format that can be imported to a spreadsheet.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group