Category: MSP-430FR

Updates updates updates!
What have I been doing you ask?
Uni work. Far too much uni work for my liking. Well, it’s done now. For this year at least. So now it’s time for projects, SKYRIM! and work.

Let’s take a step back for a moment and I’ll explain one of my subjects that has kept me so busy. The subject known as ECTE350 Engineering Design and Management. Basically, at the start of the year we are put into teams of 8 and are given a theme. From this theme we must design a product, then build it. Following all regulations, much paperwork and what not. This years theme was “Aged and Disabilities care” and Team 8, also known as TSAM Tech designed and built the E-LINE. Pretty much, it’s an automated clothes line with various sensors to detected temperature, humidity, and light to detect when to draw the clothes line into the house through a window. It was also controlled by a wireless remote to move the line so it was easier for the disabled person to sit in their wheel chair and hang clothes with minimal movement.

Don’t listen to Jaqui. It’s her bra, not a swim top…

Here we can see the E-Line and TSAM Tech Team Members, minus Ru Qui, he missed the photo. We had to present our product at the annual Innovation Fair at UoW and the crowds vote on the products. This year we came third! So pretty much, this past semester at uni all my project mind set has been in this product.

Moving on.

What else. Tried to fix a mates monitor. That didn’t work. Backlights dead and I cannot find any visually dead capacitors. Bought a new Arduino Mini Pro on eBay. Just for shits and giggles. Noticed my TV has serial comms line for RS232 control. Winning! TV/XBMC remote all in one in the thought planning stages…

Yesterday, I started up on my Wireless glove gesture control mouse again. I have dubbed it the “RatGlove”. As it turns out, the learning curve between AVR micro controllers and TI micro controllers is quite steep. Not a huge fan of TIs Datasheets really. Too many references to other documents and poorly documented. I braved the datasheets and got my FR5739 board to work at the right clock speed and set up the USART interface properly so my serial LCD screen works with it all properly like. That took me 2 days alone. Oh well. Next is the accelerometer. I have a much better understanding of the ADC component of micro controllers now after my micro controller subject at uni. Hopefully I can decode the accelerometer stuff this time around.

See? Photographic evidence I am actually doing something other than Skyrim. Notice no super dodgy transistor array this time around, it’s a serial enabled 3.3V LCD available from LittleBirdElectronics. Quality aussie supplier. They get their stock from several other manufacturers, like SparkFun.

That’s pretty much it from me this time around. Just keep blowin’ shit up and taking names.

Remember last post I said I was going to play with the accelerometer on my TI board? Well, I didn’t lie too much…
I decided to wire a LCD screen up to the board so I could see the data from the accelerometer in real time. That was hard enough…As this post is detailing.

Two days.

That is how long it took me to realise 3.3V logic and 5V logic doesn’t play well together. Two of them.
Let’s take a few steps back and I’ll start from the start.

I wanted to play with the accelerometer on my TI board, but I like seeing what’s happening. The data in/out. What everything is doing. The awesome JFET debugger on the TI board helps a lot with that, but nothing beats a good old LCD screen showing what’s happening. So I thought, “I’ll just grab an LCD screen, hook it up and then play with the accelerometer”.
Good idea idiot.
Armed with my new 5V power supply (Which, turns out, did need the heat sink. That 7805 gets frikken hot) I set out to quickly hook up my LCD screen to my TI board.
For starters, it was a different LCD screen to the first one I had. So all the commands are different, the initialisation is different, the pins are different. After making a massive spaghetti mess of cables to connect the screen up I set out to write some code.
Enter first problem.
I don’t know how to code on TI microcontrollers. I don’t know the routines, the registers, the tips and tricks. Oh I know C syntax. I can code. But not on TI controllers. Just starting off and getting a simple code to compile and run was interesting enough. But I digress. After poking around in the example code that came with the board, I worked out how to set up the Data Direction Registers, well, the TI equivalent anyway.
I cracked out the code I used for the other LCD screen I used previously in my Bluetooth remote. The logic was useable. Had to play around with the pulsing of the enable logic for it to work on the TI compiler. Along with writing my own “delay_ms” and “delay_us” functions.
So. Technically, I have functions that should work. The wires are all connected together properly. Trust me. I had checked those wires about one hundred times.
Still nothing is working.
I couldn’t even get the LCD to initialise.

End day one.

I know!
I’ll hook the screen up to my ATmega8515 on my STK500 and see if I can get it working. Low and behold. It works. The screen initialises and prints text. (After much fiddling around and making an LCD header and source file, just for future use, I might post it up here once I have commented and cleaned it up a little.)
So what am I doing wrong on the TI board?
Move it back and try the new logic from the AVR program.
Still nothing. It’s not the contrast adjust. I play with that every time I try to get it work, tuning it to try and get some text to appear. So what the hell can it be?
Late at night after watching some Starwars, possibly episode 3, maybe 2, it dawns on me.

TI uses 3.3V logic.



That’s it?



End day 2.

This is damn “simple” project is now testing every part of my engineering mind, and it turns out to be a simple little thing like that? I am going to make this thing work if it kills me.
Right. Now I have established I need 5V logic for the LCD and my TI board outputs 3.3V logic, what can I use to bump it up?

A series of 7805’s? Pfft. No. That’s expensive and just silly. Also, The response time would be far too slow. Probably. I didn’t have any spare 7805’s to test it with anyway.

What I need is a way to use 3.3V to switch on 5V.

