944,164 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1334
  • C++ RSS
Mar 22nd, 2006
0

Anyone can help??

Expand Post »
I'm not a C++ programmer in the real sense of it, but my project involves gathering some data, store the data in memory with time stamp and later upload to the PC where a C++ algorithm will be used to manipulate it and then produce a graph of the manipulated data.
I can gather the data using assembly language and store to memory, well in ASCII (HEX).
(1) I do not know how to start/initiate my data upload to the PC
(2) I do not know how to manage the HEX data once it gets to the PC.
(3) Do I need to convert data to Decimal before I can run algorithms on it?
I'm really stuck here.. Based on my requirements? can anybody make a suggestion that I can consider for my implementation please?
Is there any Textbook that I might find useful?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
francis adepoju is offline Offline
4 posts
since Mar 2006
Mar 22nd, 2006
0

Re: Anyone can help??

>1) I do not know how to start/initiate my data upload to the PC
First you need to have a clear idea of what 'upload' means to you. Are you gathering the data on another system and transferring it through a network to the PC? Are you reading from a file, from a process, from a socket? Upload to what? A file? A memory map? A pipe?

>(2) I do not know how to manage the HEX data once it gets to the PC.
If it's in text format then depending on the needs of the C++ program, you need to convert as necessary.

>(3) Do I need to convert data to Decimal before I can run algorithms on it?
If the data is in text format as you said, you need to convert it to binary so that it can be treated as numeric values rather than character values. Once in binary format, decimal and hexadecimal are nothing more than representation differences, and internally are identical.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Mar 22nd, 2006
0

Re: Anyone can help??

Hi,

If you need to upload the data later to the PC where algorithm resides then where were it in the first placee ? Anther computer, or a data acquisition device ? What is the type of connection between the hardware the data comes from and the PC ? In which format the HEX coded data is ? And, yes you need to convert the data from ASCII based HEX presentation to an integer type.

Loren Soth
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Mar 22nd, 2006
0

Re: Anyone can help??

[QUOTE=Narue]>1) I do not know how to start/initiate my data upload to the PC
First you need to have a clear idea of what 'upload' means to you. Are you gathering the data on another system and transferring it through a network to the PC? Are you reading from a file, from a process, from a socket? Upload to what? A file? A memory map? A pipe?
>(2) I do not know how to manage the HEX data once it gets to the PC.
If it's in text format then depending on the needs of the C++ program, you need to convert as necessary.
So I might have to convert to binary. Have any way of doing it in C++?

MORE..
The way it is at the moment, I hope to store the HEX output from the ADC in RAM or a data logger(if I can find any appropriate one), then at the end of data capture, transmit (upload) to a PC (file) via UART.
It is at this stage that I want to write a C++ algorithm to sort, compare, manipulate, etc before doing a graph..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
francis adepoju is offline Offline
4 posts
since Mar 2006
Mar 23rd, 2006
0

Re: Anyone can help??

Quote originally posted by Narue ...
>1) I do not know how to start/initiate my data upload to the PC
First you need to have a clear idea of what 'upload' means to you. Are you gathering the data on another system and transferring it through a network to the PC? Are you reading from a file, from a process, from a socket? Upload to what? A file? A memory map? A pipe?

>(2) I do not know how to manage the HEX data once it gets to the PC.
If it's in text format then depending on the needs of the C++ program, you need to convert as necessary.

>(3) Do I need to convert data to Decimal before I can run algorithms on it?
If the data is in text format as you said, you need to convert it to binary so that it can be treated as numeric values rather than character values. Once in binary format, decimal and hexadecimal are nothing more than representation differences, and internally are identical.
Thanks for your earlier comments. Answers to some of your queries are as follows:
The way my design is at the moment, my inputs are mVolts data going into the ADC at a regular interval. I hope to store the HEX outputs from the ADC into RAM or a data logger (if I can find any appropriate one), then at the end of data capture, transmit (upload) the data to a PC (file system) via UART.
At the end of this stage, I’ll want to write a C++ algorithm to sort, compare, manipulate, etc before doing a graph of the original data.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
francis adepoju is offline Offline
4 posts
since Mar 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Anyone can Help-2?
Next Thread in C++ Forum Timeline: Help figuring out





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC