Kali ini Flowcode AVR kita gunakan untuk mencoba membuat sebuah aplikasi sederhana yang melakukan pembacaan masukan di PORT A kemudian menampilkan hasil pembacaan tersebut, yang sebelumnya melalui suatu variabel DATANYA, ke PORT B. Rancangan Flowcode AVR-nya ditunjukkan pada Gambar 1.

Gambar 1

Kemudian kita kompail dan disimulasikan hasilnya (juga) bisa dilihat pada Gambar 1 tersebut. Perhatikan bahwa tidak semua masukan PORT A kita buat berlogika 1, hanya A7, A5, A3 dan A1. Hasilnya juga tidak semua LED pada PORT B menyala, hanya sesuai dengan PORT A saja, yaitu B7, B5, B3 dan B1. Nah sekarang pertanyaannya:

Bagaimana dengan hasil kompilasi dalam bahasa C-nya (juga dalam bahasa ASM-nya)?

Berikut saya cuplik sebagian hasil kompilasi dalam bahasa C (baris 59-96), cukup yang utama dulu, selebihnya Anda bisa mencermati bahwa di awal program C-nya merupakan inisialisasi variabel, pemetaan mikrokontroler dan lain-lain. Perhatikan Gambar 2.

Gambar 2

Pada cuplikan listing tersebut saya sudah memberikan catatan. Bagaimana dengan Anda? Apa yang dilakukan pada bagian inisialisasi, baris 76 dan 77? Instruksi MCUCSR = 0×00; digunakan untuk mereset (memberikan logika 0) pada semua bit di register MCU Control and Register, perhatikan penjelasan pada gambar MCUCSR. Sedangkan WDTCR = 0×10; digunakan untuk mematikan watchdog, perhatikan penjelasan register WDTCR (Watchdog Control Register). Langkah ini dilakukan oleh Flowcode, menurut saya, untuk keamanan atau play safe saja. Karena kemungkinan kompailer C yang digunakan tidak mematikan watchdog secara otomatis (ada beberapa kompailer yang bisa melakukan-nya secara otomatis selama tidak secara eksplisit dinyatakan penggunaan watchdog).

MCUCSR

WDTCR

Listing program selebihnya adalah sesuai dengan yang diharapkan, baca masukan seperti pada baris 85, namun sebelumnya ada inisialisasi PORT A sebagai masukan, mengapa tidak langsung aja DDRA = 0×00? Kok harus di-AND-kan segala dengan 0, khan hasilnya sama saja logika-0 khan? Aneh? Kemudian dilanjutkan dengan mengirimkan isi variabel dari pembacaan PORT A ke PORTB, lihat baris 91, yang sebelumnya (juga) diawali dengan inisialisasi PORT B sebagai luaran (nah kalo ini caranya langsung).

Jika Anda berikan loop pada program, seperti pada Gambar 3, hasilnya juga sama saja, keunikan juga terjadi lagi seperti saya jelaskan pada artikel sebelumnya.

Gambar 3

Semoga bermanfaat, amin!

Tags: , , ,

