![]() ![]() This is too slow if you want to achieve it inside 167 µs. If you sample then transmit you will therefore take, per sample: 104 + 174 = 278 µs ![]() At 115200 baud you can transmit one byte every 1/11520 seconds (86.8 µs) so therefore two bytes (16 bits) would take 173.6 µs. You also need to take into account the transmission time. The number of conversions you can do a second (taking the inverse of the above) is: Prescaler Conversions/sec If you go for maximum resolution (10 bits) you need a prescaler of 128, which takes 104 µs. Amongst other things is a table of conversion times for the different ADC prescalers, assuming a 16 MHz clock: PrescalerĢ * 13 * 1/16E6 = 0.000001625 ( 1.625 µs) I have a lengthy discussion about the ADC hardware. OK, so that means you need to sample and send every 1/6000 seconds (167 µs). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |