Paul Lamar
Joined: 14 May 2010
Posts: 46
|
|
Posted: 15 May 2010, 1:00 AM Post subject: output format of ADCtoCom1(82, 500) |
|
|
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
| Description: |
|
 Download |
| Filename: |
compresion-test-output.jpg |
| Filesize: |
114.63 KB |
| Downloaded: |
1236 Time(s) |
|
|
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) |
|
|
| 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.
|
|