Pada kesempatan kali ini kita akan belajar membuat sebuah contoh project sederhana dengan menggunakan LED yang dikontrol oleh chip mikrokontroller ATMega8535. Project yang akan kita buat adalah flip-flop. Sebuah contoh mengendalikan LED secara sederhana, yaitu dengan menyalakan dan mematikan secara bergantian diantara satu atau dua buah LED. Kenapa disebut sebagai flip-flop? karena adanya dua buah keadaan yang saling berlawanan atau berkebalikan.
Pada project ini, LED akan dimatikan dan dinyalakan secara bergantian sehingga akan memiliki dua buah keadaan yang berganti/berbeda.
Bagaimana Menyalakan Sebuah LED?
Sebuah lampu LED dapat dinyalakan dengan memberikan polaritas positif (+) dan Ground (0) pada masing-masing kaki. Sebuah LED memiliki dua kaki yang berbeda fungsi. Kaki Anoda yang biasanya lebih panjang ukurannya dan kaki Katoda yang memiliki ukuran lebih pendek. Lebih jelasnya, bisa ditunjukkan pada ilustrasi gambar berikut ini:
Biasanya masing-masing lampu LED memiliki karakteristik sendiri-sendiri. Misalnya nilai tegangan maksimum, warna dan ukuran yang berbeda-beda. Namun demikian, lampu LED biasanya memiliki standar yang sudah ditentukan. Pada sebuah rangkaian elektronika, lampu LED memiliki sebuah simbol yang unik, ditunjukkan dengan sebuah simbol yang mirip dengan diode atau tanda panah dengan sebuah garis didepannya, namun untuk lampu LED ditambahkan dua buah tanda panah arah keluar yang menunjukkan bahwa LED/diode tersebut mengeluarkan cahaya. Jika tanda panah menuju simbol maka dia menerima cahaya. Dalam rangakaian elektronika, LED digambarkan dengan sebuah simbol, biasanya LED diseri dengan sebuah resistor yang memiliki fungsi untuk membatasi nilai arus maksimum yang diperbolehkan untuk melewati LED guna menghindari kerusakan.
Jika dalam rangkaian tersebut di atas, dengan sumber tegangan (V) 3V dan resistor (R) 1K Ohm, maka arus yang akan mengalir melalui LED adalah sebesar: (3V/1000 Ohm) = 3mA. Dengan nilai arus 3 mA yang mengalir melalui LED, sudah cukup untuk membuat LED menyala.
Menyalakan LED dengan ATMega8535
Dengan prinsip yang sama dengan rangkaian diatas, maka kita bisa menyalakan sebuah LED dengan memberikan arus kepada LED. ATMega8535 setiap pin dapat berfungsi sebagai sumber arus untuk sebuah device. Arus yang dapat diberikan oleh chip ATMega8535 berdasarkan datasheet adalah sebesar 20mA pada Vcc = 5V dan 10mA pada Vcc = 3V. Arus ini cukup besar untuk menyalakan sebuah LED. Sehingga dalam rangkaian yang kita buat, perlu ditambah resistor limiter sebagai pembatas arus untuk menghindari kerusakan LED. Untuk menyalakan sebuah LED dengan ATMega8535, bisa menggunakan rangkaian seperti berikut:
Dengan menggunakan Code Vision kita bisa membuat code seperti berikut:
1. Buka Software Code Vision, kemudian Klik File –> New
2. Pilih File Type: Project kemudian klik OK
3. Klik Yes, kita akan menggunakan wizard dari Code Vision
4. Pada tab Chip, sesuaikan konfigurasi chip dan clock sesuai berikut
5. Pindah pada tab Ports, pilih tab Port B, kemudian klik pada Bit 0 sehingga akan menjadi Out.
6.Selanjutnya, pilih File — > Generate, Save & Exit
7. Pada source code, tambahkan #include<delay.h>
8. Kemudian tambahkan code berikut
PORTB.0=1; // menyalakan LED
delay_ms(500); // jeda 500ms
PORTB.0=0; // matikan LED
delay_ms(500); // jeda 500ms
9. Setelah itu, download file hex ke sistem minimum. Maka LED akan nyala-mati terus dengan jeda 500ms.
Semoga bermanfaat.
электро штабелеры для склада
https://elektroshtabeler-kupit.ru
самоходный штабелер
http://shtabeler-elektricheskiy-samokhodnyy.ru
штабелер электрический самоходный
https://shtabeler-elektricheskiy-samokhodnyy.ru
Very interesting info!Perfect just what I was searching for!
It?¦s really a cool and helpful piece of info. I?¦m happy that you simply shared this helpful info with us. Please keep us informed like this. Thanks for sharing.
thanks to web.
It’s difficult to find educated people on this topic,
Excellent post. I will be experiencing some
of these issues as well..
Now I am going away to do my breakfast, later than having my breakfast coming over again to read further news.
Right away I am going to do my breakfast, after having my breakfast coming again to read other news.
168911 179703Hi there! Someone in my Myspace group shared this website with us so I came to give it a look. Im undoubtedly loving the data. Im bookmarking and will be tweeting this to my followers! Outstanding weblog and fantastic style and design. 254592
527708 710079Simply a smiling visitor here to share the love (:, btw wonderful style and design . 735882
422463 268693Find out these pointers read on and learn to know how to submit an application doing this which you policy your corporation today. alertpay 507915
purchase cialis online cheap Priligy Andorra Precio
электророхля
http://www.samokhodnyye-elektricheskiye-telezhki.ru/
994878 192413As I site possessor I believe the content material here is rattling great , appreciate it for your efforts. You should keep it up forever! Best of luck. 197490
532856 668113I saw your post awhile back and saved it to my computer. Only lately have I got a chance to checking it and have to let you know good work. 326037
453458 926144excellent post. Neer knew this, thankyou for letting me know. 670606
Does your site have a contact page? I’m having a tough
time locating it but, I’d like to shoot you an email. I’ve got some suggestions for your blog
you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time.
Thank you for another great post. Where else could anybody get that kind of information in such an ideal manner of writing?
I’ve a presentation next week, and I am on the search for such
information.
298961 883208I likewise believe thus, perfectly pent post! . 675569
электророхля
https://samokhodnyye-elektricheskiye-telezhki.ru
688536 41751Methods for dilution antimicrobial susceptibility beadlets for beagles that grow aerobically-fifth edition. 447100
Every weekend i used to visit this web site, as i want
enjoyment, for the reason that this this site conations actually good funny information too.
With havin so much written content do you ever run into any issues of plagorism or copyright infringement?
My blog has a lot of unique content I’ve either authored myself or
outsourced but it seems a lot of it is popping it up all over the web without my permission. Do you know any techniques to help
protect against content from being ripped off? I’d certainly appreciate it.
электророхли
https://samokhodnyye-elektricheskiye-telezhki.ru
968986 613434Thanks for the data provided! I was discovering for this info for a long time, but I wasnt able to discover a reliable source. 589544
Admiring the dedication you put into your website and in depth information you present.
It’s awesome to come across a blog every once in a while that isn’t the same outdated rehashed material.
Great read! I’ve saved your site and I’m including your RSS feeds to my
Google account.
128751 605013This website is actually a walk-through for all of the info you wanted about it and didnt know who to question. Glimpse here, and you will definitely discover it. 259376
788353 40971I like this internet site because so significantly utile stuff on here : D. 248594
I blog often and I seriously thank you for your information. Your article has truly peaked my interest.
I will book mark your website and keep checking for new information about once
per week. I subscribed to your RSS feed as well.
Excellent article. Keep posting such kind of info on your page.
Im really impressed by your site.
Hello there, You’ve performed an incredible job.
I will definitely digg it and in my view suggest to my friends.
I’m confident they’ll be benefited from this site.
телескопический подъемник
https://www.podyemniki-machtovyye-teleskopicheskiye.ru/
607733 444160Greetings! This really is my first comment here so I just wanted to give a quick shout out and let you know I genuinely enjoy reading by way of your blog posts. Can you recommend any other blogs/websites/forums that deal with the same topics? Thank you so significantly! 295717
Heya! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no backup.
Do you have any solutions to stop hackers?
Hi! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy reading through your posts.
Can you suggest any other blogs/websites/forums
that cover the same subjects? Many thanks!
мачтовый подъемник
https://podyemniki-machtovyye-teleskopicheskiye.ru
720107 91974How a lot of an significant content material, maintain on penning significant other 770141
Hello I am so happy I found your blog, I really found you by error, while I was researching on Aol for something else,
Regardless I am here now and would just like to say thanks a lot for a remarkable post and a
all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the moment but I have
saved it and also added in your RSS feeds, so when I have time I will be back to read a great deal more, Please
do keep up the awesome b.
Here is my web site :: 2022
Thanks for finally talking about > Membuat LED Flip-Flop dengan ATMega8535 – Produk Inovatif < Liked it!
https://www.dewiring.com/read-blog/63038_simple-strategies-on-how-to-get-rid-of-back-pain-advanced-bargain-neck-massager.html
https://www.e-sathi.com/blogs/262700/Quicklax-Neck-Massager-Get-Relief-From-Your-Chronic-Back-Pain
https://actsfile.com/read-blog/22055_neck-spa-pro-important-advice-about-easing-your-back-pain.html
https://www.reddit.com/user/drherrymorking/comments/wi8g76/ease_evolution_neck_massager_strategies_on_how_to/
https://www.folkd.com/user/drherrymorking?selection=all&pagenum=1
http://www.4mark.net/story/7545185/quicklax-neck-massager-tips-to-help-ease-back-pain-now
https://justpaste.it/8jlwn
https://shapshare.com/read-blog/156009_feel-better-today-with-this-great-back-pain-advice-neck-spa-pro.html
https://mayempire.com/read-blog/63152_simple-tricks-on-dealing-with-back-pain.html
https://zumunci.haske247.com//blogs/4193/Cure-Your-Back-Pain-With-These-Techniques-Neck-Spa-Pro
https://www.addonface.com/1658502946759276_8002
https://www.quora.com/Fantastic-Advice-If-You-Have-Back-Pain/answer/Drherrymorking?prompt_topic_bio=1
https://www.tumblr.com/blog/view/drherrymorking/691907888701145088?source=share
https://demo.wowonder.com/post/384714_advanced-bargain-neck-massager-quicklax-neck-massager-neck-spa-pro-theroneck-mas.html
https://wo.lyoncat.com/read-blog/2751_soothely-neck-massager-tips-on-how-to-handle-your-back-pain.html
https://rabbl.com/read-blog/122458_quicklax-neck-massager-here-039-s-where-you-can-find-back-pain-relief.html
https://www.paperpage.in/read-blog/87917_neck-spa-pro-simple-ways-on-how-to-deal-with-back-pain.html
https://bumppy.com/tm/read-blog/107688_theroneck-massager-great-tips-on-improving-your-back-pain.html
https://talknchat.net/read-blog/4550_advanced-bargain-neck-massager-back-pain-tips-that-anyone-can-try-out.html
Hello, i think that i saw you visited my website thus i came to “return the favor”.I’m attempting to find things to enhance my site!I suppose its ok to use a few
of your ideas!!
Usually I do not read post on blogs, but I would like to
say that this write-up very compelled me to
take a look at and do it! Your writing style has
been amazed me. Thanks, very nice post.
993346 549000You would endure heaps of different advised organized excursions with various chauffeur driven car experts. Some sort of cope previous features and a normally requires a to obtain travel within expense centre, and even checking out the upstate New York. ??????? 132777
366277 710231Hello there, just became alert to your blog via Google, and found that its truly informative. Im gonna watch out for brussels. I will appreciate should you continue this in future. A lot of folks will be benefited from your writing. Cheers! xrumer 839137