Hang on.
Isn’t that what transistors are for? Digital switches?(actually, they are current amplifying devices, but can be used as switches, and commonly are) Humm…. I remember playing around with this for a night. Where was that video I watched?

Right. There’s the kinda thing I need to do. How can I adapt that to work with logic? Think Phill! That’s all your mind ever does! Think!


Remember this post? It’s a switch! For logic! I’ll just replace the mechanical switch with the transistor! Genius!

A transistor array!

The actual transistors I am using are c1815. A small signal audio amplifier. Not really the most optimal for a transistor switch, but what I had with me anyway. Still works.

But hang on. This will invert the logic. This design makes the output active low with active high input. This had to be reflected in code, obviously. But if you do this hack method, remember to invert your output.

Right. Let’s get this baby working.

Look at that!

My pretty TI board and my transistor array are being nice together. After I realised I had to ground the R/W line on the LCD screen. Silly mistakes for everyone! I have enough spare!

So there you go.

After 3 and a bit days of fiddling around. I have a working 5V logic LCD screen interfacing with a 3.3V logic TI microcontroller.

Hope you enjoyed this epic post of silly mistakes. Proving, you can interface 3.3V logic with 5V logic.

EDIT: I had better point out, this is a one way logic converter. For output from the microcontroller only. You can’t read anything in from the screen using this method.

I still haven’t found my spring from my solder sucker. Curses!

Ahh. Holidays. What better time to fiddle with projects?
Not a lot to report on the project front today. More of a quick update on my analog meters, planned projects and new toys.

Remember last post I talked about making new covers for the meters?
Well! Here they are!

Purty no? On the upside, I learnt GIMP doesn’t like doing colour inversions, but paint does… Riddle me that internet, riddle me that…

That’s the only update I have for you on that project. I have kinda lost some inspiration on the SD card logging when I couldn’t get some example codes working. Just needs more time than I have had recently.

Moving right along!
New projects!
What are several things a electronics hobbyist needs?

  • Soldering Iron
  • Multimeter
  • Oscilloscope
  • Bench Power Supply

Yes? We are in agreement? Ok, maybe not the oscilloscope quite that much, but still. Would be pretty handy…

So I have a solderin iron. It’s old and the tip is burnt through, but it works pretty well. Multimeter? Check. A cheapo $20 one picked up from leading edge electronics when I was 12 I think… Once again. It works to everything I need it to, so far. Oscilloscope? I wish… I’m saving for one at the moment. A cathode ray would be awesome, but I just don’t have the space. So lately I have been thinking of and looking at the digital scopes. As of yet, I don’t know. Peoples thoughts?

Now. Bench power supply. That, I am missing. At the moment I just use the 5V line from my arduino. That’s not really the best way to do things due to the current limitation from that line. We don’t want to be burning out my arduino board now do we? That would just be inconvenient.

So. what to do? A variable bench supply is too expensive. I could mod an ATX powersupply to feed me the 5V and 12V lines from the molex plugs, but the only spare ATX supply I have is dying and they draw a bit of power even with no load attached.
What to do?
Enter brilliant idea.
Build a simple 5V and 3.3V power supply.

Using an LM7805 and a LM317 voltage regulators, feed 12V from an old wall power pack I found lying around into the regulators. Take the output from the LM7805 for 5V, output of LM317 as 3.3V, output direct from the wall pack as 12V. Throw some regulating capacitors and backwards current protector diodes in. Throw a heatsink on the regulators just in case. Simple! I can even build a little adapter to plug in a 9V battery instead of the wall pack. Some pretty LEDs in and switches to turn each segment of the supply on or off. Best idea ever. Best thing is, I have most of the components! Just not the important ones. Like the LM317 and the capacitors… Looks like I’m going back to Jaycar.

After a bit more research I will be ready to draw up a proper cicuit diagram.

Onto my new toy. 😀

Thanks to a post at Hack A Day, I managed to pick up a Texas Instruments experimenter board for half price. Only $13.66! That included shipping! An offer I could not refuse.

The board was a MSP-EXP430FR5739. This board was developed to show off a new(ish) system of memory called FRAM (Ferroelectric Random Access Memory). FRAM boasts a write endurance of 100,000,000,000,000 cycles. What the hell? Thats a huge number. Over 100 billion times more than FLASH memory. That thumb drive with all you back-ups isn’t looking all that safe anymore now is it?
FRAM also writes a hell of a lot faster than FLASH. like, 100 times faster.

You must be thinking, “If FRAM is so good, why do we still use FLASH memory?”
I’m glad you asked that.
While FRAM is more reliable, faster and uses less power, it also have several flaws.
As with all new stuff, It’s expensive! That is the main point in it not taking over FLASH. No one likes spending lots of money, especially big corporations who cut corners to save 1c per product…
Capacity. It just doesn’t, at the moment, have the same capacity for storage compared to FLASH.

That’s enough of me plugging the FRAM. On to plugging the experimenters board infront of me.
This little baby is a 16 bit RISC architecture MCU running at 8MHz. On the board there is a 3 axis accelerometer, a thermistor, 8 LEDs and 2 switches. Other TI boards can be connected to it via a couple of header plugs at the back of the board. All PC and USART conections go through a micro-usb plug at the top of the board. Power is also drawn from USB.

Wow that’s a piss poor photo. Man, I need a new camera…

3 axis accelerometer and a PC interface? I think a gesture control for my PC is on the cards…

Well enough from me today. This short post turned into quite a long one. I should probably go do the washing up now… Have fun!