{"id":695,"date":"2020-01-05T20:39:38","date_gmt":"2020-01-06T01:39:38","guid":{"rendered":"https:\/\/www.electroallweb.com\/?p=695"},"modified":"2020-10-26T17:32:55","modified_gmt":"2020-10-26T22:32:55","slug":"entrada-analogica-y-salida-pwm-pic-16f877a","status":"publish","type":"post","link":"https:\/\/www.electroallweb.com\/index.php\/2020\/01\/05\/entrada-analogica-y-salida-pwm-pic-16f877a\/","title":{"rendered":"Entrada anal\u00f3gica y Salida PWM  pic 16F877A"},"content":{"rendered":"<section class=\"l-section wpb_row height_medium\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-2 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><\/div><\/div><\/div><div class=\"vc_col-sm-10 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h5>IMPLEMENTACI\u00d3N EN PROTOBOARD<\/h5>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-image\"><div class=\"w-image-h\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6-1024x371.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6-1024x371.jpg 1024w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6-300x109.jpg 300w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6-768x278.jpg 768w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6-1536x557.jpg 1536w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/esquema-protoboard-6.jpg 1755w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h5>ESQUEM\u00c1TICO ELECTR\u00d3NICO<\/h5>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-image\"><div class=\"w-image-h\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"591\" src=\"https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/circuitoproteus.jpg\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/circuitoproteus.jpg 926w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/circuitoproteus-300x191.jpg 300w, https:\/\/www.electroallweb.com\/wp-content\/uploads\/2020\/01\/circuitoproteus-768x490.jpg 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h5>C\u00d3DIGO ccs compiler<\/h5>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">\/* \r\n                CREADO POR      :{==[=======&gt;&gt;&gt;&gt; ELECTROALL &lt;&lt;&lt;&lt;&lt;=======]==}\r\n                INSTAGRAM       : https:\/\/www.instagram.com\/carlos_j_fuentess\/\r\n                                  \u00f3  @carlos_j_fuentess\r\n                FACEBOOK        : https:\/\/web.facebook.com\/ELECTROALL.ELECTRONICA\/?_rdc=1&amp;_rdr\r\n                P\u00c1GINA WEB      : https:\/\/www.electroallweb.com\/\r\n                YOUTUBE         : https:\/\/www.youtube.com\/c\/ELECTROALL\r\n           ________________________________________________________\r\n             {==[=======&gt; (ENTRADA &amp; SALIDA ANAL\u00d3GICA) &lt;=======]==}\r\n           ________________________________________________________\r\n*\/\r\n\r\n# include &lt;16f877a.h&gt;             \/\/incluimos el codigo del pic\r\n# device adc=8                    \/\/Habilitamos el disppositivos a 8bits\r\n# fuses hs, wdt, brownout,NOWDT   \/\/incluimos los fusibles necesarios\r\n# use delay (clock = 8M)          \/\/usamos reloj de 8Mhz\r\n\r\n# use standard_io (a,b,c,d)       \/\/usamos la configuracion estandar\r\nfloat  bits_analog;               \r\n\r\nvoid main (){\r\n\r\nsetup_adc_ports (AN0_AN1_AN3);  \/\/ habilitamos los puetos analogicos\r\nsetup_adc(adc_clock_div_16);   \/\/ habilitamos los puetos analogicos\r\nsetup_ccp1(CCP_PWM);           \/\/ habilitamos el puerto ccp1 del pic\r\nsetup_timer_2(T2_DIV_BY_16, 255,1); \/\/ usamos el timer2 \r\n      while (true){\r\n\r\n      set_adc_channel(0);    \r\n      delay_ms (2);                  \/\/ Selecciono el canal 0 (RA0)\r\n      bits_analog = read_adc();     \r\n       delay_ms (2);\r\n      set_pwm1_duty (bits_analog);  \/\/ manifestamos los valores de AN0 en cc_pwm)\r\n       delay_ms (2);\r\n\r\n      }\r\n}<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"IMPLEMENTACI\u00d3N EN PROTOBOARD ESQUEM\u00c1TICO ELECTR\u00d3NICO C\u00d3DIGO ccs compiler \/* CREADO POR :{==[=======&gt;&gt;&gt;&gt; ELECTROALL &lt;&lt;&lt;&lt;&lt;=======]==} INSTAGRAM : https:\/\/www.instagram.com\/carlos_j_fuentess\/ \u00f3 @carlos_j_fuentess FACEBOOK : https:\/\/web.facebook.com\/ELECTROALL.ELECTRONICA\/?_rdc=1&amp;_rdr P\u00c1GINA WEB : https:\/\/www.electroallweb.com\/ YOUTUBE : https:\/\/www.youtube.com\/c\/ELECTROALL ________________________________________________________ {==[=======&gt; (ENTRADA &amp; SALIDA ANAL\u00d3GICA) &lt;=======]==} ________________________________________________________ *\/ # include &lt;16f877a.h&gt; \/\/incluimos el codigo del pic # device adc=8 \/\/Habilitamos el disppositivos a 8bits #...","protected":false},"author":2,"featured_media":1026,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[22,26,20],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/posts\/695"}],"collection":[{"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=695"}],"version-history":[{"count":2,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/posts\/695\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/posts\/695\/revisions\/1849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/media\/1026"}],"wp:attachment":[{"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electroallweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}