// API callback
related_results_labels_thumbs({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$blogger":"http://schemas.google.com/blogger/2008","xmlns$georss":"http://www.georss.org/georss","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$thr":"http://purl.org/syndication/thread/1.0","id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472"},"updated":{"$t":"2024-07-04T14:42:20.019+05:30"},"category":[{"term":"PIC"},{"term":"16F"},{"term":"Audio"},{"term":"Basic"},{"term":"SSD"},{"term":"Indicator"},{"term":"Clock"},{"term":"LED"},{"term":"LCD"},{"term":"I2C"},{"term":"18F"},{"term":"Counter"},{"term":"Sensor"},{"term":"USB"},{"term":"12F"},{"term":"Matrix"},{"term":"Tools"},{"term":"Apps"},{"term":"DS1307"},{"term":"Programmer"},{"term":"Timer"},{"term":"Tuner"},{"term":"Uart"},{"term":"LDR"},{"term":"Remote"},{"term":"SPI"},{"term":"Security"},{"term":"DS1302"},{"term":"DS323x"},{"term":"Decoder"},{"term":"Logic"},{"term":"PCF8583"}],"title":{"type":"text","$t":"Scorpionz - Electronic Circuits and Microcontroller Projects"},"subtitle":{"type":"html","$t":""},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/posts\/default"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/-\/PIC?alt=json-in-script\u0026max-results=7"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/search\/label\/PIC"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"},{"rel":"next","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/-\/PIC\/-\/PIC?alt=json-in-script\u0026start-index=8\u0026max-results=7"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/04276791138418315268"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"28","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhOi2xKRvoV6gXKWi71KMKmEIRnpUCIKqooPVvYUWrT3XVz-dq56xLd_XdqhlDm93ymdLdRr_Y1tlZVnEiI63IqdHSIir_OVOWfXUvlAOQYI6s6Q_0RjB2Q1bTb0y2T_g\/s113\/19_scorpionsecondary.jpg"}}],"generator":{"version":"7.00","uri":"http://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"37"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"7"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-4305931222798994858"},"published":{"$t":"2020-11-01T14:05:00.221+05:30"},"updated":{"$t":"2022-01-09T19:27:31.657+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"16F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Audio"},{"scheme":"http://www.blogger.com/atom/ns#","term":"I2C"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Tuner"},{"scheme":"http://www.blogger.com/atom/ns#","term":"USB"}],"title":{"type":"text","$t":"AN7223 LM7001 PLL FM Stereo Tuner, JQ8400 USB MP3, Bluetooth Audio Player - 16F690"},"content":{"type":"html","$t":"\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh3LigyGY9NGCqalQV1gtgbhcYmZFqdf1tlBKPLaKf1NhE5YNEEJ9DUipuZdSFC1Ir19RC549E9OrVjzu5EjvmYjk2ax8HD3OIvpsKxuhJQFta1HTPwEHe9Cq0amsQLk-AbkP2xzqmVHcKc\/s403\/usb_fm.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"FM USB MP3 Player\" border=\"0\" data-original-height=\"236\" data-original-width=\"403\" height=\"187\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh3LigyGY9NGCqalQV1gtgbhcYmZFqdf1tlBKPLaKf1NhE5YNEEJ9DUipuZdSFC1Ir19RC549E9OrVjzu5EjvmYjk2ax8HD3OIvpsKxuhJQFta1HTPwEHe9Cq0amsQLk-AbkP2xzqmVHcKc\/w320-h187\/usb_fm.jpg\" title=\"FM USB MP3 Player\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EAudio Player\u003Cbr \/\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\nThis is my new project, 3 in 1 audio player that design for my amplifier.  It built in FM radio, USB player and Bluetooth module. Also include a simple mixer with op-amp. \n\u003Cbr \/\u003E\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjtdqnOb4jypEz-UoG5V5kTVZ07Y0dd07Dg-dUmz1FIAq1fVKmip6epG-tHPwHFDPU2yU0I-uD14M_sApSo-sRhFLmQgmDoSJ4_3yaoIKVgMAhfB01lwawlHMpPzop3wMWesYdB2meF7FF8\/s1800\/Bottom+PCB%257E1.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Bottom PCB\" border=\"0\" data-original-height=\"1800\" data-original-width=\"1350\" height=\"320\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjtdqnOb4jypEz-UoG5V5kTVZ07Y0dd07Dg-dUmz1FIAq1fVKmip6epG-tHPwHFDPU2yU0I-uD14M_sApSo-sRhFLmQgmDoSJ4_3yaoIKVgMAhfB01lwawlHMpPzop3wMWesYdB2meF7FF8\/w240-h320\/Bottom+PCB%257E1.jpg\" title=\"Bottom PCB\" width=\"240\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EBottom PCB\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg9BX5lDpV6U8Gt8Tc2r7VNhtKDtOox40h6hunX_v40YS_ooyAQXj21OsMnvp7KncQhyphenhyphenKrsoYlYsYq_z2F3MiYmgEDwm6IuzohLnwi9wUVAsLrxI7SbgxfpleRbKMrUfZZpyNqaKm3RErPv\/s2048\/Top+PCB%257E1.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Top PCB\" border=\"0\" data-original-height=\"1536\" data-original-width=\"2048\" height=\"240\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg9BX5lDpV6U8Gt8Tc2r7VNhtKDtOox40h6hunX_v40YS_ooyAQXj21OsMnvp7KncQhyphenhyphenKrsoYlYsYq_z2F3MiYmgEDwm6IuzohLnwi9wUVAsLrxI7SbgxfpleRbKMrUfZZpyNqaKm3RErPv\/w320-h240\/Top+PCB%257E1.jpg\" title=\"Top PCB\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ETop PCB\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiw01FFvkRF5xGLRnHb9W5DK_cp5wuc51kgzfZA3U86_uYl3UieW4latJ4bN03qFqSSZlC5hCxhvqJpk-w0QpVXZZtzUJDc1rGmIHkgFBb8_Y24h2aJmRWgf5YK_i2JxeWZos3Ymb7ZL2ce\/s2048\/Side+View.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Side View\" border=\"0\" data-original-height=\"1536\" data-original-width=\"2048\" height=\"240\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiw01FFvkRF5xGLRnHb9W5DK_cp5wuc51kgzfZA3U86_uYl3UieW4latJ4bN03qFqSSZlC5hCxhvqJpk-w0QpVXZZtzUJDc1rGmIHkgFBb8_Y24h2aJmRWgf5YK_i2JxeWZos3Ymb7ZL2ce\/w320-h240\/Side+View.jpg\" title=\"Side View\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ESide View\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nFor tuner section I used AN7223 and TA7343 and for PLL here I used LM7001 low cost IC. JQ8400 used for USB function and it controlled by a PIC16F690 microcontroller.  U can use any Bluetooth audio module for this. I used MH-M18 Bluetooth module for this. \n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgpg0jnB7J9xrR9RSB5ZIcAgj-bZwBtpSs60BQ9ghMAhIcwKVzDzhEc-DY6nMwHzhyFMDbIbXzUKlvz9ElAsPBcIOzK9s_WaZNVE-G9-wker6r5819WuH4ic4q_jNk-TbZaNAHhKlUXoB9S\/s781\/jq8400+module+pin.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"JQ8400 Module\" border=\"0\" data-original-height=\"646\" data-original-width=\"781\" height=\"264\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgpg0jnB7J9xrR9RSB5ZIcAgj-bZwBtpSs60BQ9ghMAhIcwKVzDzhEc-DY6nMwHzhyFMDbIbXzUKlvz9ElAsPBcIOzK9s_WaZNVE-G9-wker6r5819WuH4ic4q_jNk-TbZaNAHhKlUXoB9S\/w320-h264\/jq8400+module+pin.jpg\" title=\"JQ8400 Module\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EJQ8400 Module\u003Cbr \/\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh57wOj4cHBh8JSKT4MAyLJbdZ7-gNKIkT3oEYVSmWTY841rycIDP-3kPq1KZRJ0sddUpwIHegHePQ24tP7ahTylAp4sKWsr5Fv2J8Q8HE-IiAVyeeMMisXwj9Fkf7WtSrt_XGomKZAHGh-\/s617\/-2016744598-1167099602.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Bluetooth Module\" border=\"0\" data-original-height=\"472\" data-original-width=\"617\" height=\"245\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh57wOj4cHBh8JSKT4MAyLJbdZ7-gNKIkT3oEYVSmWTY841rycIDP-3kPq1KZRJ0sddUpwIHegHePQ24tP7ahTylAp4sKWsr5Fv2J8Q8HE-IiAVyeeMMisXwj9Fkf7WtSrt_XGomKZAHGh-\/w320-h245\/-2016744598-1167099602.jpg\" title=\"Bluetooth Module\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EBluetooth Module\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nPlease read my previous post for detailed information about \u003Ca href=\"https:\/\/scopionz.blogspot.com\/2015\/06\/pll-synthesized-fm-receiver-pic16f88.html\" rel=\"nofollow\" target=\"_blank\"\u003EPLL FM tuner\u003C\/a\u003E and \u003Ca href=\"https:\/\/scopionz.blogspot.com\/2020\/08\/jq8400-mp3-voice-module-microe-c-code.html\" rel=\"nofollow\" target=\"_blank\"\u003Ejq8400\u003C\/a\u003E. I wrote a small sample program for control this unit and u can modify it according to your need. Don’t use relay. Just connect I2C directly to R37 \u0026amp; R39.\n\u003Cbr \/\u003E\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiGfPPHu3DeBZFHXMMp7mV2Ke2aaEoe9SFrpP3yraZNEhpr1dcY5jEcOqfxms5Vnw_HuKQ3Shu45-we5nNg9n3BJi2RcpnXl7SL9shCli6AP3E7iIBB-qROIldfm4W9FRnGMggfO-xf1IOe\/s1890\/audio+player.jpg\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Control Circuit\" border=\"0\" data-original-height=\"1482\" data-original-width=\"1890\" height=\"251\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiGfPPHu3DeBZFHXMMp7mV2Ke2aaEoe9SFrpP3yraZNEhpr1dcY5jEcOqfxms5Vnw_HuKQ3Shu45-we5nNg9n3BJi2RcpnXl7SL9shCli6AP3E7iIBB-qROIldfm4W9FRnGMggfO-xf1IOe\/w320-h251\/audio+player.jpg\" title=\"Control Circuit\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EControl Circuit\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ch4 style=\"text-align: left;\"\u003E\n\u003Cu\u003EUsage of usb command\u003C\/u\u003E\n\u003C\/h4\u003E\n\u003Cmyquote\u003E\/\/ --------- commands -----------------\nWrite_Df(0x06,0,0); \/\/ mp3 next\nWrite_Df(0x05,0,0); \/\/ mp3 prev\nWrite_Df(0x02,0,0); \/\/ mp3 play\nWrite_Df(0x03,0,0); \/\/ mp3 pause\nWrite_Df(0x04,0,0); \/\/ mp3 stop\nWrite_Df(0x21,0,0); \/\/ mp3 random\nWrite_Df(0xA3,0,5); \/\/ mp3 ff 5s\nWrite_Df(0xA2,0,5); \/\/ mp3 fr 5s\nwrite_Df(0x87,Cur_Tr\u0026gt;\u0026gt;8,Cur_Tr); \/\/ mp3 track play (max 9999)\u003C\/myquote\u003E\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nMikro c source code for Control circuit, source code for PLL FM, Hex file for jq8400 controller and PCB file and circuit are in download section. Hope you like it.\n\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\u003C\/div\u003E\u003Ch3 class=\"trigger\"\u003E\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\u003Cdiv class=\"toggle_container\"\u003E\u003Cdiv class=\"block\"\u003E\n\u003Cblockquote class=\"tr_bq\"\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/PLL_FM_demo\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EPLL FM Code\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/Audio_sample\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EController Code\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/amp_df_hex\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EJQ8400 Controller HEX\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/audio_ply_pcb\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EPCB And Sch File\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\n\u003C\/blockquote\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cbr \/\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/4305931222798994858\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/11\/an7223-lm7001-pll-fm-stereo-tuner.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/4305931222798994858"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/4305931222798994858"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/11\/an7223-lm7001-pll-fm-stereo-tuner.html","title":"AN7223 LM7001 PLL FM Stereo Tuner, JQ8400 USB MP3, Bluetooth Audio Player - 16F690"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh3LigyGY9NGCqalQV1gtgbhcYmZFqdf1tlBKPLaKf1NhE5YNEEJ9DUipuZdSFC1Ir19RC549E9OrVjzu5EjvmYjk2ax8HD3OIvpsKxuhJQFta1HTPwEHe9Cq0amsQLk-AbkP2xzqmVHcKc\/s72-w320-h187-c\/usb_fm.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-32110019653302513"},"published":{"$t":"2020-08-06T20:45:00.003+05:30"},"updated":{"$t":"2020-11-01T14:09:32.034+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Audio"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Uart"},{"scheme":"http://www.blogger.com/atom/ns#","term":"USB"}],"title":{"type":"text","$t":"JQ8400 MP3 Voice Module Microe C code"},"content":{"type":"html","$t":"Previously I wrote a post about well-known voice module of \u003Ca href=\"https:\/\/scopionz.blogspot.com\/2019\/02\/uart-controlled-df-player-mikroc-code.html\" rel=\"nofollow\" target=\"_blank\"\u003EDFPlayer Mini\u003C\/a\u003E. Today I would like to write a post of advance chip, JQ8400. The main advantages of this chip are;\n\u003Cbr \/\u003E\u003Cul style=\"text-align: left;\"\u003E\u003Cli\u003EInquiry of the file name\n\u003C\/li\u003E\u003Cli\u003EInquiry of duration of the current audio\u003C\/li\u003E\u003Cli\u003EInquiry of playback duration \u003C\/li\u003E\u003Cli\u003EFast backward\n\u003C\/li\u003E\u003Cli\u003EFast forward, etc.\n\u003C\/li\u003E\u003C\/ul\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg5uVA1h12iVI3ycCUH9LsLsCM8Q-ARne2rS3Zz5yjbIjXQf26A1zvyLKkZ0SDpi2bcVjnXqpZxbNf83It8fDweD5z9KPQ_54srqGbfjbCLO953lLFf4wUI2pbYDl1zS8_oreTSHhwj4Qos\/s690\/jq8400+module.jpg\" style=\"display: block; margin-left: auto; margin-right: auto; padding: 1em 0px;\"\u003E\u003Cimg alt=\"jq8400 module\" border=\"0\" data-original-height=\"470\" data-original-width=\"690\" height=\"178\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg5uVA1h12iVI3ycCUH9LsLsCM8Q-ARne2rS3Zz5yjbIjXQf26A1zvyLKkZ0SDpi2bcVjnXqpZxbNf83It8fDweD5z9KPQ_54srqGbfjbCLO953lLFf4wUI2pbYDl1zS8_oreTSHhwj4Qos\/w262-h178\/jq8400+module.jpg\" title=\"Jq8400 module\" width=\"262\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EJq8400 Module\u003Cbr \/\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\nJQ8400 module is a SOC solution that combines a 16bit MCU with an ADSP specialized in audio decoding. By using hardware decoding method, it ensures system stability, quality of sound, and small footprint matching requirements of embedded applications. For the flexibility of R\u0026amp;D, control commands can be sent via one-line mode or RS232 serial communication.\u003Cbr \/\u003E\nIt adopts full duplex serial communication protocol: Baud rate 9600, 8-bit data, no parity and 1 stop bit.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch4 style=\"text-align: left;\"\u003E\n\u003Cu\u003EMessage Format\u003C\/u\u003E\n\u003C\/h4\u003E\nStarting Code + Command Code + Data Length + Data 1 – Data n + Checksum\n\u003Cbr \/\u003E\n\u003Cul style=\"text-align: left;\"\u003E\u003Cli\u003E\nStarting Code:  fixed as “AA” (in hex) \n\u003C\/li\u003E\u003Cli\u003ECommand Code:  01 – 26 (in hex) \n\u003C\/li\u003E\u003Cli\u003EData Length:  respective data bytes in commands; length=1 stands for command only, no data.\u003C\/li\u003E\u003Cli\u003EChecksum:  The low byte of the sum of all the bytes before the checksum byte.\n\u003C\/li\u003E\u003Cli\u003EData format: high 8-bit first, low 8-bit second.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003C\/li\u003E\u003C\/ul\u003E\u003Ch4 style=\"text-align: left;\"\u003E\n\u003Cu\u003ECommunication Mechanism\u003C\/u\u003E\u003C\/h4\u003E\nDefault power-on state is idle and listening for commands from MCU as a guest\nThe module will not initiate communication and a MCU must take initiative.\nThe TTL level of the serial port is 3.3V. Use a 1K ohm resistor if connecting with a 5V MCU.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiMqndA_9B1jDou2cl4gfngPCO6DwcCeaq87zkcyq6HY5WLdT2hL3M7qOSNZGjOmxHS4vfGHQKD0-K6kpfAnvXXALnuqBl4HcQhZIxHTe00MbrOLbjVIv_mU_BhaHh010FMDol1BigS0ZQd\/s781\/jq8400+module+pin.jpg\" style=\"display: block; margin-left: auto; margin-right: auto; padding: 1em 0px;\"\u003E\u003Cimg alt=\"jq8400 module pin\" border=\"0\" data-original-height=\"646\" data-original-width=\"781\" height=\"270\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiMqndA_9B1jDou2cl4gfngPCO6DwcCeaq87zkcyq6HY5WLdT2hL3M7qOSNZGjOmxHS4vfGHQKD0-K6kpfAnvXXALnuqBl4HcQhZIxHTe00MbrOLbjVIv_mU_BhaHh010FMDol1BigS0ZQd\/w328-h270\/jq8400+module+pin.jpg\" title=\"jq8400 module pin\" width=\"328\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EJq8400 Module Pin Details\u003Cbr \/\u003E\u003C\/td\u003E\u003C\/tr\u003E\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ch4 style=\"text-align: left;\"\u003E\n\u003Cu\u003ECode\u003C\/u\u003E\u003C\/h4\u003E\n\u003Cmyquote\u003E\nunsigned short df_wr[] = {0xAA,0,0,0,0,0};\n\u003Cbr \/\u003E\nvoid write_jq_cmd(char cmd, char data_h, char data_l, char len) \/\/jq cmd data\n{\n\u0026nbsp; char m;\n\u003Cbr \/\u003E\n\u0026nbsp; Delay_ms(200);\n\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[1]= cmd;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[2]= len;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[3]= data_h;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[4]= data_l;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[5]= data_h + data_l + len + df_wr[1] + 0xAA;\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;for (m=0; m\u0026lt;6; m++) {\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Delay_ms(1);\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(len==0 \u0026amp;\u0026amp; m==3) m=5; \/\/(AA 02 00 AC) skip data_h data_l\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(len==1 \u0026amp;\u0026amp; m==3) m=4; \/\/(AA 18 01 03 C6) skip data_h\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; UART1_Write(df_wr[m]);\u0026nbsp; \/\/aa, cmd, len, dh, dl, sm\n\u0026nbsp;\u0026nbsp; }\n\u0026nbsp;\u0026nbsp; Delay_ms(10);\n}\u003C\/myquote\u003E\n\u003Cbr \/\u003E\n\u003Ch4 style=\"text-align: left;\"\u003E\n\u003Cu\u003EUsage\u003C\/u\u003E\u003C\/h4\u003E\n\u003Cmyquote\u003E\nwrite_jq_cmd(0x02, 0,0, 0); \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\/\/Play\nwrite_jq_cmd(0x03, 0,0, 0); \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\/\/Pause\nwrite_jq_cmd(0x13, 0,27, 1); \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\/\/Set volume to 27\nwrite_jq_cmd(0x07, 0x00,0xF4, 2); \/\/Play 244th track\nwrite_jq_cmd(0x07, 0x01,0xF4, 2); \/\/Play 500th track\nwrite_jq_cmd(0x23, 0x00,0x0A, 2); \/\/FF 10 seconds\u003C\/myquote\u003E\n\n\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\u003C\/div\u003E\u003Ch3 class=\"trigger\"\u003E\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\u003Cdiv class=\"toggle_container\"\u003E\u003Cdiv class=\"block\"\u003E\u003Cblockquote class=\"tr_bq\"\u003E\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/jq8400_data\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EDatasheet\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\u003C\/blockquote\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cbr \/\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/32110019653302513\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/08\/jq8400-mp3-voice-module-microe-c-code.html#comment-form","title":"1 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/32110019653302513"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/32110019653302513"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/08\/jq8400-mp3-voice-module-microe-c-code.html","title":"JQ8400 MP3 Voice Module Microe C code"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg5uVA1h12iVI3ycCUH9LsLsCM8Q-ARne2rS3Zz5yjbIjXQf26A1zvyLKkZ0SDpi2bcVjnXqpZxbNf83It8fDweD5z9KPQ_54srqGbfjbCLO953lLFf4wUI2pbYDl1zS8_oreTSHhwj4Qos\/s72-w262-h178-c\/jq8400+module.jpg","height":"72","width":"72"},"thr$total":{"$t":"1"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-169065397911560430"},"published":{"$t":"2020-05-05T20:36:00.000+05:30"},"updated":{"$t":"2020-05-05T20:47:20.527+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"18F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Programmer"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Tools"},{"scheme":"http://www.blogger.com/atom/ns#","term":"USB"}],"title":{"type":"text","$t":"OProg - Open Source USB Programmer - 18F2550"},"content":{"type":"html","$t":"Recently I found a programmer from internet. This programmer is completely free and open source. It used few components and working well. I make some changes to it. You can find the original one from  \u003Ca href=\"http:\/\/openprog.altervista.org\/OP_eng.html\" target=\"_blank\"\u003Ehere\u003C\/a\u003E.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhT-oEYgaxWviiPoIa0R_IwdNY217s628MQpSPocMNDZzbStWL_aOS49APKmnJyyYPm1vntiYVdOL3I9B9t97JkgVcjPbn32yqc1USaI9J9wQcQIlyqNI-xE2oChXuShUVMM_MFXVi6cwRB\/s1600\/OPROG.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"OPROG Prototype\" border=\"0\" data-original-height=\"1133\" data-original-width=\"1600\" height=\"226\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhT-oEYgaxWviiPoIa0R_IwdNY217s628MQpSPocMNDZzbStWL_aOS49APKmnJyyYPm1vntiYVdOL3I9B9t97JkgVcjPbn32yqc1USaI9J9wQcQIlyqNI-xE2oChXuShUVMM_MFXVi6cwRB\/s320\/OPROG.jpg\" title=\"OPROG Prototype\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EPrototype\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nAdvantages of this programmer are;\u003Cbr \/\u003E\n\u003Cul\u003E\u003Cli\u003ECompletely free and Open Source (including firmware)\u003C\/li\u003E\n\u003Cli\u003EPrograms PIC, dsPIC, ATMEL, EEPROM (I2C, SPI, MicroWire, OneWire, UNIO) \u003C\/li\u003E\n\u003Cli\u003ECan work as ICD debugger\u003C\/li\u003E\n\u003Cli\u003EUSB 2.0 Full Speed interface\u003C\/li\u003E\n\u003Cli\u003ESelf-powered\u003C\/li\u003E\n\u003Cli\u003EDoesn't need drivers\u003C\/li\u003E\n\u003Cli\u003EHardware generated timings for maximum speed and reliability (writes an 18F2550 in 15s)\u003C\/li\u003E\n\u003Cli\u003EOpen source control programs for Linux and Windows\u003C\/li\u003E\n\u003C\/ul\u003E\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhZx6pxDSUyi7ophWlRjXlTjcz-LVnD9G2tABJzX6KZOBq0hrIPLqm_fGYe_FrEUcHOjXIvWrQtu2KxK-lvgMm4FHRsTxoj_spRp5CYeOA-gP_eWOKm4nh61BRXcLdXb0dd9zd-e_5JhaA-\/s1600\/OPROG+sch.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"OPROG diagram\" border=\"0\" data-original-height=\"1132\" data-original-width=\"1600\" height=\"226\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhZx6pxDSUyi7ophWlRjXlTjcz-LVnD9G2tABJzX6KZOBq0hrIPLqm_fGYe_FrEUcHOjXIvWrQtu2KxK-lvgMm4FHRsTxoj_spRp5CYeOA-gP_eWOKm4nh61BRXcLdXb0dd9zd-e_5JhaA-\/s320\/OPROG+sch.jpg\" title=\"OPROG schematic\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ESchematic\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nMain controller is PIC18F2550, and Supply directly get from PC USB port. HEX, PCB, Schematic and PC software can download from below. And  for latest updates and full description please follow the Open Programmer site.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\u003C\/div\u003E\u003Ch3 class=\"trigger\"\u003E\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\u003Cdiv class=\"toggle_container\"\u003E\u003Cdiv class=\"block\"\u003E\u003Cblockquote class=\"tr_bq\"\u003E\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/open_prog\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003ESchematic, PCB, PC-App and Hex\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\u003C\/blockquote\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cbr \/\u003E\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/169065397911560430\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/05\/oprog-open-source-usb-programmer-18f2550.html#comment-form","title":"1 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/169065397911560430"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/169065397911560430"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/05\/oprog-open-source-usb-programmer-18f2550.html","title":"OProg - Open Source USB Programmer - 18F2550"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhT-oEYgaxWviiPoIa0R_IwdNY217s628MQpSPocMNDZzbStWL_aOS49APKmnJyyYPm1vntiYVdOL3I9B9t97JkgVcjPbn32yqc1USaI9J9wQcQIlyqNI-xE2oChXuShUVMM_MFXVi6cwRB\/s72-c\/OPROG.jpg","height":"72","width":"72"},"thr$total":{"$t":"1"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-6948529515935856864"},"published":{"$t":"2020-04-19T11:26:00.001+05:30"},"updated":{"$t":"2020-04-19T11:26:09.072+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"16F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Audio"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Indicator"},{"scheme":"http://www.blogger.com/atom/ns#","term":"LED"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"}],"title":{"type":"text","$t":"7 Band Real Time Audio Spectrum Analyzer Circuit - 16F819 BA3834S"},"content":{"type":"html","$t":"\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/thumbs.gfycat.com\/DifficultAllAphid-small.gif\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"16F819 Audio Spectrum Analyzer\" border=\"0\" data-original-height=\"251\" data-original-width=\"335\" height=\"149\" src=\"https:\/\/thumbs.gfycat.com\/DifficultAllAphid-small.gif\" title=\"16F819 Audio Spectrum Analyzer\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003E\u003Cspan style=\"font-size: xx-small; text-align: start;\"\u003E16F819 Audio Spectrum Analyzer\u003C\/span\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nThis is the new version of my previous \u003Ca href=\"https:\/\/scopionz.blogspot.com\/2014\/10\/real-time-audio-spectrum-analizer.html\" target=\"_blank\"\u003Espectrum analyzer\u003C\/a\u003E. Used PIC16F819 microcontroller and BA3834 Band-pass filter for spectrum analyzer. It has two versions, BA3834S and BA3834F. Here i used BA3834S. BA3834 are 7-band, band-pass filter ICs that use microprocessor time division to produce serial output for spectrum analyzer displays. To minimize the number of attached components required and enable compact and reliable designs, all of the capacitors for the filters are on the chip. So we can build spectrum analyzer easily\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhWH1qfio7ZYxnS7KfSde2xICOqiBVSN6Z0OEH2hYgRcSiqsAzPAQcZwtGdTwncSPH36J-3qKCHY_XtOlW6ndbGcztc4ZXIqOqj1FyXZndjKsWPbp10ZgXvz1EJ3z1iJOx8-vcu7R-3RI3-\/s1600\/16f819+analizer+circuit.JPG\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"16f819 analizer circuit\" border=\"0\" data-original-height=\"352\" data-original-width=\"766\" height=\"183\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhWH1qfio7ZYxnS7KfSde2xICOqiBVSN6Z0OEH2hYgRcSiqsAzPAQcZwtGdTwncSPH36J-3qKCHY_XtOlW6ndbGcztc4ZXIqOqj1FyXZndjKsWPbp10ZgXvz1EJ3z1iJOx8-vcu7R-3RI3-\/s400\/16f819+analizer+circuit.JPG\" title=\"16f819 analizer circuit\" width=\"400\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EAnalizer circuit\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nThis circuit included 11 modes (9 patterns, off and random) and it shows which pattern currently running at start-up (S1, S2, etc.). In off mode it shows S0 on display and S+ for random mode. The pattern mode saved to Eeprom to run at next power up. In random mode it changes its pattern in every 3.5 minutes.\u003Cbr \/\u003E\nPCB, Circuit, and hex available in below\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhbCcdd45akEKo7M6mQdepAcMDk7x18ew1k030kXenxYHy4QaJ8IjZTP3cv13cXf3EvoMymDbvKh9SEIAh8ik3lp6N7ylgSzGWHRpHCPrpzweogGa9QRswqEv1v3PPWK3eElZd7NqZ6bM50\/s1600\/16f819+analizer.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"16f819 analizer\" border=\"0\" data-original-height=\"472\" data-original-width=\"1026\" height=\"90\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhbCcdd45akEKo7M6mQdepAcMDk7x18ew1k030kXenxYHy4QaJ8IjZTP3cv13cXf3EvoMymDbvKh9SEIAh8ik3lp6N7ylgSzGWHRpHCPrpzweogGa9QRswqEv1v3PPWK3eElZd7NqZ6bM50\/s200\/16f819+analizer.jpg\" title=\"16f819 analizer\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh1jJad2aAx-S55incUDDQG8gI1-tfH525duT1YIMp2mpiib7cVRSUf94NP9YKzhPS19iU-_zB0BoOG0kpy0wr52dEmOxUEwXiRpJBU42wo3kaYJzd86MvU0tFVTqO8F5zIDCVgzIt_T3l_\/s1600\/16f819+analizer+pcb.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"16f819 analizer pcb\" border=\"0\" data-original-height=\"853\" data-original-width=\"1600\" height=\"105\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh1jJad2aAx-S55incUDDQG8gI1-tfH525duT1YIMp2mpiib7cVRSUf94NP9YKzhPS19iU-_zB0BoOG0kpy0wr52dEmOxUEwXiRpJBU42wo3kaYJzd86MvU0tFVTqO8F5zIDCVgzIt_T3l_\/s200\/16f819+analizer+pcb.jpg\" title=\"16f819 analizer pcb\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjp9GIJ9UYZ38bSdi21uLodqkpS3WxdDgrxiYJ17W7vJXfRwiSYhmu7WNIjnpW6KFEBnlRXbxm6aKwKny4nQiyaOMtLFM11biv6mrT6btvMzXHLVxDkxxhLR0Gt2HCWrSAbrdS5ikZicazo\/s1600\/16f819+analizer+pcb+b.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"16f819 analizer pcb\" border=\"0\" data-original-height=\"696\" data-original-width=\"1600\" height=\"85\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjp9GIJ9UYZ38bSdi21uLodqkpS3WxdDgrxiYJ17W7vJXfRwiSYhmu7WNIjnpW6KFEBnlRXbxm6aKwKny4nQiyaOMtLFM11biv6mrT6btvMzXHLVxDkxxhLR0Gt2HCWrSAbrdS5ikZicazo\/s200\/16f819+analizer+pcb+b.jpg\" title=\"16f819 analizer pcb\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003Ciframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https:\/\/www.blogger.com\/video.g?token=AD6v5dzIf2jPeOPs9PKcs3e9qI3_qJLCWR6mzfPKrwduHJj-PVDhlYZJUsZKSJSHzLgFUnv0OzEzl1D5xBKEgt3nEw' class='b-hbp-video b-uploaded' frameborder='0'\u003E\u003C\/iframe\u003E\u003C\/div\u003E\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\u003C\/div\u003E\u003Ch3 class=\"trigger\"\u003E\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\u003Cdiv class=\"toggle_container\"\u003E\u003Cdiv class=\"block\"\u003E\u003Cblockquote class=\"tr_bq\"\u003E\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/16f819_anz\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003ESchematic, PCB and Hex\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\u003C\/blockquote\u003E\u003C\/div\u003E\u003C\/div\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/6948529515935856864\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/04\/7-band-real-time-audio-spectrum.html#comment-form","title":"1 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/6948529515935856864"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/6948529515935856864"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2020\/04\/7-band-real-time-audio-spectrum.html","title":"7 Band Real Time Audio Spectrum Analyzer Circuit - 16F819 BA3834S"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhWH1qfio7ZYxnS7KfSde2xICOqiBVSN6Z0OEH2hYgRcSiqsAzPAQcZwtGdTwncSPH36J-3qKCHY_XtOlW6ndbGcztc4ZXIqOqj1FyXZndjKsWPbp10ZgXvz1EJ3z1iJOx8-vcu7R-3RI3-\/s72-c\/16f819+analizer+circuit.JPG","height":"72","width":"72"},"thr$total":{"$t":"1"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-5071799516182466562"},"published":{"$t":"2019-02-02T13:29:00.002+05:30"},"updated":{"$t":"2020-11-01T14:09:19.087+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"16F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Audio"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Uart"},{"scheme":"http://www.blogger.com/atom/ns#","term":"USB"}],"title":{"type":"text","$t":"Uart Controlled DF Player Mikroc Code - 16F628A"},"content":{"type":"html","$t":"\u0026nbsp; The DFPlayer Mini MP3 Player is a small and low cost MP3  module with an simplified output directly to the speaker. The module can  be used as a stand alone module with attached battery, speaker and push  buttons or used in combination with a PIC, Arduino or any other with  RX\/TX capabilities. For this project, I would control the MP3 Player  module with a microcontroller and RS232.\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: left;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhsFcG-KjI8BW2Aru3DxxQLNx4m1TanmlbzwWV9SurXbofbWrp3fbtC6PWV_gBytj1RLUMA3kqG6wtfLZ-b7tz_eP2yH-wy__WTJmB7hHMVf5KkNCyTAQq7Sey7yLY1A-PgsyZ_5GOIYR7t\/s1600\/df_player.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DF Player\" border=\"0\" data-original-height=\"600\" data-original-width=\"600\" height=\"200\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhsFcG-KjI8BW2Aru3DxxQLNx4m1TanmlbzwWV9SurXbofbWrp3fbtC6PWV_gBytj1RLUMA3kqG6wtfLZ-b7tz_eP2yH-wy__WTJmB7hHMVf5KkNCyTAQq7Sey7yLY1A-PgsyZ_5GOIYR7t\/s200\/df_player.jpg\" title=\"DF Player\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDF Player \u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\n\u0026nbsp; The DF Player module has all the features which a MP3 player should  have. Including advance equalizers, looping and shuffling functions. But  here I will show you how to build a simple player with Play\/Pause,  Next\/Preview and vol Up\/Down functions. Later you can add more features.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhdeuBZBlDr_Sxle1xLouHl_P3x7qvV1v8mhv865Bkp1VKOEl6nI9UbCj_dOZtZ0__uYw1A_yP6dyOXXg_-u23Ppmp_RsQK9lHUY1e90cHQyPTjp9ZjEERuoYw8oj2iCm4CbR63QzVxeVJc\/s1600\/dfplayer-pin.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DF Player Pin\" border=\"0\" data-original-height=\"316\" data-original-width=\"488\" height=\"207\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhdeuBZBlDr_Sxle1xLouHl_P3x7qvV1v8mhv865Bkp1VKOEl6nI9UbCj_dOZtZ0__uYw1A_yP6dyOXXg_-u23Ppmp_RsQK9lHUY1e90cHQyPTjp9ZjEERuoYw8oj2iCm4CbR63QzVxeVJc\/s320\/dfplayer-pin.jpg\" title=\"DF Player Pin\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDF Player Pin\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003E\u003C\/div\u003E\u003Ch4\u003E\u003Cu\u003ESpecifications:\u003C\/u\u003E\u003C\/h4\u003E\u003Cul\u003E\u003Cli\u003ESupported sampling rates (kHz): 8\/11.025\/12\/16\/22.05\/24\/32\/44.1\/48\u003C\/li\u003E\n\u003Cli\u003E24 -bit DAC output, support for dynamic range 90dB , SNR support 85dB\u003C\/li\u003E\n\u003Cli\u003EFully supports FAT16 , FAT32 file system, maximum support 32G of the TF card, support 32G of U disk, 64M bytes NORFLASH\u003C\/li\u003E\n\u003Cli\u003EA variety of control modes, I\/O control mode, serial mode, AD button control mode \u003C\/li\u003E\n\u003Cli\u003EAudio data sorted by folder, supports up to 100 folders, every folder can hold up to 255 songs\u003C\/li\u003E\n\u003Cli\u003E30 level adjustable volume\u003C\/li\u003E\n\u003Cli\u003E6 -level EQ adjustable\u003C\/li\u003E\n\u003C\/ul\u003E\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhhPqS9T5Qc1yE8EDNHKQSivSzfROcgdvrk2bp4m3tKQo8_2fitk27G9xwCV2UjdH8LLFtRE4MKhnsaag_wU0t-DeyrX7geAwvODt5J3Hj6lmFgbL8amXOKtEJQ2ynHJCpHb7GxZAJj3Qum\/s1600\/MP3-PLAY+-+Layout01.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Stand-alone Circuit\" border=\"0\" data-original-height=\"274\" data-original-width=\"550\" height=\"158\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhhPqS9T5Qc1yE8EDNHKQSivSzfROcgdvrk2bp4m3tKQo8_2fitk27G9xwCV2UjdH8LLFtRE4MKhnsaag_wU0t-DeyrX7geAwvODt5J3Hj6lmFgbL8amXOKtEJQ2ynHJCpHb7GxZAJj3Qum\/s320\/MP3-PLAY+-+Layout01.jpg\" title=\"Stand-alone Circuit\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EStand-alone Circuit\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Ch4\u003E\u003Cu\u003ECircuit:\u003C\/u\u003E\u003C\/h4\u003E\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgKzSCj9PPHWQfGVPdWU6YCHKkoEk4qhlm3BHg02xVQuii9Y2rLIbj1TYAcP41DvWh6sVYyNXw7SEqdEiTGVe18d0VIp8GwdTda1nGYaYU_FfyWSm7DX502sa8QzMqcDzZdUnTJcsF_jvkh\/s1600\/df+player.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DF Palyer Circuit\" border=\"0\" data-original-height=\"321\" data-original-width=\"476\" height=\"215\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgKzSCj9PPHWQfGVPdWU6YCHKkoEk4qhlm3BHg02xVQuii9Y2rLIbj1TYAcP41DvWh6sVYyNXw7SEqdEiTGVe18d0VIp8GwdTda1nGYaYU_FfyWSm7DX502sa8QzMqcDzZdUnTJcsF_jvkh\/s320\/df+player.jpg\" title=\"DF Palyer Circuit\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDF Palyer Circuit\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nIn this circuit I used PIC16F628A and its configure to run using its internal oscillator. For sending commands to the PIC i used uart terminal that built in with Mikroc and u need a TTL converter module fo that. Rx pin of df player connected to the PIC's Tx and Rx pin of PIC connected to the TTL converter's Tx.\u003Cbr \/\u003E\nRx pin of TTL converter connected to the df player's Tx (optional)\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"float: left; margin-right: 1em; text-align: left;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEitdbHR-uS3fgAUkbL_33ASg0CX8un_O2OnDJD1M8FxhE23UwW3LBUtd2Yc4Bz0_4JJ4Ax3BhpiRx99ezp_AJWuKR39m2zUrCtTx35GhYLEO_b-8KM_t2d5NVsP3_oV16wifb5e8Ageg2G1\/s1600\/Uart+TTL+Module.jpg\" imageanchor=\"1\" style=\"clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Uart TTL Module\" border=\"0\" data-original-height=\"355\" data-original-width=\"562\" height=\"125\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEitdbHR-uS3fgAUkbL_33ASg0CX8un_O2OnDJD1M8FxhE23UwW3LBUtd2Yc4Bz0_4JJ4Ax3BhpiRx99ezp_AJWuKR39m2zUrCtTx35GhYLEO_b-8KM_t2d5NVsP3_oV16wifb5e8Ageg2G1\/s200\/Uart+TTL+Module.jpg\" title=\"Uart TTL Module\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EUart TTL Module\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh7GBxQkD_Uq9p8DviSOkb3PAnj2k6yNrwDMZvxd6b7ROUK36ky6LDQEOwM55P2edX9wYCcGsM-yUokBIH5qxiVUlvsoGbr8gQFrXe-D1orS35d_7woUUmeeSIkdZpVAXxDd7ba71XKMXgP\/s1600\/USB+TTL+Module.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"USB TTL Module\" border=\"0\" data-original-height=\"322\" data-original-width=\"414\" height=\"155\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh7GBxQkD_Uq9p8DviSOkb3PAnj2k6yNrwDMZvxd6b7ROUK36ky6LDQEOwM55P2edX9wYCcGsM-yUokBIH5qxiVUlvsoGbr8gQFrXe-D1orS35d_7woUUmeeSIkdZpVAXxDd7ba71XKMXgP\/s200\/USB+TTL+Module.jpg\" title=\"USB TTL Module\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EUSB TTL Module\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\nConnect circuit as above and plug usb or TF card.Then open uart terminal and enter commands as below..\u003Cbr \/\u003E\nr - Play, s - Pause, n - Next, p - Previous, u - Vol+, d - Vol-.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhS6PDNEkOOTnJh37RjrV9sUmHtznWi13QN98ZY2nNANi2fCep8Oz9MFDErzhBYo8VFgekQbls3QR0f-O3m0wbbu3RKwHyNYWJvL5j_27f7ppA7bydkoQ19YgRnaeexmwZ_vHBc4QOG1Hhx\/s1600\/df+palyer+connection.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"df palyer connection\" border=\"0\" data-original-height=\"1005\" data-original-width=\"1600\" height=\"200\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhS6PDNEkOOTnJh37RjrV9sUmHtznWi13QN98ZY2nNANi2fCep8Oz9MFDErzhBYo8VFgekQbls3QR0f-O3m0wbbu3RKwHyNYWJvL5j_27f7ppA7bydkoQ19YgRnaeexmwZ_vHBc4QOG1Hhx\/s320\/df+palyer+connection.jpg\" title=\"df palyer connection\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDf palyer connection\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg-RLbXnQPlh8AS4l3mEEshI5sfx6nGsP2R3B3UVLE1hI6MXjWLwHvflQL9nBjJlw0mt3_MRDXasHCC86kY1oYUpo6lV4NiJx3T6Qr-hC4Z4WB8-fAD9Qnj-kHSXOhC36llbx3Yuo9cs2Wl\/s1600\/Df+circuit+in+dot+board.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Circuit in dot board\" border=\"0\" data-original-height=\"768\" data-original-width=\"756\" height=\"320\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEg-RLbXnQPlh8AS4l3mEEshI5sfx6nGsP2R3B3UVLE1hI6MXjWLwHvflQL9nBjJlw0mt3_MRDXasHCC86kY1oYUpo6lV4NiJx3T6Qr-hC4Z4WB8-fAD9Qnj-kHSXOhC36llbx3Yuo9cs2Wl\/s320\/Df+circuit+in+dot+board.jpg\" title=\"Circuit in dot board\" width=\"315\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ECircuit in dot board\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\u003Ch4\u003E\u003Cu\u003ECode:\u003C\/u\u003E\u003C\/h4\u003EThis code was written by using mikroC PRO for PIC v6.\u003Cbr \/\u003E\n\u003Cmyquote class=\"tr_bq\"\u003E\u003Cbr \/\u003E\n\/**************************************************************************\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nDF Player\u003Cbr \/\u003E\nCopyright (C) 2019 Scorpionz\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is free software: you can redistribute it and\/or modify\u003Cbr \/\u003E\nit under the terms of the GNU General Public License as published by\u003Cbr \/\u003E\nthe Free Software Foundation, either version 3 of the License, or\u003Cbr \/\u003E\n(at your option) any later version.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is distributed in the hope that it will be useful,\u003Cbr \/\u003E\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\u003Cbr \/\u003E\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\u003Cbr \/\u003E\nGNU General Public License for more details.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nYou should have received a copy of the GNU General Public License\u003Cbr \/\u003E\nalong with this program.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Email: scorpionzblog@gmail.com\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Blog : scopionz.blogspot.com\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n***************************************************************************\/\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nchar df_rd[10], dump, j, u_data;\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nvoid Write_Df_Data(char cmd, char data_H, char data_L) \/\/------- df data ----\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n\u0026nbsp; char m = 0;\u003Cbr \/\u003E\n\u0026nbsp; char df_wr[] = {0x7E,0xFF,0x06,0,0,0,0,0xEF};\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[3]= cmd;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[5]= data_H;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_wr[6]= data_L;\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp; Delay_ms(100);\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp; for (m=0; m\u0026lt;8; m++) UART1_Write(df_wr[m]);\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp; Delay_ms(300);\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nvoid interrupt() {\u0026nbsp;\u0026nbsp; \/\/-------- interrupt --------------------------------------\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;if (PIR1.RCIF) {\u0026nbsp;\u0026nbsp;\u0026nbsp; \/\/------- Usart interrupt ----------\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; PIE1.RCIE = 0;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; u_data = UART1_Read();\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data==0x7E)\u0026nbsp; {\u0026nbsp;\u0026nbsp;\u0026nbsp; \/\/ check first byte 0x7E\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; for (j=1; j\u0026lt;10; j++) { \/\/ read next 9 bytes 0xFF, 0x06, 0x03, 0x00, 0x00, 0x01, 0xFE, 0xF7, 0xEF\u003Cbr \/\u003E\nNo:\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(UART1_Data_Ready()) {\u0026nbsp;\u0026nbsp;\u0026nbsp; \/\/ Check, is data Ready..?\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; df_rd[j] = UART1_Read();\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; else goto No;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; delay_ms(50);\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(UART1_Data_Ready()) dump = UART1_Read(); \/\/remove duplicate data\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(df_rd[9]==0xEF) { \/\/check last byte 0xEF\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; delay_ms(100);\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(df_rd[3]==0x3C) Write_Df_Data(0x01,0,0); \/\/play next song\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; for (j=0; j\u0026lt;10; j++) df_rd[j]=0;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \/\/clear read buffer\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; else { \/\/------ keyboard commands -------------\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='n') Write_Df_Data(0x01,0,0); \/\/next\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='p') Write_Df_Data(0x02,0,0); \/\/prev\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='u') Write_Df_Data(0x04,0,0); \/\/vol+\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='d') Write_Df_Data(0x05,0,0); \/\/vol-\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='r') Write_Df_Data(0x0D,0,0); \/\/resume\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(u_data=='s') Write_Df_Data(0x0E,0,0); \/\/stop\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp; PIE1.RCIE =1;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp; PIR1.RCIF =0;\u003Cbr \/\u003E\n\u0026nbsp; }\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nvoid main() \u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n\u0026nbsp;PCON.OSCF = 1;\u0026nbsp;\u0026nbsp; \/\/4MHz Internal OSC\u003Cbr \/\u003E\n\u0026nbsp;CMCON\u0026nbsp; |= 0x07;\u0026nbsp; \/\/Disable Comparators\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;INTCON.GIE=1;\u003Cbr \/\u003E\n\u0026nbsp;INTCON.PEIE=1;\u003Cbr \/\u003E\n\u0026nbsp;PIE1.RCIE=1;\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;TRISA = 0x00;\u003Cbr \/\u003E\n\u0026nbsp;TRISB = 0xFE;\u0026nbsp; \/\/Tx Rx\u003Cbr \/\u003E\n\u0026nbsp;PORTA = 0;\u003Cbr \/\u003E\n\u0026nbsp;PORTB = 0;\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;Delay_Ms(3000);\u0026nbsp;\u0026nbsp; \/\/ Df initialization 1.5 ~ 3Sec\u003Cbr \/\u003E\n\u0026nbsp;UART1_Init(9600);\u003Cbr \/\u003E\n}\u003C\/myquote\u003E\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\u003C\/div\u003E\u003Ch3 class=\"trigger\"\u003E\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\u003Cdiv class=\"toggle_container\"\u003E\u003Cdiv class=\"block\"\u003E\u003Cblockquote class=\"tr_bq\"\u003E\u003Cdiv style=\"text-align: center;\"\u003E\u003Ca href=\"http:\/\/tiny.cc\/df_datasheet\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EDatasheet\u003C\/span\u003E\u003C\/a\u003E\u003Cbr \/\u003E\n\u003Ca href=\"http:\/\/tiny.cc\/df_code\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EDF Player Files\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\u003C\/blockquote\u003E\u003C\/div\u003E\u003C\/div\u003E"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/5071799516182466562\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2019\/02\/uart-controlled-df-player-mikroc-code.html#comment-form","title":"2 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/5071799516182466562"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/5071799516182466562"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2019\/02\/uart-controlled-df-player-mikroc-code.html","title":"Uart Controlled DF Player Mikroc Code - 16F628A"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhsFcG-KjI8BW2Aru3DxxQLNx4m1TanmlbzwWV9SurXbofbWrp3fbtC6PWV_gBytj1RLUMA3kqG6wtfLZ-b7tz_eP2yH-wy__WTJmB7hHMVf5KkNCyTAQq7Sey7yLY1A-PgsyZ_5GOIYR7t\/s72-c\/df_player.jpg","height":"72","width":"72"},"thr$total":{"$t":"2"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-636630622355488097"},"published":{"$t":"2019-01-02T11:09:00.000+05:30"},"updated":{"$t":"2019-01-02T11:18:35.006+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"12F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Decoder"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"}],"title":{"type":"text","$t":"Rotary Encoder Decoder Circuit - PIC12F683 Microcontroller"},"content":{"type":"html","$t":"\u0026nbsp;\u0026nbsp;\u0026nbsp;Recently I need a rotary encoder circuit for my amplifier. So I searched the internet and test some circuits and codings I found. But nothing work for me. Some are worked but not accurate. So i decided to build my own.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\n\u003Cu\u003EWhat Is Rotary Encoder\u003C\/u\u003E\u003C\/h3\u003E\n\u003Ctable cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"clear: right; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmH47UtrQ7K2FTV00zaiJXfsPJEiiHv_4-D4nK2bKLYbs6fUzkDzoXsgDWMAYCh_cgjR7nlUweJ2QNIRMk_NFHu9y3dMgAAV2zHcRFtmFNmlQBss5OVBqsl_b-Ibx9jtKZqra6K1WB08jc\/s1600\/encoder.png\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Typical Rotary Encoder\" border=\"0\" data-original-height=\"300\" data-original-width=\"171\" height=\"200\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmH47UtrQ7K2FTV00zaiJXfsPJEiiHv_4-D4nK2bKLYbs6fUzkDzoXsgDWMAYCh_cgjR7nlUweJ2QNIRMk_NFHu9y3dMgAAV2zHcRFtmFNmlQBss5OVBqsl_b-Ibx9jtKZqra6K1WB08jc\/s200\/encoder.png\" title=\"Typical Rotary Encoder\" width=\"112\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ETypical Rotary Encoder\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;A rotary encoder is a special type of switch that converts the motion of the switch (clockwise or counterclockwise) into an output signal that can be used to determine what direction the knob is being rotated. There are many different types of rotary encoders which use different technologies and construction materials, however, today we’ll be looking specifically at quadrature rotary encoders which are the most common for general electronics. They're used in many applications such as the manual volume control or tuning on a car stereo.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;A quadrature rotary encoder is similar to a potentiometer, however, a rotary encoder doesn’t have limiting points in the rotation; it will rotate infinitely in either direction. Quadrature rotary encoders don’t output an absolute, fixed position, but rather have a number of increments per 360 degrees, and each increment consists of digital pulses known as ‘grey code’. Most encoders have detents which give tactile feedback every time they increment, however, you can also get smooth encoders without detents, usually with a higher number of steps per rotation. \u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\n\u003Cu\u003EHow do They Work?\u003C\/u\u003E \u003C\/h3\u003E\n\u003Ctable cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"float: right; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj65Ezou0chP6Q6NA79EsBOo7ykVVZYPy8B5rS17XxO9GvXCXLJuRN5GnsBca0WlnJIjR8Pi4ckyMA4MvWXB7oj-R73AQxhMl5BHBeNraOLHpvHXkcMIEB_fZf_g_F84tu5DUksxMwEZp0w\/s1600\/Rotary+Encoder+Quadrature+Output+Table.JPG\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Quadrature Output Table\" border=\"0\" data-original-height=\"283\" data-original-width=\"455\" height=\"198\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj65Ezou0chP6Q6NA79EsBOo7ykVVZYPy8B5rS17XxO9GvXCXLJuRN5GnsBca0WlnJIjR8Pi4ckyMA4MvWXB7oj-R73AQxhMl5BHBeNraOLHpvHXkcMIEB_fZf_g_F84tu5DUksxMwEZp0w\/s320\/Rotary+Encoder+Quadrature+Output+Table.JPG\" title=\"Quadrature Output Table\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EQuadrature Output Table\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;It has three pins: A, C, and B. C is the common ground for A and B. A and B are the signal pins. When you rotate the knob, A and B come into contact with the common ground pin, in a particular order depending on the direction you are rotating the knob. When each pin comes into contact with the common ground, they produce a signal. These signals are shifted out of phase with each other as one pin connects before the other pin. This is called quadrature encoding. You need to listen to those pins and the way they pulse in order to determine the direction and number of steps.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\n\u003Cu\u003EThe Circuit\u003C\/u\u003E\u003C\/h3\u003E\n\u0026nbsp;\u0026nbsp; In my circuit I used PIC12F683 microcontroller. It configured to run using its internal oscillater at 8Mhz and internal pull up enable for GP1. And used few components. 0.47uf capacitor used to avoid noices making by rotary encoder. GP0 indicate rotation and GP4 and 5 indicate direction.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj5AHvkfLQctQd0s-OOEMdwj1thg7vIHKMD6406nANq_6y1DGomfkz_lYYlLcTG2x0KLPMPnjICVTLEkfp8Um1iqPyTUZuzQ5zQB3iXM5WjfjoMUzt3dhjNCnp54H_LXmY6BQzcRJpRPlL5\/s1600\/Rotary+encoder.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"Rotary Encoder Circuit\" border=\"0\" data-original-height=\"575\" data-original-width=\"1013\" height=\"226\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj5AHvkfLQctQd0s-OOEMdwj1thg7vIHKMD6406nANq_6y1DGomfkz_lYYlLcTG2x0KLPMPnjICVTLEkfp8Um1iqPyTUZuzQ5zQB3iXM5WjfjoMUzt3dhjNCnp54H_LXmY6BQzcRJpRPlL5\/s400\/Rotary+encoder.jpg\" title=\"Rotary Encoder Circuit\" width=\"400\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ERotary Encoder Circuit\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\n\u003Cu\u003EThe Coding\u003C\/u\u003E\u003C\/h3\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;The code was written by using Mikroc Pro for pic.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Cmyquote class=\"tr_bq\"\u003E\/**************************************************************************\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nRotary Encoder\u003Cbr \/\u003E\nCopyright (C) 2019 Scorpionz\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is free software: you can redistribute it and\/or modify\u003Cbr \/\u003E\nit under the terms of the GNU General Public License as published by\u003Cbr \/\u003E\nthe Free Software Foundation, either version 3 of the License, or\u003Cbr \/\u003E\n(at your option) any later version.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is distributed in the hope that it will be useful,\u003Cbr \/\u003E\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\u003Cbr \/\u003E\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\u003Cbr \/\u003E\nGNU General Public License for more details.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nYou should have received a copy of the GNU General Public License\u003Cbr \/\u003E\nalong with this program.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Email: scorpionzblog@gmail.com\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Blog : scopionz.blogspot.com\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n***************************************************************************\/\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n#define SW\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; GPIO.F1\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nvoid Interrupt()\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nINTCON.GIE = 0;\u0026nbsp;\u0026nbsp; \/\/Disable Global Interupt\u003Cbr \/\u003E\n\u0026nbsp; if(INTCON.INTF)\u0026nbsp; \/\/RB0\/INT External Interrupt Flag bit is set\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp; {\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; if(SW) GPIO.F4=1;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; else\u0026nbsp;\u0026nbsp; GPIO.F5=1;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; GPIO.F0=1;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; delay_ms(100);\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; GPIO\u0026nbsp;\u0026nbsp; = 0;\u003Cbr \/\u003E\n\u0026nbsp;\u0026nbsp;\u0026nbsp; }\u003Cbr \/\u003E\nINTCON.INTF = 0; \/\/Clear RB0\/INT External Interrupt Flag bit\u003Cbr \/\u003E\nINTCON.GIE = 1;\u0026nbsp; \/\/Enable Global Interrupt\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nvoid main()\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\nOSCCON = 0x75;\u003Cbr \/\u003E\nADCON0 = 0x00;\u003Cbr \/\u003E\nCMCON0 = 0x07; \/\/ Disable Comparators\u003Cbr \/\u003E\nCMCON1 = 0x00;\u003Cbr \/\u003E\nANSEL\u0026nbsp; = 0x00;\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nINTCON.GIE = 1; \/\/ Global Interrupt Enable\u003Cbr \/\u003E\nINTCON.INTE = 1; \/\/ RB0\/INT External Interrupt Enable bit\u003Cbr \/\u003E\nOPTION_REG = 0b00111111; \/\/ wpu \u0026amp; int fall\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nTRISIO = 0b00000110;\u003Cbr \/\u003E\nWPU = 0b00000010;\u003Cbr \/\u003E\nGPIO\u0026nbsp;\u0026nbsp; = 0b00000001;\u003Cbr \/\u003E\ndelay_ms(500);\u003Cbr \/\u003E\nGPIO\u0026nbsp;\u0026nbsp; = 0;\u003Cbr \/\u003E\n}\u003C\/myquote\u003E \u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\n\u003C\/div\u003E\n\u003Ch3 class=\"trigger\"\u003E\n\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\n\u003Cdiv class=\"toggle_container\"\u003E\n\u003Cdiv class=\"block\"\u003E\n\u003Cblockquote class=\"tr_bq\"\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\n\u003Ca href=\"http:\/\/tiny.cc\/rotary683\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003ERotary Encoder Decoder\u003C\/span\u003E\u003C\/a\u003E\u003C\/div\u003E\n\u003C\/blockquote\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/636630622355488097\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2019\/01\/rotary-encoder-decoder-circuit.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/636630622355488097"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/636630622355488097"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2019\/01\/rotary-encoder-decoder-circuit.html","title":"Rotary Encoder Decoder Circuit - PIC12F683 Microcontroller"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmH47UtrQ7K2FTV00zaiJXfsPJEiiHv_4-D4nK2bKLYbs6fUzkDzoXsgDWMAYCh_cgjR7nlUweJ2QNIRMk_NFHu9y3dMgAAV2zHcRFtmFNmlQBss5OVBqsl_b-Ibx9jtKZqra6K1WB08jc\/s72-c\/encoder.png","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-6949498717831040472.post-9025807555071597086"},"published":{"$t":"2017-11-04T13:14:00.002+05:30"},"updated":{"$t":"2017-11-13T20:38:09.237+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"16F"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Clock"},{"scheme":"http://www.blogger.com/atom/ns#","term":"DS323x"},{"scheme":"http://www.blogger.com/atom/ns#","term":"I2C"},{"scheme":"http://www.blogger.com/atom/ns#","term":"LCD"},{"scheme":"http://www.blogger.com/atom/ns#","term":"PIC"}],"title":{"type":"text","$t":"DS3231 RTC Clock mikro C Demo Code - 16F648A"},"content":{"type":"html","$t":"\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh8x8KCZ4mBYlO9Y-vb26A18pMmp9z13Agbyf0g2zKzG1uL6b_ALcG4ZW_eR8zTcL-8PtaVz3ghyphenhyphenEkjyMANdlxgK3IYG2DX8SbASy8nv8f0oZitlpMv4Ta7zwMdT1CaNrQe6BfS7chY4ttP\/s1600\/lcd+clock.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"LCD Clock\" border=\"0\" data-original-height=\"138\" data-original-width=\"366\" height=\"120\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh8x8KCZ4mBYlO9Y-vb26A18pMmp9z13Agbyf0g2zKzG1uL6b_ALcG4ZW_eR8zTcL-8PtaVz3ghyphenhyphenEkjyMANdlxgK3IYG2DX8SbASy8nv8f0oZitlpMv4Ta7zwMdT1CaNrQe6BfS7chY4ttP\/s320\/lcd+clock.jpg\" title=\"\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003ELCD Clock\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Ch3\u003E\nIntroduction:\n\u003C\/h3\u003E\nThe DS323x is a low-cost, extremely accurate I²C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. The DS323x is available in commercial and industrial temperature ranges, and is offered in a 16-pin, 300-mil SO package.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"float: left; margin-right: 1em; text-align: left;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgTcgVyB27dmb1aKysBENgVkCXCAXqif_F_iyp7INm9dAvxRFyiz9uFsI6dp0Hk2XTOVS-q1q5d77nP9D6tEITLHTPmXqjcADvpj1-ifYIwLU9D-Waeba6VyPUFBP-CD1mxH0NiDD3ZYQBd\/s1600\/ds3231+block.png\" imageanchor=\"1\" style=\"clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DS3231 Block Diagram\" border=\"0\" data-original-height=\"646\" data-original-width=\"833\" height=\"155\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgTcgVyB27dmb1aKysBENgVkCXCAXqif_F_iyp7INm9dAvxRFyiz9uFsI6dp0Hk2XTOVS-q1q5d77nP9D6tEITLHTPmXqjcADvpj1-ifYIwLU9D-Waeba6VyPUFBP-CD1mxH0NiDD3ZYQBd\/s200\/ds3231+block.png\" title=\"DS3231 Block Diagram\" width=\"200\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDS3231 Block Diagram\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\nThe RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an active-low AM\/PM indicator. Two programmable time-of-day alarms and a programmable square-wave output are provided. Address and data are transferred serially through an I²C bidirectional bus.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nMost RTCs use an external 32kHz timing crystal that is used to keep time with low current draw. And that’s all well and good, but those crystals have slight drift, particularly when the temperature changes (the temperature changes the oscillation frequency very very very slightly but it does add up!) This RTC is in a beefy package because the crystal is inside the chip! And right next to the integrated crystal is a temperature sensor. That sensor compensates for the frequency changes by adding or removing clock ticks so that the timekeeping stays on schedule.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiVeRcyB7tV0fE7OnM5TlHkzso36t-WvdlMu2xyqTNfQhNuoHLyJhFQ4wEd7tXYx2BgGMfJM1V7Ty1mTcMdJSSoOMuZn8x9eibjDGMaGXBqZqD7oP8RLHtn0vAIK0itPuzFC31_Ry_hCyKm\/s1600\/ds3231+module.JPG\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DS3231 module\" border=\"0\" data-original-height=\"351\" data-original-width=\"561\" height=\"200\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiVeRcyB7tV0fE7OnM5TlHkzso36t-WvdlMu2xyqTNfQhNuoHLyJhFQ4wEd7tXYx2BgGMfJM1V7Ty1mTcMdJSSoOMuZn8x9eibjDGMaGXBqZqD7oP8RLHtn0vAIK0itPuzFC31_Ry_hCyKm\/s320\/ds3231+module.JPG\" title=\"DS3231 module\" width=\"320\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDS3231 module\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\nThis is the finest RTC you can get, and now it in a compact, breadboard-friendly breakout. With a coin cell plugged into the back, you can get years of precision timekeeping, even when main power is lost. Great for data-logging and clocks, or anything where you need to really know the time.\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\nThe Circuit:\n\u003C\/h3\u003E\nThe circuit is very simple. It used PIC16F648A Pic micro, 16x2 LCD and DS3231 RTC module. The PIC used it's internal oscillator and run at 4MHz. Proteus and Hex file can download from the bottom of the page.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ctable align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto; text-align: center;\"\u003E\u003Ctbody\u003E\n\u003Ctr\u003E\u003Ctd style=\"text-align: center;\"\u003E\u003Ca href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhV2Sx2H_tf-lIC2XOTWaef0M1iO2SPTTBaSYY_fpqu-426y36H6vMRXaXufd3M6L4W_nW-WNMA5eFgM6behPIzttwEg7Z1oOhq7V58BMsF_hgpeI1dvOYdVoJZvII-_7ULblI1_ZApI6Vp\/s1600\/ds3131.BMP.jpg\" imageanchor=\"1\" style=\"margin-left: auto; margin-right: auto;\"\u003E\u003Cimg alt=\"DS323x RTC Clock Circuit\" border=\"0\" data-original-height=\"780\" data-original-width=\"1433\" height=\"217\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhV2Sx2H_tf-lIC2XOTWaef0M1iO2SPTTBaSYY_fpqu-426y36H6vMRXaXufd3M6L4W_nW-WNMA5eFgM6behPIzttwEg7Z1oOhq7V58BMsF_hgpeI1dvOYdVoJZvII-_7ULblI1_ZApI6Vp\/s400\/ds3131.BMP.jpg\" title=\"DS323x RTC Clock Circuit\" width=\"400\" \/\u003E\u003C\/a\u003E\u003C\/td\u003E\u003C\/tr\u003E\n\u003Ctr\u003E\u003Ctd class=\"tr-caption\" style=\"text-align: center;\"\u003EDS323x RTC Clock Circuit\u003C\/td\u003E\u003C\/tr\u003E\n\u003C\/tbody\u003E\u003C\/table\u003E\n\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u003Ch3\u003E\nMikroC PRO Source Code:\n\u003C\/h3\u003E\n\u003Cmyquote\u003E\/**************************************************************************\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nDS323x RTC Clock Demo\u003Cbr \/\u003E\nCopyright (C) 2017 Scorpionz\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is free software: you can redistribute it and\/or modify\u003Cbr \/\u003E\nit under the terms of the GNU General Public License as published by\u003Cbr \/\u003E\nthe Free Software Foundation, either version 3 of the License, or\u003Cbr \/\u003E\n(at your option) any later version.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nThis program is distributed in the hope that it will be useful,\u003Cbr \/\u003E\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\u003Cbr \/\u003E\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\u003Cbr \/\u003E\nGNU General Public License for more details.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\nYou should have received a copy of the GNU General Public License\u003Cbr \/\u003E\nalong with this program.\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Email: scorpionzblog@gmail.com\u003Cbr \/\u003E\n\u0026gt;\u0026gt; Blog : scopionz.blogspot.com\u003Cbr \/\u003E\n\u003Cbr \/\u003E\n***************************************************************************\/\u003Cbr \/\u003E\n\u003Cbr \/\u003E\u003Cbr \/\u003E\n\/\/ Software I2C connections\u003Cbr \/\u003E\nsbit Soft_I2C_Scl           at RB2_bit;\u003Cbr \/\u003E\nsbit Soft_I2C_Sda           at RB1_bit;\u003Cbr \/\u003E\nsbit Soft_I2C_Scl_Direction at TRISB2_bit;\u003Cbr \/\u003E\nsbit Soft_I2C_Sda_Direction at TRISB1_bit;\u003Cbr \/\u003E\n\/\/ End Software I2C connections\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n\/\/ LCD module connections\u003Cbr \/\u003E\nsbit LCD_RS at RB0_bit;\u003Cbr \/\u003E\nsbit LCD_EN at RB3_bit;\u003Cbr \/\u003E\nsbit LCD_D4 at RB4_bit;\u003Cbr \/\u003E\nsbit LCD_D5 at RB5_bit;\u003Cbr \/\u003E\nsbit LCD_D6 at RB6_bit;\u003Cbr \/\u003E\nsbit LCD_D7 at RB7_bit;\u003Cbr \/\u003E\u003Cbr \/\u003E\n\nsbit LCD_RS_Direction at TRISB0_bit;\u003Cbr \/\u003E\nsbit LCD_EN_Direction at TRISB3_bit;\u003Cbr \/\u003E\nsbit LCD_D4_Direction at TRISB4_bit;\u003Cbr \/\u003E\nsbit LCD_D5_Direction at TRISB5_bit;\u003Cbr \/\u003E\nsbit LCD_D6_Direction at TRISB6_bit;\u003Cbr \/\u003E\nsbit LCD_D7_Direction at TRISB7_bit;\u003Cbr \/\u003E\n\/\/ End LCD module connections\u003Cbr \/\u003E\u003Cbr \/\u003E\n\nchar seconds, minutes, hours, day, date, month, year, tem_l, tem_h; \/\/ Global variables\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n\/\/--------------------- Reads time and date information from RTC (DS3231)\u003Cbr \/\u003E\nvoid Read_Time()\u003Cbr \/\u003E \n{\u003Cbr \/\u003E\n  Soft_I2C_Start();               \/\/ Issue start signal\u003Cbr \/\u003E\n  Soft_I2C_Write(0xD0);           \/\/ Address DS3231, see DS3231 datasheet\u003Cbr \/\u003E\n  Soft_I2C_Write(0);              \/\/ Start from address 0\u003Cbr \/\u003E\n  Soft_I2C_Start();               \/\/ Issue repeated start signal\u003Cbr \/\u003E\n  Soft_I2C_Write(0xD1);           \/\/ Address DS3231 for reading R\/W=1\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n  seconds = Bcd2Dec(Soft_I2C_Read(1));     \/\/ Read seconds byte\u003Cbr \/\u003E\n  minutes = Bcd2Dec(Soft_I2C_Read(1));     \/\/ Read minutes byte\u003Cbr \/\u003E\n  hours = Bcd2Dec(Soft_I2C_Read(1));       \/\/ Read hours byte\u003Cbr \/\u003E\n  day = Bcd2Dec(Soft_I2C_Read(1));         \/\/ Read day byte\u003Cbr \/\u003E\n  date = Bcd2Dec(Soft_I2C_Read(1));        \/\/ Read date byte\u003Cbr \/\u003E\n  month = Bcd2Dec(Soft_I2C_Read(1));       \/\/ Read month byte\u003Cbr \/\u003E\n  year = Bcd2Dec(Soft_I2C_Read(1));        \/\/ Read year byte\u003Cbr \/\u003E\u003Cbr \/\u003E\n  \n  Bcd2Dec(Soft_I2C_Read(1));  \/\/ Alarm\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\u003Cbr \/\u003E\n  \n  Bcd2Dec(Soft_I2C_Read(1));  \/\/ Data\u003Cbr \/\u003E\n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\u003Cbr \/\u003E\n  \n  Bcd2Dec(Soft_I2C_Read(1));\u003Cbr \/\u003E\u003Cbr \/\u003E\n  \n  tem_h = Bcd2Dec(Soft_I2C_Read(1));  \/\/ Temp\u003Cbr \/\u003E\n  tem_l = Bcd2Dec(Soft_I2C_Read(0));\u003Cbr \/\u003E\u003Cbr \/\u003E\n  \n  Soft_I2C_Stop();                    \/\/ Issue stop signal\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\u003Cbr \/\u003E\n\nvoid write_data(char address, char w_data)\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n  Soft_I2C_Start();           \/\/ issue I2C start signal\u003Cbr \/\u003E\n  Soft_I2C_Write(0xD0);       \/\/ send byte via I2C (device address + W)\u003Cbr \/\u003E\n  Soft_I2C_Write(address);    \/\/ send byte (address of DS3231 location)\u003Cbr \/\u003E\n  Soft_I2C_Write(w_data);     \/\/ send data (data to be written)\u003Cbr \/\u003E\n  Soft_I2C_Stop();            \/\/ issue I2C stop signal\u003Cbr \/\u003E\n  delay_ms(50);\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n\/\/-------------------- Output values to LCD\u003Cbr \/\u003E\nvoid Display_Time()\u003Cbr \/\u003E \n{\u003Cbr \/\u003E\n   Lcd_Chr(2, 7, (hours \/ 10)   + 48);\u003Cbr \/\u003E\n   Lcd_Chr(2, 8, (hours % 10)   + 48);\u003Cbr \/\u003E\n   Lcd_Chr(2,10, (minutes \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(2,11, (minutes % 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(2,13, (seconds \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(2,14, (seconds % 10) + 48);\u003Cbr \/\u003E\u003Cbr \/\u003E\n   \n   Lcd_Chr(2,16, (day % 10) + 48); \/\/ day\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\u003Cbr \/\u003E\n\nvoid Display_Date()\u003Cbr \/\u003E \n{\u003Cbr \/\u003E\n   Lcd_Out(1,1,\"Date: \");   \/\/ Prepare and output static text on LCD\u003Cbr \/\u003E\n   Lcd_Chr(1,9,'-');\u003Cbr \/\u003E\n   Lcd_Chr(1,12,'-');\u003Cbr \/\u003E\n   Lcd_Out(1,13,\"20\");      \/\/ start from year 2000\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n   Lcd_Chr(1, 7, (date \/ 10)   + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1, 8, (date % 10)   + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1,10, (month \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1,11, (month % 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1,15, (year \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1,16, (year % 10) + 48);\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\n\nvoid Display_Temp()\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n   Lcd_Out(1, 1,\"Temp: +\");\u003Cbr \/\u003E\n   Lcd_Out(1,13,\"ßC  \");\u003Cbr \/\u003E\n   Lcd_Chr(1,10,'.');\u003Cbr \/\u003E\u003Cbr \/\u003E\n   \n   tem_l=tem_l*25;\u003Cbr \/\u003E\u003Cbr \/\u003E\n   \n   Lcd_Chr(1, 8, ((tem_h \u0026amp; 127) \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1, 9, ((tem_h \u0026amp; 127) % 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1, 11, (tem_l \/ 10) + 48);\u003Cbr \/\u003E\n   Lcd_Chr(1, 12, (tem_l % 10) + 48);\u003Cbr \/\u003E\u003Cbr \/\u003E\n   \n   if(tem_h \u0026amp; 128) Lcd_Chr(1, 7, '-');\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n\/\/------------------ Performs project\u003Cbr \/\u003E\nvoid Init_Main()\u003Cbr \/\u003E\n{\u003Cbr \/\u003E\n  PCON.OSCF = 1;             \/\/4MHz\u003Cbr \/\u003E\n  CMCON  |= 0x07;            \/\/ Disable Comparators      CMCON  |= 7;\u003Cbr \/\u003E\n  OPTION_REG = 0;\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n  Soft_I2C_Init();           \/\/ Initialize Soft I2C communication\u003Cbr \/\u003E\n  Lcd_Init();                \/\/ Initialize LCD\u003Cbr \/\u003E\n  Lcd_Cmd(_LCD_CLEAR);       \/\/ Clear LCD display\u003Cbr \/\u003E\n  Lcd_Cmd(_LCD_CURSOR_OFF);  \/\/ Turn cursor off\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n  Lcd_Out(1,3,\".:Scorpionz:.\");\u003Cbr \/\u003E\n  Delay_ms(500);\u003Cbr \/\u003E\n  Lcd_Out(2,1,\"Ds3231 RTC Clock\");\u003Cbr \/\u003E\n  Delay_ms(1500);\u003Cbr \/\u003E\n  Lcd_Cmd(_LCD_CLEAR);\u003Cbr \/\u003E\n  Lcd_Out(2,1,\"Time: \");\u003Cbr \/\u003E\n  Lcd_Chr(2,9,':');\u003Cbr \/\u003E\n  Lcd_Chr(2,12,':');\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n write_data(14,0x40); \/\/SQWE output at 1 Hz\u003Cbr \/\u003E\n}\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n\/\/----------------- Main procedure\u003Cbr \/\u003E\nvoid main() {\u003Cbr \/\u003E\n  Delay_ms(500);\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n  Init_Main();               \/\/ Perform initialization\u003Cbr \/\u003E\u003Cbr \/\u003E\n\n  while (1) {                \/\/ Endless loop\u003Cbr \/\u003E\n    Read_Time();             \/\/ Read time from RTC(DS3231)\u003Cbr \/\u003E\n    Display_Time();          \/\/ Prepare and display on LCD\u003Cbr \/\u003E\n    Display_Date();\n    Delay_ms(450);\u003Cbr \/\u003E\n    Display_Temp();\u003Cbr \/\u003E\n    Delay_ms(450);\u003Cbr \/\u003E\n  }\u003Cbr \/\u003E\n}\u003C\/myquote\u003E\n\n\u003Cbr \/\u003E\n\u003Cdiv class=\"separator\" style=\"clear: both; text-align: left;\"\u003E\n\u003C\/div\u003E\n\u003Ch3 class=\"trigger\"\u003E\n\u003Cimg src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgxDYxsPjCPOIsq77ilBw8lKRDWctzAbaIPazTlYLMwhDgTgtbwcGhkO5JDarvYd2Ra839oMtgLr1arP5yMVsKSeUqWhvRQ5Ddk4AVdzL98jzXYipeCxGQum_JwHIoKeey_ZiC25JJgZEE\/s1600\/DOWNLOAD.png\" \/\u003E\u003C\/h3\u003E\n\u003Cdiv class=\"toggle_container\"\u003E\n\u003Cdiv class=\"block\"\u003E\n\u003Cblockquote class=\"tr_bq\"\u003E\n\u003Cdiv style=\"text-align: center;\"\u003E\n\u003Ca href=\"http:\/\/tiny.cc\/Ds323x_demo\" target=\"_blank\"\u003E\u003Cspan style=\"font-size: large;\"\u003EDS323x RTC Clock Demo Code\u003C\/span\u003E\u003C\/a\u003E\n\n\u003C\/div\u003E\n\u003C\/blockquote\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https:\/\/scopionz.blogspot.com\/feeds\/9025807555071597086\/comments\/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2017\/11\/ds3231-rtc-clock-demo-code-16f648a.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/9025807555071597086"},{"rel":"self","type":"application/atom+xml","href":"https:\/\/www.blogger.com\/feeds\/6949498717831040472\/posts\/default\/9025807555071597086"},{"rel":"alternate","type":"text/html","href":"https:\/\/scopionz.blogspot.com\/2017\/11\/ds3231-rtc-clock-demo-code-16f648a.html","title":"DS3231 RTC Clock mikro C Demo Code - 16F648A"}],"author":[{"name":{"$t":"Scorpionz"},"uri":{"$t":"http:\/\/www.blogger.com\/profile\/16788868236927971222"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"30","height":"32","src":"\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjd4FUk8kZ81qA5RH-8TE_fE-lTn418FZvTVTpV4dMcuL2J5XFvkMZI3ZRhvLp-6_wGzPKh7UWWA09Xjk3NLUeJ31fOe7wglNXt0CZ1qvAr95_wj5WzoIVV7K7-u5K2EbA\/s220\/19_scorpionsecondary.jpg"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh8x8KCZ4mBYlO9Y-vb26A18pMmp9z13Agbyf0g2zKzG1uL6b_ALcG4ZW_eR8zTcL-8PtaVz3ghyphenhyphenEkjyMANdlxgK3IYG2DX8SbASy8nv8f0oZitlpMv4Ta7zwMdT1CaNrQe6BfS7chY4ttP\/s72-c\/lcd+clock.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}}]}});