Showing posts with label microcontroller. Show all posts
Showing posts with label microcontroller. Show all posts

MSP430 - Online Resourses

Some relevant online resources for those who want to start exploring microcontrollers, especially the TI MSP430G2 LaunchPad development board. This page will be updated from time to time.

How/Where to start?
Technical Documents
  • SLAC485. Sample MSP4302553 codes.
  • SLAU144J. MSP430x2xx Family User's Guide
Tutorials / Webinars / Workshops
Community Sites
University courses based on MSP430
  • ECE2049: Embedded Computing in Engineering Design.
  • EE3376: Microprocessors.
Using other programming languages
  • Assembly programming with MSP430. Contains a list of of online resources related to assembly programming with MSP430.
  • Mecrisp. Another implementation of Forth for MSP430.
  • noForth. Interactive Forth programming language for MSP430. Do this if you want to learn Forth and hardware control through the Egel project.

This Week I Learned - 2017 Week 46

Last week post or something from the archive. For something interesting related to a week, visualize your life in week. How many weeks do you still left?

So much things I've learned and observed this week. Some were the same old same old, others were quite eye opening instead, if you pay close attention.

Encountered this message, "expected, at character offset 2 (before "(end of string)")", when processing the JSON file during encoding. It turned out the root cause is how we use the read_file subroutine in File::Slurp module. Passing the right parameter, you can have multiple ways to either read the whole file or multiple lines. There even a research done on finding the optimized way to do do.

You’re working in the wrong place. (if you’re working in an open office)". When most of the employee are wearing headphones, that sufficiently shows that open floor plan have failed to reach its original intention, which to promote so-called information sharing and collaboration. Why open office don't work? Have you ever been to a library to study? If everyone keeps talking or making noise, do you think you can concentrate on your stuff?

The Amazing $1 Microcontroller. (via HN) The author should have written a book instead of a very lengthy blog post. I agree with the author, it's an exciting time for picking up electronic.

Looping through an array in JavaScript. A simple programming language construct, yet so many ways and workarounds. Add to that, you have JQuery way (.each()) of looping through DOM elements with its own quirk. Not to mention the let vs. var. No wonder so many JavaScript transpilers exists. And I was thinking PHP or Perl was bad, JavaScript is even more mind boggling. Forget about JavaScript, just stick to TypeScript which is gaining momentum these days.

The LEBRON stack. Anyone still remember the MEAN stack? I believe only Node.js survived the hype so far. Something similar, do you know Slack is using PHP for its server-side application logic?

Getting things done? (via HN) There are just two steps. However, till today, I'm still struggle with the execution of the system. Refine and more refine.

1/ Start something simple, the first step.
2/ You can stop if you want to.

This Week I Learned - 2017 Week 08

Last week post or the whole series.

Interesting week where your body is giving up on you. Not only adequate and timely sleep is important, it's also crucial for you to keep alert, especially when riding a bike.

#1 Git merge vs. rebase. While I'm almost doing it on daily basis, yet I can can learn a few tricks from time to time. First, is to rebase local commits before commit. One of the mistake I did with another teammate while working on a topic branch is that we `git pull` instead of `git pull --rebase` before committing to the topic branch. Alternatively, we can rebase from remote topic branch before committing. Second, is that I always rebase from `master` branch but always have to resolve a lot of merge conflicts. Instead of rebasing, maybe I should merge instead?
$ git checkout branchX
$ git merge master
$ git rebase -i @{u} # @{u} stands for upstream
$ git push origin branchX

#2 Laura Vanderkam on gaining control of your free time. The key to time management is to focus on the priority. If you don't have time for something, then something is not a priority. If someone willing to pay you 100k for that task, then you will find time to do that task! In short, lacking time is not the actual reason, but you just don't want to do it. You are procrastinating.

How to find those priority items? Start with the end in mind. List down 3 to 5 items. Imagine writing your own performance review for next year for either personal or professional. Foresee what great things you're expecting. Now you've a list of items, how do you manage it?

