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
output format of ADCtoCom1(82, 500)
-
- Posts: 65
- Joined: 14 May 2010, 16:01 PM
output format of ADCtoCom1(82, 500)
- Attachments
-
- compresion-test-output.jpg
- (114.63 KiB) Downloaded 1250 times
Re: output format of ADCtoCom1(82, 500)
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:This is a nifty sub routine and almost perfect for our needs.
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.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.
- Don Kinzer