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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/04/11 05:56
Read: times


 
#180992 - How fast are you sampling
Responding to: ???'s previous message
Just how fast are you sampling the waveform?

I think there may have been some misinterpretation in some of the replies here when you mentioned the 3Hz number. Some folks may have thought that you were sampling at a 3Hz rate rather than sampling a signal that has a frequency of 3Hz.

The straight lines you see in the graph may simply be the graphing software connecting two points by a straight line when there was no sample data for other points in between.

It sounds to me like you have made your code in a manner that does not facilitate a fast sample rate. If you have made your code such that you poll an A/D converter reading to completion and then turn around and send the data out the UART in a polled manner you may be making the program waste a lot of time in wait loops. One sure way to improve your sample time in this scenario is to use a timer interrupt to launch the A/D conversions. This same interrupt could first read the result of the previous conversion, queue the data to the serial port and then finally trigger the next conversion to start.

The serial port handler should then also be setup with a circular queue that gets loaded from the input side in the above mentioned timer interrupt and unloaded on its output side via the serial port interrupt handler.

Michael Karas

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