39 Responses to “Flowcode AVR 3.0: Aplikasi Masukan/Luaran (I/O) Sederhana”

  1. Software ini tampaknya cocok untuk memulai belajar mikrokontroler.

  2. sangat bermanfaat nih

  3. terima kasih pak atas sharenya

  4. thank you for sharing it’s so helpful

  5. its good thing to share, thank you.

  6. ABC Assignment Help provides personalized assignment help according to students’ perception and preference. We offer assignment writing service in any subject like Management, Law, Statistics, Computer Science, English, Accounting, engineering, etc. With an in-house team of experienced subject tutors, the focus is on meeting your budgetary constraints and delivering excellent work within the deadline.

  7. I would like say thanks for this post. Here are some useful links for stdudents all across the globe. If you are looking for assignment help, we are the best providers for you. We have our services which include :
    Python Assignment Help,
    Electrical Engineering Assignment Help,
    Programming Assignment Help

  8. When you get a paper from https://prime-essay.net/ , you are guaranteed to be the one and only owner of the paper. We do not offer pre-written papers, every paper is written from scratch meeting all individual requirements. We also do not reuse or resell papers, you have all rights to do anything you want with it.

  9. My Assignment Help is an incomparable online assignment help company delivering excellent academic assignments, essays, coursework and reports. Through a team of over 3000 subject experts we ensure individual attention to every student making the assignment help experience completely personalized in nature. With our round the clock services, you can be assured of high grades every time.

  10. Hello, I glad I got here. There is a lot of information one can find here. It’s perfectly clear that this blog is written by a true professional. It’s great when you work with professionals. Our customers are always glad about the result they got from our service.

  11. Informasi yang Anda bagikan sangat membantu kami, terima kasih banyak.

  12. greta

  13. Tired of fake essay reviews? Visit https://scamfighter.net/ for real student feedback on essay writing services.

  14. Need writing help but don’t know whom you can trust? On EssayTopicsMasters we conduct research on writing companies so that you could select the one which is the most trustworthy and reliable. Take a look at https://essaytopicsmasters.com/reviews/samedaypapers-com review that we have completed recently.

  15. You have received an interview and are thinking how to write professional thank you letter that will be original and will once again show your strengths. Welcome to Resume101.org

  16. Search for best Construction Jobs and Building Vacancies on Web
    Construction Job Board is the perfect job search and online recruitment site for construction professionals in building, design and civil engineering sectors. We are 100% dedicated to providing the best careers in Construction Jobs UK and construction recruitment services for a range of industry professionals including Quantity Surveyors, Construction Managers, Estimators, Architects, Building Surveyor jobs, Construction trades, Project Managers, Site Managers, Foremans and other Construction personnel. We advertise permanent and contract construction industry vacancies on behalf of construction companies and recruitment agencies.

    Search 100’s of latest Jobs in Construction throughout London & UK and abroad, find a job that matches your skills and send your CV straight to the top recruitment agencies and employers within Construction - covering all specialist areas within construction recruitment we have the job for you! When you sign up to the recruitment services at our Construction Job Site. You can receive our jobs-by-email alert, making sure you’re the first to know about new vacancies in Construction that match your skills and experience.

    For all Technology Jobs in UK, please Visit ITJobBoard

  17. If you search “writing a nursing resume”. Our team of experts will write ideal resumes for nursing schools. A well-organized teamwork assures of the best result possible.

  18. Be The First To See 1000s New Jobs Added At itjobboard.net Search And Apply Now. Salary Calculator. Best CV Tips. Career Advice Experts.
    Search For IT Job Board Uk

  19. Norton.com/setup - Norton is an antimalware program created by Symantec Corporation. Norton created several security products for computers and other electronic digital devices. The security program can keep you safe from modern viruses and programs that can threaten your privacy and security. Norton products include Norton Security Deluxe, Norton Security Standard, and Norton Security Premium can be used by users to get assured security. 

  20. Excellent information Providing by your Article, thank you for taking the time to share with us such a nice article. Amazing insight you have on this, it’s nice to find a website that details so much information about different artists. Kindly visit the LiveWebTutors website we providing the best assignment help services in Australia.

    For More Info:
    Assignment Help Brisbane

  21. Education is an important part of life everyone needs a good education. So FIS School is a place of good learning the School in Greater Noida you can admit your kids for the best learning environment. Our school have well-qualified staff who teach very well your student

  22. Divine skins are the best place for hair treatment and hair transplant in delhi. If you are suffering from hair loss or hair fall and skin related problems that you can contact us our specialist and get the best solution for skin and hair related issues

  23. I am glad to land on your website where I am learning a lot about the shared topics. Really this blog is much informative which can be used by anyone who has a keen interest in the topics. I would like to share one information related to Assignment Thanks for your time.

  24. n this present era of the internet, the websites have become a critical medium that worldwide organizations use for various unique purposes. wordpress support number Without creating a website for your business, you could not in hence its reputation and rankings. Most of the companies have created at least a single website for their business to help people finding them easily

  25. Excellent information Providing by your Article, thank you for taking the time to share with us such a nice article. Amazing insight you have on this, it’s nice to find a website that details so much information about different artists. Kindly visit the LiveWebTutors website we providing the best assignment help services in Australia.

    خانه عباسیان کاشان

    آرچینا یک رسانه پروژه محور ایرانی است که به پوشش و انتشار مطالب و محصولات دست اول دنیای لذت بخش معماری در سبک‌های مختلف این رشته میپردازد. آرچینا در سال ۹۷ تاسیس شده و توسط گروه تحریریه ۳ نفره مدیریت و بروز رسانی می گردد.

  26. Get instant job matches for companies hiring now for Quantity Surveyor jobs in London like Senior Quantity Surveyor, Assistant Quantity Surveyor, Project

  27. I’ve benefited from Paperwall101. This platform contains many templates of essays, research papers, and other assignments. One can use them for free.

  28. “I ‘m an A student because of your assistance!
    Thank you for saving me during difficult times and helping me maintain my present GPA standing. More gradesfixer reviews here.”

  29. It was primarily developed as a system programming language for writing operating systems. The main features of the C language are memory access, a set of simple passwords, and short styles. I do job at Best Assignment Writing Help London and I would like to add that these features make the C language suitable for programming systems such as operating system or compiler development.

  30. Tool and die making: Tool and die making, the industrial art of manufacturing stamping dies, plastics molds and jigs and fixtures to be used in the mass production of solid objects. The fabrication of press working dies constitutes a major part of the work done in tool and die shops. Most press working dies are

  31. The school ERP software is a modern technology for the education system. when this technology comes into the market they have improved the ability of school management. This software will be providing you database security because database security is most important for any organization so the school management system has to provide full security.

  32. Very informative and well written post! Quite interesting and nice topic chosen for the post. My Assignment Help Au has been a pioneer within the Best Assignment Help on-line services and within the Australia and different countries ceaselessly for over Seven years. Make an order now for professional work, delivered on time and pure. You can email us at cs@Myassignmenthelpau.Com or Phone Number: +61-2-8005-8227.

  33. Excellent Assignment Help Australia offers assignment help on time in Australia. Our writers help students educational problem solves. Get 24/7 expert to help.

  34. If you are searching lead-free apron in India that is the right place for you need because we are one of the lead-free aprons manufacturers so you can visit our website and make a single call us at +91-987-1578-167

  35. You are so interesting! I don’t believe I’ve truly read through anything like that before. So wonderful to discover another person with a few unique thoughts on this issue. Seriously.. many thanks for starting this up. This website is something that is required on the internet, someone with a bit of originality!

    Isharo Isharo Mein

  36. Nowadays you can buy your carpets from the online best carpets for hotels. They assure you the guarantee of the quality product. You get the same product as shown in the pictures. The details and measurements will also match. Carpet crafts are one such good dealer that takes care of your choice and taste. At the same time, you will get after supply care in the future which may not be available with the local dealers.

  37. Really, I enjoy your site with effective and useful information

  38. PHP supports transparent HTTP cookies as defined in RFC 6265. Cookies are tools for storing data remotely in a browser for monitoring or re-identifying users. You can set cookies with the cookie () setting. Cookies are part of the HTTP header, so you must call SetCookie before sending output to your browser.

Trackbacks/Pingbacks

  1. Flowcode AVR 3.0: Aplikasi dengan LCD 2×16 | DSP & Embedded Electronics

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>