Jump to content
43oh

Recommended Posts

Hey all,
 
Round 2: This extends the peripherals of the MSP430 to a UART based ascii AT command set. For example, send "AT+GET_ADC" over the USB->Serial bridge to get all the ADC values returned. Since I released my first GUI there have been a couple others like it. You will find that this version's strength is that the underlying C driver set is my personal driver set which is quite powerful XD . I then wrote a C# GUI as a wrapper around this command set.
 
Features Implemented: Digital IO, Analog I, PWM, SPI
post-664-0-03018300-1406561954_thumb.png
 
PWM Example:
post-664-0-83207000-1406561969_thumb.png
 
Steps to use:
1. Download code & .exe file here: https://github.com/NateZimmer/ICBM
2. Import C code into CCSV5.1 (haven't tested with other versions) and flash to launchpad.
3. Ensure UART jumpers on the MSP430 Launchpad are set to Hardware based UART on a msp430g2553 launchpad Rev 1.5
4. Run GUI and connect to launchpad.
5. Enjoy!
 
Skip to 10:35 for setup instructions:
 
 


 
Todo:
Implement DCO Calibration for better CLK accuracy
Implement I2C
Implement Graphing/Logging
Implement more flexible spi chip select features
 
Please let me know if this does not work for you
Link to post
Share on other sites
  • 2 weeks later...

Has the GUI worked for any of you?

 

I would like to see how you crafted the GUI.

 

Do you have any intention of sharing your PC side source code?

 

It was done in C# and my C# is an embarrassment. Until I learn how to code in c# as it was meant to be coded, I don't plan to share any of that code. My C code i'm fairly confident is up to snuff but certainly not my c# =(

Link to post
Share on other sites

Well... I tend to blabber a bit but I like making videos occasionally. Haven't heard that its working for anyone so skip to 10:40 to see how to set it up. :)

 

I have never programmed in C#.

I have been emotionally wounded by C++.

I am reasonably proficient in C.

 

There is no reason for you to fear my opinion.

 

Maybe I could learn something new from you?

If ya saw it ya might figure out how not to write C# code but that is about it XD . I'm not doing anything fancy in my GUI, its all from info i've googled. If you want to start up in C# I recommend downloading VS C# express and start playing around in it. It is quite easy.

Link to post
Share on other sites

I would say that username is right. Just download the VS C# express and play around with it. Try some MS tutorials to get started, then think of simple things to try and make. That's the fastest way you can learn to do something in my opinion.

FYI, I went to school with username and it was he who got me into C#, and I still use it everyday. 

Link to post
Share on other sites
  • 5 weeks later...
  • 4 weeks later...

What call did you use for pulling a com port list in the gui?    I was attempting to get it working under wine, trying several of the usual tricks to get com device detection and it's a no go.

 

Sidenote: I thought it would be a good way to learn some python so I'm writing a version of the gui primarily for *nix based systems.  I have about 1/3 - 1/2 of the current features of the windows gui in place along with some basic realtime data plotting/graphing in so far.  It would go a good bit faster if I could get it running under wine or get an outline of the full command syntax / return value formats.

 

(If I ever get to feature parity Ill throw the code up somewhere.)

Link to post
Share on other sites

Being that it's C# and a Microsoft language, there is built in ways to do it.

 

Something along the lines of:

//Scans computer for Com ports and loads names into a list box
            foreach (string item in System.IO.Ports.SerialPort.GetPortNames())
            {
                ComportBox.Items.Add(item);
            }

This won't however pull the "unique" names like FTDI USB RS232, it will instead give COM 5 etc. There are ways to get unique names, but it requires more code.

Link to post
Share on other sites

Being that it's C# and a Microsoft language, there is built in ways to do it.

Right, but I know about a half dozen commonly used methods to scan and enumerate coms in the windows world.  And I know where most of those end up pulling the information from the registry.  So I can then populate the wine bottle registry to expose hardware devices linked from linux land.  None of those appear to work with this app.  If I know for certain what call is made I can likely trace it down.

Link to post
Share on other sites
  • 3 weeks later...

Right, but I know about a half dozen commonly used methods to scan and enumerate coms in the windows world.  And I know where most of those end up pulling the information from the registry.  So I can then populate the wine bottle registry to expose hardware devices linked from linux land.  None of those appear to work with this app.  If I know for certain what call is made I can likely trace it down.

 

 

What call did you use for pulling a com port list in the gui?    I was attempting to get it working under wine, trying several of the usual tricks to get com device detection and it's a no go.

 

Sidenote: I thought it would be a good way to learn some python so I'm writing a version of the gui primarily for *nix based systems.  I have about 1/3 - 1/2 of the current features of the windows gui in place along with some basic realtime data plotting/graphing in so far.  It would go a good bit faster if I could get it running under wine or get an outline of the full command syntax / return value formats.

 

(If I ever get to feature parity Ill throw the code up somewhere.)

 

Sorry biotech, C# does not have any native way to enumerate the friendly names of ports that i'm aware of. Consequently i'm mining a win32 register to get this information. I'm guessing thats why its having issues on wine.

I'm using something very similar to this post: http://www.creativecodedesign.com/2010/03/14/how-to-get-friendly-names-for-com-ports-in-c/

Link to post
Share on other sites
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...