
Tieri
-
Content Count
18 -
Joined
-
Last visited
-
Days Won
1
Reputation Activity
-
Tieri reacted to Fmilburn in DriverLib Examples for the MSP430F5529
Energia and Arduino users eventually get to the point where they need more direct access to the hardware if they take on more complicated projects. In addition to the direct access of registers using the provided header files, TI offers DriverLib which contains abstractions for accessing the peripherals.
To better understand the peripherals, and to check out DriverLib, I recently created 20+ short examples for my own edification. All of them were written for the MSP430F5529 LaunchPad and most of the peripherals are covered. In some cases pushbuttons, LEDs, resistors, potentiometer, etc. are required that you probably have on hand. A multimeter is required, and in some cases an oscilloscope and logic analyzer are instructive but not necessary.
DriverLib SPI Example 13A_USCI_B_SPI_MCP41010_digiPot
All of the examples are located here: https://github.com/fmilburn3/MSP430F5529_driverlib_examples
It is necessary to have some understanding of the registers before using DriverLib because the DriverLib documentation doesn't describe how the peripherals and their registers work. The documentation for registers is located in the User
-
Tieri got a reaction from tripwire in (Universal) Color LCD graphics library (2)
This was the case, at least for me. According to the datasheet I have for this display, the RGB/BGR direction is controlled by HW pin, so I made the following changes to the code in graphics.c file.
void setColor(u_int color) { #if defined SWAP_TO_BRG colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11; colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8; #else colorLowByte = color; colorHighByte = color >> 8; #endif } void setBackgroundColor(u_int color) { #if defined SWAP_TO_BRG colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11; colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8; #else bgColorLowByte = color; bgColorHighByte = color >> 8; #endif } Then I just defined "SWAP_TO_BRG" and the colors work as they should.
I know this is old discussion, but decided to post this anyway in hope that it might be helpful to someone.
-
Tieri got a reaction from RobG in (Universal) Color LCD graphics library (2)
This was the case, at least for me. According to the datasheet I have for this display, the RGB/BGR direction is controlled by HW pin, so I made the following changes to the code in graphics.c file.
void setColor(u_int color) { #if defined SWAP_TO_BRG colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11; colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8; #else colorLowByte = color; colorHighByte = color >> 8; #endif } void setBackgroundColor(u_int color) { #if defined SWAP_TO_BRG colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11; colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8; #else bgColorLowByte = color; bgColorHighByte = color >> 8; #endif } Then I just defined "SWAP_TO_BRG" and the colors work as they should.
I know this is old discussion, but decided to post this anyway in hope that it might be helpful to someone.
-
Tieri got a reaction from cde in Stupidest Thing you had to Troubleshoot?
Setting different addreses to two of nRF24L01's. Took me two days to figure...
L
-
Tieri reacted to monsonite in SIMPL - A Tiny Language for MSP430
Hi All
Back in May 2013, I came across a piece of development work by Ward Cunningham (wiki inventor) for a tiny interpreted language "Txtzyme" that ran on Arduino - or virtually any other micro that was supported by a C compiler.
(The name Txtzyme comes from text and enzyme - an enzyme being a biological catalyst - or a substance that causes (chemical) change to occur faster).
I was intrigued how under 100 lines of C code formed such a useful and extendable language - that I quickly had it running on an Arduino, and was making my own modifications and improvements. I have since built on Ward's work and called my project SIMPL - Serial Interpreted Microcontroller Language.
(Link to Ward's original work is here https://github.com/WardCunningham/Txtzyme )
Ward had created a "nano interpreter" in just a few lines of C code, which formed the heart of an interactive language for controlling hardware.
Through just a dozen commands it would allow port manipulation, flashing LEDs, musical tone generation, PWM, printing to screen and sensing analogue signals. The language communicated through a uart port to the PC.
Originally Txtzyme offered just these commands - see Ward Cunningham's Read Me:
a-f Select an I/O port
h help - a summary of commands
i input
k a loop counter - which decrements each time around the loop see {}
m millisecond delay
o output
p print the value of variable x followed by carriage return/line feed
s sample an ADC channel
u microsecond delay
x a 16 bit integer variable
{} code between these braces is repeated as a loop
_ _ characters between the underscores are printed to the terminal
Txtzyme was small, entensible and portable - it will run on almost any microcontroller. The Txtzyme scripts were very small, human readable and easy to send from one device to another.
One early application was for the Arduino to be used as an I/O controller board attached to a Raspberry Pi. The Pi would send a simple command via it's uart and the Arduino would perform an I/O function, sequence or whatever.
Some months later, I decided to try Txtzyme with the MSP430, as I had got a LaunchPad and Energia had just appeared on my radar.
So I took the original Txtzyme Arduino sketch, loaded into Energia - and behold it worked first time. Txtzyme was a universal "lingua franca" that could be used on any micro.
If you want to try arecent version of SIMPL that runs on a LaunchPad MSP430G2553 - here is the Github Gist
https://gist.github.com/anonymous/034dd41f108263d09803
Since then I have ported it to AVR Cortex M3, M4, and several soft-core processors running on FPGAs.
Currently my aim is to reduce the SIMPL Kernel to approximately 2kbytes - so that it can become a "Smart Bootloader" - residing on the microcontroller in the bootloader area, and being immediately available as an interactive toolkit for exercising hardware and performing small applications.
I have written extensively about it in my blog - starting here from May 2013
http://sustburbia.blogspot.co.uk/2013/05/txtzyme-minimal-interpreter-and.html
I have also just this week started a wiki - so that all the new information can reside in 1 place.
https://simplex1.wiki.zoho.com/HomePage.html
Please get in touch if you would like to know more about SIMPL and my project aims.
Ken
London
-
-
Tieri reacted to L.R.A in Great deals in the TI Store Celebrating Engineers Week!
This aren't that great anymore IMO. Just because for me it's 30$ shipping. I need to get a ton of things for it to be worth it.
3 MSP432 are cheaper to get locally for the normal price than getting from Estore with that discount, especially due to customs.
Lucky US ppl
-
Tieri got a reaction from RobG in Mailbag
Got a parcel from US of A! My order from 43oh store had arrived. It was shipped 13.6, so very fast! Only five day's (including the weekend) to other side of the world!(Finland)
One MSP430G2955 Breakout Board V2 PCB and one Color LCD Booster pack PCB v1.2. Big thanks to @@RobG for making these awesome boards and to @@bluehash for making them available also to us who live in periphery.
The LP actually arrived last Friday, as I was in the middle of cursing my media server for cunning out in the middle of interesting football match. The relay boards also arrived last week from china. I have been too busy watching world class football, to take pictures and post them here.
No time to put these baby's in action either, because it is start of midsummer festival (juhannus) in here. So everybody is too busy to get drunk, drive to their summer cottage and drown. Usually in that particular order. Funniest thing is that it was snowing in here yesterday. Have to love the summer weather in Finland. I hope it is better for you all, where ever you might be. Happy summer to everybody!
-
Tieri got a reaction from bluehash in Mailbag
Got a parcel from US of A! My order from 43oh store had arrived. It was shipped 13.6, so very fast! Only five day's (including the weekend) to other side of the world!(Finland)
One MSP430G2955 Breakout Board V2 PCB and one Color LCD Booster pack PCB v1.2. Big thanks to @@RobG for making these awesome boards and to @@bluehash for making them available also to us who live in periphery.
The LP actually arrived last Friday, as I was in the middle of cursing my media server for cunning out in the middle of interesting football match. The relay boards also arrived last week from china. I have been too busy watching world class football, to take pictures and post them here.
No time to put these baby's in action either, because it is start of midsummer festival (juhannus) in here. So everybody is too busy to get drunk, drive to their summer cottage and drown. Usually in that particular order. Funniest thing is that it was snowing in here yesterday. Have to love the summer weather in Finland. I hope it is better for you all, where ever you might be. Happy summer to everybody!
-
Tieri got a reaction from spirilis in Mailbag
Got a parcel from US of A! My order from 43oh store had arrived. It was shipped 13.6, so very fast! Only five day's (including the weekend) to other side of the world!(Finland)
One MSP430G2955 Breakout Board V2 PCB and one Color LCD Booster pack PCB v1.2. Big thanks to @@RobG for making these awesome boards and to @@bluehash for making them available also to us who live in periphery.
The LP actually arrived last Friday, as I was in the middle of cursing my media server for cunning out in the middle of interesting football match. The relay boards also arrived last week from china. I have been too busy watching world class football, to take pictures and post them here.
No time to put these baby's in action either, because it is start of midsummer festival (juhannus) in here. So everybody is too busy to get drunk, drive to their summer cottage and drown. Usually in that particular order. Funniest thing is that it was snowing in here yesterday. Have to love the summer weather in Finland. I hope it is better for you all, where ever you might be. Happy summer to everybody!
-
Tieri reacted to RobG in Few things for sale
The reason I don't want to ship abroad is lack of tracking. Also, it would cost ~$15 to ship (>10oz.)
-
Tieri reacted to xpg in Release of MSP430Eclipse 1.0.4.1
Hi folks,
Despite not having too much time to spend on this project, I have made a new release, which fixes a couple of bugs, and changes the way the msp430 tools are used:
[*:2ct61l15]- gcc, gdb, and mspdebug are no longer distributed as an eclipse plugin, but as a separate download package. This allows the tools to be installed in a user select location, rather than trying to install into the eclipse directory.
[*:2ct61l15]- MSP430 C/C++ projects can now be created.
[*:2ct61l15]- The protocol (SBW, JTAG) used by MSPDebug can now be selected.
In order to install the plugin, ensure that you have Eclipse Indigo, and add http://eclipse.xpg.dk as a software source in Eclipse, and install the Msp430Eclipse plugin.
Currently, only Indigo is supported, but the plugin might work with Helios as well.
If your system does not have up-to-date version of msp430-gcc, msp430-gdb, and mspdebug, you can download one of the following tool-packages:
Linux 64-bit: msp430-toolchain-linux-amd64-1.0.tar.bz2
Linux 32-bit: msp430-toolchain-linux-i386-1.0.tar.bz2
Extract the package in an appropriate location ($HOME, for instance), and go to Eclipse (with the MSP430Eclipse plugin installed), and from the menu select MSP430->Tool Manager. Click the "Add..."-button, and browse to the tool-package directory. Click "close".
Next, go to the Eclipse preference and select "MSP430". Here you will be able to choose if you want to use the tools from the tool-package, or supplied by the system.
If you are upgrading from an older, simply upgrade the Msp430 Eclipse plugin. You can remove the toolchains installed through eclipse, and install the toolchain packages as described above.
For more information see http://xpg.dk/projects/msp430/msp430-eclipse/.
Feedback is very welcome.
Cheers,
Paul
-
Tieri reacted to xpg in Eclipse plugin for mspdebug and msp430-gcc
It's seem that I finally succeeded in building a plugin for Eclipse, which contains compiled versions of GCC, GDB, and mspdebug, and also integrates these somewhat into Eclipse. Currently, I would strongly advice people, who which to try my plugin, to use Eclipse Indigo.
There are three installable features: MSP430Eclipse, which is the Eclipse integration, and two binary toolchains (32 and 64 bit Linux). Yes, it's Linux only for now. Installing MSP430Eclipse and the appropriate toolchain will take a while, as the toolchains are quite big (yes, there are plenty of improvements to be made). I'll try to describe how to get started with this Eclipse plugin in this post.
Go to the "Help->Install new software" menu, and type in "http://eclipse.xpg.dk" as the repository. If you had installed my previous version, please uninstall it first by going to "Help->About", select "Installation Details" and choose the MSP430Eclipse feature and click "Uninstall".
Once installed, Eclipse will prompt you to restart. Please do. Once Eclipse pops up again, start by going to the Eclipse preferences ( Select menu "Window->Preference"). There should be a MSP430-tab at the left side. Selecting it will show the toolchain configuration. Here it is possible to use the MSP430 toolchain that comes with your distribution, or you can select a prebuild one (if installed). Perform your selection of choice, and hit the "Apply" button.
Next task is to create a MSP430 C project. Go to "File->New->Project...", a project type selection box will appear. Open the "C/C++"-group, select "C Project", and press Next.
Here, you open the "MSP430 Cross Target Application" group and select "Empty Project". Name your project (let's call it Blinky),
and hit the "Next"-button. Next part of the wizard is about configurations, just press "Next" (not Finish, yet). Finally, you will be brought to a dialog to select the MSP430 target. Select the appropriate MCU from the (huge) drop-down list, and then click "Finish".
Now we create a source file: Right click the project and select "New->Source File"; name it "main.c". Write some simple code, such as:
#include #include void delay(unsigned int j) { for(;j>0;j--); } void main(void) { WDTCTL = WDTHOLD | WDTPW; P1DIR |= BIT6; while(true) { P1OUT ^= BIT6; delay(20000); } }
Right click the project and select "Build Project". If everything goes well, your project should start compiling. If not, please let me know .
Before trying to upload the binary to your Launchpad, please ensure that you have the following udev rule installed on your system (and that your user is in the plugdev group):
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0660", GROUP="plugdev"
Place the code in /etc/udev/rules.d/90-launchpad.rules, or something similar. Some distributions have done this for you, others have not.
In order to upload the binary select the MSP430-menu and choose "Upload to target". Note, that this is the MSP430-menu in the main Eclipse menubar (there is also one in the context menu of the project, but it does not work). With a bit of luck, the code should be uploaded to the Launchpad and blink LED2.
Next up is debugging. This is the most experimental part of the plugin, so don't expect it to work :-). Click "Run->Debug Configurations..." from the Eclipse menubar. Right click the "GDB Hardware Debugging"-group on the left, and select "New".
Go to the "Debugger"-tab and ensure that "Use remote target" is checked and that "mspdebug" is chosen in the list. In the "GDB Command" field type: "${dk.xpg.msp430eclipse.variable.debugger}" instead of "gdb".
Now, press "Debug" and the magic should happen. Eclipse will most likely ask if it should open the Debug perspective, say "Yes". The MCU will be reset and the current program location will be somewhere strange. Select the "main.c" file and place a breakpoint somewhere in main().
Press F8 to run until the breakpoint is reached. Now it should be possible to single step through the program. When you are done with debugging, simply terminate the session by pressing the red stop button.
Well, I guess that's it for now. Please try it out, and tell me if it works for you. If there is sufficient interest in this, I'll keep developing it. Now, I need to get some sleep, it's 1 AM and I need to get up early tomorrow :oops:
-
Tieri reacted to zeke in Howto: Launchpad as External Programmer
Hi Guys,
I just fought my way through the process of getting a Launchpad to operate as a standalone programmer on a virgin windows machine. I didn't want to install CCS5.1 to get this to work. I want the bare minimum install footprint because this is going on a production line computer.
Follow this process and it should work for you too.
1. Install the FET430UIF Low-Level USB VCP Drivers.
2. Plug in the Launcpad to the PC and let the PC assign the drivers to the Launchpad.
3. Open up a command console and enter the command "devmgmt.msc".
4. Verify the "MSP430 Application UART" is present under Ports (Com & LPT).
5. Download and Install the FET Pro430 Lite from Elpotronics.
6. Open up FETPro430 and click on Setup->Connection/DeviceReset.
7. Verify that the COM Port is USB (Automatic)
8. Open code file and select your TI .out or Intel .hex file.
9. Select the Microcontroller group and target ie: MSP430G2xx, MSP430G2553
10. Connect GND, TEST and RESET (at minimum) to your target board. Make sure there's power applied to your circuit in this case.
11. Click on AUTO PROG. and watch your target get programmed.
This should work on your windows PC that does has never had CCS installed on it. And you won't have to resort to installing it either.
Also, this should work with any version of Launchpad.