Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/12/11 07:54
Read: times


 
#181555 - Still not mentioned what the problem is
Responding to: ???'s previous message
We still haven't been told what the problem is.

With the sampling rate shown on the posted images, you do not have any bandrate problem using 19200 baud. 200 samples/second times 2 bytes is 400 bytes/second. And at 19200 baud, you can transfer about 2k bytes/second. And your 8051 chip can support higher baudrates - to some part affected by your careful choice of a crystal that divides well with the standard baudrates.

You did mention 100Hz in your initial post. You need to sample at > 2*f or more than 200 Hz to be able to figure out frequency, amplitude, phase of a 100Hz signal. But sampling so close to the signal frequency will give huge aliasing problems making it impossible to plot a curve. But with many samples you can compute the signal and then plot a mathematical sine wave based on the computed frequency, phase and amplitude.

If you want to capture a curve that can be plotted and look good (and looks good enough to indicate if there are overtones on the curve) then you need to strive for 20*f so maybe 2000 samples/second. A tiny bit lower than 20*f and you would still manage to squeeze your data transfer through the link with 19200 baud.

So what is your problem?

That the samples does not display well when the signal is 50Hz or 100Hz with your current sampling rate? Either synthetizise a sine wave based on the parameters you can compute from your samples. Or increase the sampling rate.

That your link isn't fast enough? Can't happen with the sampling rates you have been displaying. But maybe you are running at higher sampling rates? So step up the baudrate.

That you sometimes gets garbage plotted? If you send the data as 2 binary bytes/sample then you will get garbage if the PC program manages to drop a single byte. If the ADC captures <= 14 bits of resolution, then you can set the high bit of one transmitted byte to tell that it is the first byte of the byte pair that forms one sample. If the baudrate is high enough that you always gets a pause between each two-byte pair, then you can use the pause to synchronize.

Is it that the PC program uses the time stamp when it receives the data as the time-axis value when plotting? Or is the PC program assuming/knowing that each sample is caught with constant time interval so it steps a fixed length on the time scale for each received sample?

You claimed the link was too slow but later claims "the data that is displaye din real time and the data that is displayed after sampling has no difference in them".

So exactly what is your problem, because the problems you seem to indicate that you are having does not match the proof you later have been posted.

In the end - with your sampling rate and link rate, there should be no problem for the PC to display a curve in real time and to be able to continue to scroll and display until you get a power failure (or M$ gives a BSD).

List of 40 messages in thread
TopicAuthorDate
Transmitting a 100 Hz signal through 8051            01/01/70 00:00      
   What is your problem?            01/01/70 00:00      
   RE: "the 8051 has transmission speed upto 19200"            01/01/70 00:00      
      the 8051 has transmission speed upto 19200            01/01/70 00:00      
         Incorrect analysis            01/01/70 00:00      
            Timing            01/01/70 00:00      
               Doesn't help to send at exact time - PC receive will jitter            01/01/70 00:00      
                  Windows For Sure Will...            01/01/70 00:00      
                  A Labview Limitation?            01/01/70 00:00      
         What makes you think that?            01/01/70 00:00      
            What makes you think that?            01/01/70 00:00      
               How fast are you sampling            01/01/70 00:00      
               Insufficient analysis            01/01/70 00:00      
                  20x            01/01/70 00:00      
         you can (I have) easily get 460kb.            01/01/70 00:00      
            No need to look for high baudrates            01/01/70 00:00      
               It doesn't help            01/01/70 00:00      
                  At least ...            01/01/70 00:00      
   Haven't you done this before...?            01/01/70 00:00      
   Here are the results in the form of images            01/01/70 00:00      
      Didn't bother to preview, did you?            01/01/70 00:00      
         How did you concluded?            01/01/70 00:00      
            Duplicate!            01/01/70 00:00      
         How did you concluded?            01/01/70 00:00      
            I think you're wrong            01/01/70 00:00      
            Looks close to 'as expected'            01/01/70 00:00      
               Seems like around 200Hz sample rate            01/01/70 00:00      
                  4 samples/period for the 50Hz signal            01/01/70 00:00      
            Not sure about your concept            01/01/70 00:00      
               Depends            01/01/70 00:00      
               Continuous monitoring?            01/01/70 00:00      
                  Ambiguity            01/01/70 00:00      
   Displaying the Signal at real time            01/01/70 00:00      
      Still not mentioned what the problem is            01/01/70 00:00      
         I do not think they know the problem            01/01/70 00:00      
            A Ring Buffer ...            01/01/70 00:00      
               A double-buffered solution also possible            01/01/70 00:00      
            What is the Problem.            01/01/70 00:00      
         real RS232?            01/01/70 00:00      
            Huge FIFO in USB-to-serial adapter            01/01/70 00:00      

Back to Subject List