Shop OBEX P1 Docs P2 Docs Learn Events
Baud and aquisition rate. — Parallax Forums

Baud and aquisition rate.

PanichouPanichou Posts: 3
edited 2013-06-19 07:30 in General Discussion
Hi I am using PLX-DAQ to send data from an Arduino to an excel datasheet.
Can I link the baud rate set in the code and the aquisition frequency to the datasheet ?

( I can explain my project a little more if needed ! )


Thank you.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-17 12:47
    No. There's a dialog window in PLX-DAQ where you can manually change the Baud, but there's no command to do so.
  • PanichouPanichou Posts: 3
    edited 2013-06-19 04:04
    Yes I saw it in the dialog window ! But by link I meant a mathematical equation. For example, when I set the baud to 128 000, the serial port sends 128 000 bits per second and the acquisition frequency is about 1ms. I understand that it take several bits to send ONE line of data to the excel file but I want to quantify it ( ie mathematical relation between baud rate and frequency rate ).

    Is it possible or does it depend on my computer ( R.A.M, microprocessor speed, etc ) ?
  • BeanBean Posts: 8,129
    edited 2013-06-19 04:14
    It typically takes 10 bits to send 1 byte or character. So the line "Hello There" contains 11 characters, so it would take 110 bits.
    At 128,000 baud that would take (110 / 128000) = 0.000859 seconds or just under 1 millisecond.

    NOTE: 128,000 is NOT a standard baud rate. 115,200 and 230,400 are standard baud rates.

    Bean
  • PanichouPanichou Posts: 3
    edited 2013-06-19 07:17
    by 1 byte do you mean 8 bit ? Or one number ?
    So considering what you are saying, the line " 270 " would take 30 bits ?
    I did not know that 128 000 wasn't a standard rate. For an academic project I am studying low fi ADC and amplification with a microcontroller, I just wanted to compare the qcuisition with a low baud ( 9600 ) and the highest ( plx-daq highest is 128 000 ).

    Thank you.
    Parinya
  • BeanBean Posts: 8,129
    edited 2013-06-19 07:30
    1 byte being 8 bits. But serial data also has a start and stop bit. So it takes 10 bit-times to send 1 byte.

    Bean
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-06-19 07:30
    1 byte is 8 bits. (In general, for this discussion its 8 bits)

    For transmission, there are stop bits, parity bits, and other protocol elements, like break etc. So it works out they way these are typically set results in 10 bits used to transmit each 8 bit byte.

    There are other things that introduce additional delays, such as latency in the PC from OS, etc. After you figure the "ball park range" you run a test to compare actual through put to estimated throughput.
Sign In or Register to comment.