{"id":36,"date":"2024-06-16T09:19:19","date_gmt":"2024-06-16T09:19:19","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=36"},"modified":"2024-06-22T11:59:08","modified_gmt":"2024-06-22T11:59:08","slug":"clock-cycle","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=36","title":{"rendered":"Clock Cycle"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"36\" class=\"elementor elementor-36\">\n\t\t\t\t<div class=\"elementor-element elementor-element-412999f3 e-flex e-con-boxed e-con e-parent\" data-id=\"412999f3\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-62c0660d elementor-widget elementor-widget-text-editor\" data-id=\"62c0660d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<p class=\"wp-block-paragraph\">Microcontroller has one CPU clock and that has been distributed in different types of its internal peripherals. Let\u2019s look bellow \u2013<\/p>\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"281\" class=\"wp-image-38\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1-1024x281.jpg\" alt=\"\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1-1024x281.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1-300x82.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1-768x211.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1-1536x422.jpg 1536w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Clocking-Cycle-1.jpg 1594w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n<p class=\"wp-block-paragraph\"><strong>In picture the main clock of the \u00b5C is F_CPU. Let\u2019s the F_CPU=9MHz than new clock is 3MHz. Atmega8 has internal 8MHz and Atmega32 has internal 1MHz by default. For our operation clock cycle calculation is necessary. For example for proper ADC (Analog to Digital Conversion) function Atmega IC the F_ADC (clock frequency) is 50KHz to 200KHz. A normal conversion takes 13ADC cycle.<\/strong><\/p>\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"805\" height=\"608\" class=\"wp-image-39\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Core-System.jpg\" alt=\"\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Core-System.jpg 805w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Core-System-300x227.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/Core-System-768x580.jpg 768w\" sizes=\"(max-width: 805px) 100vw, 805px\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">For any operation CPU clock is very important part because for every operation CPU need minimum 1clock cycle. The CPU of AVR has different types of clock cycle as follow-<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b88d048 e-grid e-con-boxed e-con e-parent\" data-id=\"b88d048\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c114dab elementor-widget elementor-widget-text-editor\" data-id=\"c114dab\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><img decoding=\"async\" class=\"alignnone wp-image-475\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/structure-300x34.jpg\" alt=\"\" width=\"801\" height=\"92\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/structure-300x34.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/structure-1024x117.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/structure-768x88.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/structure.jpg 1300w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/p>\n<p>Here we discuss about External Crystal\/Ceramic Resonator and Calibrated Internal RC Oscillator.<\/p>\n<h5><strong>External Crystal Oscillator<\/strong>: \u00a0<\/h5>\n<p>XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be configured for use as an On-chip Oscillator, as shown in Figure 1. Either a quartz crystal or a ceramic resonator may be used. The CKOPT Fuse selects between two different Oscillator amplifier modes. Let\u2019s see Crystal Oscillator Operating Modes<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-482 size-full\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/crystal.jpg\" alt=\"\" width=\"1288\" height=\"234\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/crystal.jpg 1288w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/crystal-300x55.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/crystal-1024x186.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/crystal-768x140.jpg 768w\" sizes=\"(max-width: 1288px) 100vw, 1288px\" \/><\/p>\n<p>Those bits are found on High Fuse Byte and Low Fuse byte that will be discussed in burn section. The oscillator takes some time to operate. We can set the time according to the table-<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-487 size-full\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/eternal-crystal.jpg\" alt=\"\" width=\"1283\" height=\"233\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/eternal-crystal.jpg 1283w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/eternal-crystal-300x54.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/eternal-crystal-1024x186.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/eternal-crystal-768x139.jpg 768w\" sizes=\"(max-width: 1283px) 100vw, 1283px\" \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dff9d9d elementor-widget elementor-widget-text-editor\" data-id=\"dff9d9d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To use a 32.768kHz watch crystal as the clock source for the device, the Low-frequency Crystal Oscillator must be selected by setting the CKSEL Fuses to \u201c1001\u201d. 32.768kHz crystal is used for time measurement purpose.<\/p>\n<h5><strong>Calibrated Internal RC Oscillator :<\/strong><\/h5>\n<p>The calibrated internal RC Oscillator provides a fixed 1.0MHz, 2.0MHz, 4.0MHz, or 8.0MHz clock. All frequencies are nominal values at 5V and 25\u00b0C. The CKOPT Fuse should always be unprogrammed(0) when using this clock option.\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-491 size-full\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/RC-oscillator.jpg\" alt=\"\" width=\"1288\" height=\"452\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/RC-oscillator.jpg 1288w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/RC-oscillator-300x105.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/RC-oscillator-1024x359.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/RC-oscillator-768x270.jpg 768w\" sizes=\"(max-width: 1288px) 100vw, 1288px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-492 size-full\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/diff-clock.jpg\" alt=\"\" width=\"1325\" height=\"189\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/diff-clock.jpg 1325w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/diff-clock-300x43.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/diff-clock-1024x146.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/diff-clock-768x110.jpg 768w\" sizes=\"(max-width: 1325px) 100vw, 1325px\" \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Microcontroller has one CPU clock and that has been distributed in different types of its internal peripherals. Let\u2019s look bellow \u2013 In picture the main clock of the \u00b5C is F_CPU. Let\u2019s the F_CPU=9MHz than new clock is 3MHz. Atmega8 has internal 8MHz and Atmega32 has internal 1MHz by default. For our operation clock cycle [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-basic-interface"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":29,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":498,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/498"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}