{"id":853,"date":"2018-10-30T18:37:32","date_gmt":"2018-10-30T18:37:32","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=853"},"modified":"2022-02-18T15:37:48","modified_gmt":"2022-02-18T15:37:48","slug":"adc-sampling-requirements","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic32\/xc32-v2-old\/atod-xc32\/adc-sampling-requirements","title":{"rendered":"ADC Sampling Requirements"},"content":{"rendered":"<h4>\nSetting up the AtoD&nbsp;Sampling<br \/>\n<\/h4>\n<p>\nLook up the following in the device datasheet:\n<\/p>\n<p style=\"margin-left: 40px;\">\nTad = ADC Clock period ADC Clock Period\n<\/p>\n<p style=\"margin-left: 40px;\">\nSample Time\n<\/p>\n<p style=\"margin-left: 40px;\">\nConversion Time (value not needed to setup but this tells you how long it will take to convert)\n<\/p>\n<p>\nADCS&nbsp;&#8211; ADC Conversion Clock Select bits\n<\/p>\n<p style=\"margin-left: 40px;\">\nADC_CONV_CLK_#Tcy&nbsp;\n<\/p>\n<p style=\"margin-left: 40px;\">\nThis value sets Tad:\n<\/p>\n<p style=\"margin-left: 80px;\">\nTpb (Peripheral bus speed) x Value Used = Tad\n<\/p>\n<p>\nSAMC &#8211; Auto-Sample Time bits\n<\/p>\n<p style=\"margin-left: 40px;\">\nADC_SAMPLE_TIME_# (A\/D Auto Sample Time x&nbsp;Tad)\n<\/p>\n<p style=\"margin-left: 40px;\">\nThis value sets the sample time\n<\/p>\n<h5>\nExample &#8211; PIC32MX120F032B<br \/>\n<\/h5>\n<p>\nTad = ADC Clock period ADC Clock Period = 65nS min\n<\/p>\n<p>\nConversion Time&nbsp; = 12Tad&nbsp;typ\n<\/p>\n<p>\nSample Time = 1Tad&nbsp;min\n<\/p>\n<p>\nWith a 40MHz&nbsp;osc and 40MHz&nbsp;peripheral bus these values would provide the required times:\n<\/p>\n<p style=\"margin-left: 40px;\">\nADC_CONV_CLK_3 provides Tad = 75nS\n<\/p>\n<p style=\"margin-left: 40px;\">\nADC_SAMPLE_TIME_3&nbsp;provides 3Tad&nbsp;so more than the 1Tad minimum but enuring&nbsp;our input impedance etc doesn&#39;t affect the sampling capacitor being fully charged each time.\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting up the AtoD&nbsp;Sampling Look up the following in the device datasheet: Tad = ADC Clock period ADC Clock Period Sample Time Conversion Time (value not needed to setup but this tells you how long it will take to convert) ADCS&nbsp;&#8211; ADC Conversion Clock Select bits ADC_CONV_CLK_#Tcy&nbsp; This value sets Tad: Tpb (Peripheral bus speed) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-853","post","type-post","status-publish","format-standard","hentry","category-atod-xc32"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=853"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/853\/revisions"}],"predecessor-version":[{"id":856,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/853\/revisions\/856"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}