Friday afternoon (is a low opportunity cost, you don't have to give up a lot). Make three categories, career, relationship, and self. Put two or three items into the three categories and plan these items for the next week. Normally, things aren't always proceed with what we planned.

168 hours. This is equivalent to 24 hours times 7 days. Typical breakdown of the hours spent per week for me are:
  • Work plus travel : 10 hours / day, 50 hours / week
  • Sleep: 8 hours / day, 56 hours / week
  • Total hours left: 168 - 106 = 62 hours / week, 8.8 hours / day
62 hours?! What was I doing all these years?

Having awareness is a key step for moving forward. The question right now is what can you do with those 62 hours? Schedule your items according to these 62 hours. Develop a system accordingly. Easy right? No, we're not busy, Sometimes, we're just plain lazy.

#3 Browsing through MSP430 Q&A in StackExchange's Electronic Engineering forum. Some interesting selected questions.
#4 ARM Cortex-M4. Another interesting microcontrollers which support 32-bit processing capability and quite a few number of brands to choose from. TI MSP432 LaunchPad and STM32 F4 Discovery Kit caught my attention. I prefer the later due to the embedded 2.4" QVGA TFT LCD screen. Will proceed with this microcontrollers once I've done enough with my MSP430.

#5 Dual in-line package (DIP) is one of the packaging types of integrated circuit. When switching different processor from the microcontrollers board, you will need a DIP extraction tool, the professional one. Due to budget constraint, I bought the cheapest I can find, roughly around MYR7.

#6 Buying a TV? The Cnet TV buying guide is best I've read so far. I was surprised to learn some of my generalizations regarding TV were far off. In short, at least 40 inches LED LCD TV with local dimming, full-array LED backlights, and dumb TV. Unfortunately, the recommended brand, TCL is not available in MY. Something interesting and coincident. While going through my photos, I've noticed I've took the same TV model at the same day at two different years. Maybe it's a sign for me to get that TV instead?

MSP430 LaunchPad - Introduction to Low-powered Microcontrollers Development Board

Two months ago, I was working on an assignment which involved writing code for a simulator where the targeted machine was a microcontroller (also known as MCU or SoC). There were numerous issues with the project. One of such issue is using Interrupt Service Routine (ISR) to display the LED light at a specific interval and duration. There are numerious ways to solve this (I only found this after the submission), but we didn't managed to get it done right during that time. Furthermore, the main goal of the assignment was to let everyone experience a software engineering process through different team roles. Hence, correctness is not the priority here. Nevertheless, these unresolved issues piqued my interest on embedded programming and C/C++ programming languages. Also, my own self-exploration exposed me to different microcontroller kits available in the Maker community.

When come to microcontroller kits, Arduino Uno is the preferred choice right now due to its popularity, which again, is due to its beginner friendliness. But these comments by david-given (a), IgorPartola, wyager, Declanomous, david-given (b), and sotojuan at HN convinced me that TI MSP430 LaunchPad would be a better choice. Cheap (I've made a mistake purchasing the wrong LaunchPad kit, more on this later) enough and low-powered microcontroller for anyone to learn embedded programming and study hardware.

The next step is to purchase the microcontroller kits. Now, which MSP43X LaunchPad development kits? I bought the original LaunchPad kit, MSP-EXP430G2 for roughly MYR 50+ inclusive of tax from Element14. Make sure you add comment to the order form that the purchase is for personal use. Otherwise the sales person will have to reconfirm with you again. If you still remember I said I made a mistake picking the wrong kit. If I were to choose again, I will pick MSP-430FR4133 instead although it's more expensive. Two good reasons. First, the development board have an embedded Liquid Crystal Display (LCD). You don't have to buy an additional LCD display and going through the hassle of connecting it through the breadboard. Second, the MSP-EXP430G2 is not supported by GNU/Linux version of Code Composer Studio, the default Integrated Development Environment. These are not critical issues but just merely minor inconveniences. Videos below will show more details on the differences between two development boards.

The item arrived within 3 working days in a black box. The list of items inside the box is clearly explained by video below.

The full list of items are:
  • 1pc Quick Start Guide (slac432a)
  • 1pc MSP-EXP430G2 LaunchPad development board
  • 1pc MSP430G2553 microcontroller (with temperature measure demo app)
  • 1pc MSP430G2452 microcontroller
  • 1pc Mini-USB cable
  • 1pc 32kHz external crystal (I've no idea what this for even I've read slaa322c)
  • 2pc 10-pin PCB Connector (2 male/2 female)
  • 2pc LaunchPad sticker
One mildly interesting thing is the MSP430 part numbers. For example, the breakdown of the part number of microcontroller MSP430G2553 are:
  • MSP430 = CPU
  • MSP = Mixed Signal Processor
  • 430 = 430 MCU platform
  • G = Flash (value line) memory type
  • 2 = Generation 2 series where speed is up to 16 Mhz
  • 5 = Model within the generation
  • 5 = Memory configuration (RAM: 0.5K, ROM: 8K)
  • 3 = Variant of the devices
In the coming post, we will go through on setting the development environment in Ubuntu 16.10. Stay tuned.