EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

PC based program to go with MSP430 projects

Started by Peter Grey January 13, 2011
Here are some Web pages that provide some help on using C# with USB devices.
http://www.developerfusion.com/article/84338/making-usb-c-friendly/
http://sourceforge.net/projects/libusbdotnet/
http://sushantkumar.wordpress.com/tech/c-code-4-usb/


Howard
On 1/14/2011 2:12 PM, Donald H wrote:
>
> Are there any good sites out there with code for C# that explain
> access to USB ports.
>
> I am not a C# programmer and would like to get some PC applications
> running.
>
> Any suggestions greatly appreciated.
>
> don



Beginning Microcontrollers with the MSP430

On 13/01/2011 07:51, Peter Grey wrote:
> I have been using Visual Basic 4 to run programs on my laptop that
> communicate with various MSP430 projects and products I have. I now
> find that they will not run on Windows 7 operating systems. The
> programs are not complex and VB4 is really an overkill. Does anyone
> have any suggestions? I need to be able to compile it and send it to
> customers to use on their computer.
>

It depends on your experiences, and the sort of programs you want to
write. I do most of my PC programming using Python - it's a lot higher
level than Basic or C#, it's cross-platform, it's interpreted (making it
easy for testing), and there are huge numbers of libraries. But there
is no single dedicated development environment like there is for VB -
the IDE's that exist are a lot smaller and simpler.

As for the language, once you have got used to Python with its direct
support for lists, dictionaries, flexible classes, introspection, list
comprehension, lambda functions, garbage collection, etc., then
something like VB or C# seems so old-fashioned and limited, and so
verbose and tedious to write.

At 04:58 AM 1/15/2011, you wrote:

Thanks for all the replies on this topic. I only
do a small amount of PC programming. It is mainly
serial I/O and a little processing of data and
providing the customer with an ASCII file. The
maths is very limited. I am going to look at
RobotBASIC and possibly PYTHON. It looks like
either would be more than adequate for my needs,
and it is free! VB6 & Express is very much an
overkill for any applications. My programming is
about once every 3 months which means I have to
go back and learn what I have forgotten.

Thanks again

Peter
> > I have been using Visual Basic 4 to run programs on my laptop that
> > communicate with various MSP430 projects and products I have. I now
> > find that they will not run on Windows 7 operating systems. The
> > programs are not complex and VB4 is really an overkill. Does anyone
> > have any suggestions? I need to be able to compile it and send it to
> > customers to use on their computer.
>
>Try RobotBASIC. It isn't just for simulating robots and it is more
>than the old style of basic. It is free, compiles to an exe, and easy
>to distribute.
>
>http://www.robotbasic.org/
>
> From the site:
>
>No installation is required you can run RobotBASIC from a USB-drive,
>a CD, or even from a web page.
>
>Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great
>for introducing programming to non-programmers).
>
>GUI commands that create buttons, text boxes, edit boxes, list boxes,
>dialogue windows, message boxes, radio buttons, check boxes, sliders,
>and more.
>
>Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=,
>!=, &&)
>
>Increased productivity from numerous helper functions that
>facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
>animation, robot vision (including web cam support), extensive BMP
>image manipulation, matrix math, both high and low-level file I/O, the
>ability to send Emails (SMTP) and communicate over the Internet (UDP
>and TCP protocols), and much more.
>
>Develop and debug programs in an easy-to-use INTERPRETER-based IDE
>(Integrated Development Environment), then COMPILE your programs to
>standalone EXEs for easy distribution.
>
>Direct support for the USBmicro U4x1 family of I/O modules that
>provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as
>well as 16 lines of TTL I/O
>
>Over 800 commands and functions often allow a few lines of code to
>provide the functionality of hundreds of lines in many other
>languages.
>
>RobotBASIC is FREE to schools, organizations, individuals - EVERYONE!
>
>
You might also look at Liberty Basic, it is not free but is reasonably priced. They have an excellent support forum, including a topic for hardware interfacing.
--- In m..., Peter Grey wrote:
>
> At 04:58 AM 1/15/2011, you wrote:
>
> Thanks for all the replies on this topic. I only
> do a small amount of PC programming. It is mainly
> serial I/O and a little processing of data and
> providing the customer with an ASCII file. The
> maths is very limited. I am going to look at
> RobotBASIC and possibly PYTHON. It looks like
> either would be more than adequate for my needs,
> and it is free! VB6 & Express is very much an
> overkill for any applications. My programming is
> about once every 3 months which means I have to
> go back and learn what I have forgotten.
>
> Thanks again
>
> Peter
>
>
> > > I have been using Visual Basic 4 to run programs on my laptop that
> > > communicate with various MSP430 projects and products I have. I now
> > > find that they will not run on Windows 7 operating systems. The
> > > programs are not complex and VB4 is really an overkill. Does anyone
> > > have any suggestions? I need to be able to compile it and send it to
> > > customers to use on their computer.
> >
> >Try RobotBASIC. It isn't just for simulating robots and it is more
> >than the old style of basic. It is free, compiles to an exe, and easy
> >to distribute.
> >
> >http://www.robotbasic.org/
> >
> > From the site:
> >
> >No installation is required you can run RobotBASIC from a USB-drive,
> >a CD, or even from a web page.
> >
> >Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great
> >for introducing programming to non-programmers).
> >
> >GUI commands that create buttons, text boxes, edit boxes, list boxes,
> >dialogue windows, message boxes, radio buttons, check boxes, sliders,
> >and more.
> >
> >Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=,
> >!=, &&)
> >
> >Increased productivity from numerous "helper functions" that
> >facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
> >animation, robot vision (including web cam support), extensive BMP
> >image manipulation, matrix math, both high and low-level file I/O, the
> >ability to send Emails (SMTP) and communicate over the Internet (UDP
> >and TCP protocols), and much more.
> >
> >Develop and debug programs in an easy-to-use INTERPRETER-based IDE
> >(Integrated Development Environment), then COMPILE your programs to
> >standalone EXE's for easy distribution.
> >
> >Direct support for the USBmicro U4x1 family of I/O modules that
> >provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as
> >well as 16 lines of TTL I/O
> >
> >Over 800 commands and functions often allow a few lines of code to
> >provide the functionality of hundreds of lines in many other
> >languages.
> >
> >RobotBASIC is FREE to schools, organizations, individuals - EVERYONE!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
At 01:05 AM 1/18/2011, you wrote:

I took a look at this and their web site says it
does not do COM components. I assume this means
the serial ports, virtual or otherwise??

>You might also look at Liberty Basic, it is not
>free but is reasonably priced. They have an
>excellent support forum, including a topic for hardware interfacing.
>--- In m..., Peter Grey wrote:
> >
> > At 04:58 AM 1/15/2011, you wrote:
> >
> > Thanks for all the replies on this topic. I only
> > do a small amount of PC programming. It is mainly
> > serial I/O and a little processing of data and
> > providing the customer with an ASCII file. The
> > maths is very limited. I am going to look at
> > RobotBASIC and possibly PYTHON. It looks like
> > either would be more than adequate for my needs,
> > and it is free! VB6 & Express is very much an
> > overkill for any applications. My programming is
> > about once every 3 months which means I have to
> > go back and learn what I have forgotten.
> >
> > Thanks again
> >
> > Peter
> >
> >
> > > > I have been using Visual Basic 4 to run programs on my laptop that
> > > > communicate with various MSP430 projects and products I have. I now
> > > > find that they will not run on Windows 7 operating systems. The
> > > > programs are not complex and VB4 is really an overkill. Does anyone
> > > > have any suggestions? I need to be able to compile it and send it to
> > > > customers to use on their computer.
> > >
> > >Try RobotBASIC. It isn't just for simulating robots and it is more
> > >than the old style of basic. It is free, compiles to an exe, and easy
> > >to distribute.
> > >
> > >http://www.robotbasic.org/
> > >
> > > From the site:
> > >
> > >No installation is required you can run RobotBASIC from a USB-drive,
> > >a CD, or even from a web page.
> > >
> > >Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great
> > >for introducing programming to non-programmers).
> > >
> > >GUI commands that create buttons, text boxes, edit boxes, list boxes,
> > >dialogue windows, message boxes, radio buttons, check boxes, sliders,
> > >and more.
> > >
> > >Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=,
> > >!=, &&)
> > >
> > >Increased productivity from numerous "helper functions" that
> > >facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
> > >animation, robot vision (including web cam support), extensive BMP
> > >image manipulation, matrix math, both high and low-level file I/O, the
> > >ability to send Emails (SMTP) and communicate over the Internet (UDP
> > >and TCP protocols), and much more.
> > >
> > >Develop and debug programs in an easy-to-use INTERPRETER-based IDE
> > >(Integrated Development Environment), then COMPILE your programs to
> > >standalone EXE's for easy distribution.
> > >
> > >Direct support for the USBmicro U4x1 family of I/O modules that
> > >provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as
> > >well as 16 lines of TTL I/O
> > >
> > >Over 800 commands and functions often allow a few lines of code to
> > >provide the functionality of hundreds of lines in many other
> > >languages.
> > >
> > >RobotBASIC is FREE to schools, organizations, individuals - EVERYONE!
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
Peter,

It's an off-chance that they're referring to Windows COM components, rather that COMM ports, etc...

Bob
--- In m..., Peter Grey wrote:
>
> At 01:05 AM 1/18/2011, you wrote:
>
> I took a look at this and their web site says it
> does not do COM components. I assume this means
> the serial ports, virtual or otherwise??
>
>
>
>
> >You might also look at Liberty Basic, it is not
> >free but is reasonably priced. They have an
> >excellent support forum, including a topic for hardware interfacing.
> >
> >
> >--- In m..., Peter Grey wrote:
> > >
> > > At 04:58 AM 1/15/2011, you wrote:
> > >
> > > Thanks for all the replies on this topic. I only
> > > do a small amount of PC programming. It is mainly
> > > serial I/O and a little processing of data and
> > > providing the customer with an ASCII file. The
> > > maths is very limited. I am going to look at
> > > RobotBASIC and possibly PYTHON. It looks like
> > > either would be more than adequate for my needs,
> > > and it is free! VB6 & Express is very much an
> > > overkill for any applications. My programming is
> > > about once every 3 months which means I have to
> > > go back and learn what I have forgotten.
> > >
> > > Thanks again
> > >
> > > Peter
> > >
> > >
> > > > > I have been using Visual Basic 4 to run programs on my laptop that
> > > > > communicate with various MSP430 projects and products I have. I now
> > > > > find that they will not run on Windows 7 operating systems. The
> > > > > programs are not complex and VB4 is really an overkill. Does anyone
> > > > > have any suggestions? I need to be able to compile it and send it to
> > > > > customers to use on their computer.
> > > >
> > > >Try RobotBASIC. It isn't just for simulating robots and it is more
> > > >than the old style of basic. It is free, compiles to an exe, and easy
> > > >to distribute.
> > > >
> > > >http://www.robotbasic.org/
> > > >
> > > > From the site:
> > > >
> > > >No installation is required you can run RobotBASIC from a USB-drive,
> > > >a CD, or even from a web page.
> > > >
> > > >Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great
> > > >for introducing programming to non-programmers).
> > > >
> > > >GUI commands that create buttons, text boxes, edit boxes, list boxes,
> > > >dialogue windows, message boxes, radio buttons, check boxes, sliders,
> > > >and more.
> > > >
> > > >Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=,
> > > >!=, &&)
> > > >
> > > >Increased productivity from numerous "helper functions" that
> > > >facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
> > > >animation, robot vision (including web cam support), extensive BMP
> > > >image manipulation, matrix math, both high and low-level file I/O, the
> > > >ability to send Emails (SMTP) and communicate over the Internet (UDP
> > > >and TCP protocols), and much more.
> > > >
> > > >Develop and debug programs in an easy-to-use INTERPRETER-based IDE
> > > >(Integrated Development Environment), then COMPILE your programs to
> > > >standalone EXE's for easy distribution.
> > > >
> > > >Direct support for the USBmicro U4x1 family of I/O modules that
> > > >provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as
> > > >well as 16 lines of TTL I/O
> > > >
> > > >Over 800 commands and functions often allow a few lines of code to
> > > >provide the functionality of hundreds of lines in many other
> > > >languages.
> > > >
> > > >RobotBASIC is FREE to schools, organizations, individuals - EVERYONE!
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
At 09:48 AM 1/18/2011, you wrote:
Bob,

I suspect you are right as I looked at further
examples and they talk about accessing serial ports. I need to read more.

Peter

>Peter,
>
>It's an off-chance that they're referring to
>Windows COM components, rather that COMM ports, etc...
>
>Bob
>--- In m..., Peter Grey wrote:
> >
> > At 01:05 AM 1/18/2011, you wrote:
> >
> > I took a look at this and their web site says it
> > does not do COM components. I assume this means
> > the serial ports, virtual or otherwise??
> >
> >
> >
> >
> > >You might also look at Liberty Basic, it is not
> > >free but is reasonably priced. They have an
> > >excellent support forum, including a topic for hardware interfacing.
> > >
> > >
> > >--- In m..., Peter Grey wrote:
> > > >
> > > > At 04:58 AM 1/15/2011, you wrote:
> > > >
> > > > Thanks for all the replies on this topic. I only
> > > > do a small amount of PC programming. It is mainly
> > > > serial I/O and a little processing of data and
> > > > providing the customer with an ASCII file. The
> > > > maths is very limited. I am going to look at
> > > > RobotBASIC and possibly PYTHON. It looks like
> > > > either would be more than adequate for my needs,
> > > > and it is free! VB6 & Express is very much an
> > > > overkill for any applications. My programming is
> > > > about once every 3 months which means I have to
> > > > go back and learn what I have forgotten.
> > > >
> > > > Thanks again
> > > >
> > > > Peter
> > > >
> > > >
> > > > > > I have been using Visual Basic 4 to run programs on my laptop that
> > > > > > communicate with various MSP430 projects and products I have. I now
> > > > > > find that they will not run on Windows 7 operating systems. The
> > > > > > programs are not complex and VB4 is really an overkill. Does anyone
> > > > > > have any suggestions? I need to be
> able to compile it and send it to
> > > > > > customers to use on their computer.
> > > > >
> > > > >Try RobotBASIC. It isn't just for simulating robots and it is more
> > > > >than the old style of basic. It is free, compiles to an exe, and easy
> > > > >to distribute.
> > > > >
> > > > >http://www.robotbasic.org/
> > > > >
> > > > > From the site:
> > > > >
> > > > >No installation is required you can run RobotBASIC from a USB-drive,
> > > > >a CD, or even from a web page.
> > > > >
> > > > >Use legacy INPUT and PRINT statements for QUICK and EASY I/O (great
> > > > >for introducing programming to non-programmers).
> > > > >
> > > > >GUI commands that create buttons, text boxes, edit boxes, list boxes,
> > > > >dialogue windows, message boxes, radio buttons, check boxes, sliders,
> > > > >and more.
> > > > >
> > > > >Use standard BASIC syntax or a modified C-style syntax (i.e. ++, +=,
> > > > >!=, &&)
> > > > >
> > > > >Increased productivity from numerous "helper functions" that
> > > > >facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
> > > > >animation, robot vision (including web cam support), extensive BMP
> > > > >image manipulation, matrix math, both high and low-level file I/O, the
> > > > >ability to send Emails (SMTP) and communicate over the Internet (UDP
> > > > >and TCP protocols), and much more.
> > > > >
> > > > >Develop and debug programs in an easy-to-use INTERPRETER-based IDE
> > > > >(Integrated Development Environment), then COMPILE your programs to
> > > > >standalone EXE's for easy distribution.
> > > > >
> > > > >Direct support for the USBmicro U4x1 family of I/O modules that
> > > > >provide 1-wire, SPI, and I2C Serial control of Digital MicroDevices as
> > > > >well as 16 lines of TTL I/O
> > > > >
> > > > >Over 800 commands and functions often allow a few lines of code to
> > > > >provide the functionality of hundreds of lines in many other
> > > > >languages.
> > > > >
> > > > >RobotBASIC is FREE to schools, organizations, individuals - EVERYONE!
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
Peter Grey wrote:
> I have been using Visual Basic 4 to run programs on my laptop that
> communicate with various MSP430 projects and products I have. I now
> find that they will not run on Windows 7 operating systems. The
> programs are not complex and VB4 is really an overkill. Does anyone
> have any suggestions? I need to be able to compile it and send it to
> customers to use on their computer.
>
>
Hi Peter,
I thought I'd mention that I installed VS express on my son's computer.
He wanted to learn to program. He picked up doing console apps in short
order. You already know C so very little to learn. Just a layer of
standard io for the com port and files you want to process. Console apps
are very small and run on any windows OS. And as it is C++ you can use
Boost, other third party libs, the standard library if you end up
needing to go there.

If you are looking for a more sophisticated GUI, that is something else.
But it doesn't sound like it.

Best, Dan.

At 02:14 AM 1/19/2011, you wrote:

Hi Dan,

I am not sure why you thought I knew C. I only work in assembler for
the MSP430. I can muddle my way thru a C program if forced but that
is different from writing a program. I have had a look at VB Express
and the tutorial shows how to do console apps and indeed it looks
very simple. I am still considering RobotBasic and investigating this.

Thanks

Peter
>Peter Grey wrote:
> > I have been using Visual Basic 4 to run programs on my laptop that
> > communicate with various MSP430 projects and products I have. I now
> > find that they will not run on Windows 7 operating systems. The
> > programs are not complex and VB4 is really an overkill. Does anyone
> > have any suggestions? I need to be able to compile it and send it to
> > customers to use on their computer.
> >
> >
>Hi Peter,
>I thought I'd mention that I installed VS express on my son's computer.
>He wanted to learn to program. He picked up doing console apps in short
>order. You already know C so very little to learn. Just a layer of
>standard io for the com port and files you want to process. Console apps
>are very small and run on any windows OS. And as it is C++ you can use
>Boost, other third party libs, the standard library if you end up
>needing to go there.
>
>If you are looking for a more sophisticated GUI, that is something else.
>But it doesn't sound like it.
>
>Best, Dan.
>
>
Peter Grey wrote:
> At 02:14 AM 1/19/2011, you wrote:
>
> Hi Dan,
>
> I am not sure why you thought I knew C. I only work in assembler for
> the MSP430. I can muddle my way thru a C program if forced but that
> is different from writing a program.

Hi Peter,
C is assembly language, just not device specific. If you come at it that
way you may find it comfortable. In assembly you work with data and
pointers, same for C. Such is its roots. Don't look at it as a machine
abstraction, just an abstraction of a particular machine. My first
language was 'machine code'. And IMHO, you can be so much more
productive with C than you can with assembly. I'll drop to assembly
where required. The operative is, 'required'. i.e. the compiler won't do
what I want it to do.

> I have had a look at VB Express
> and the tutorial shows how to do console apps and indeed it looks
> very simple. I am still considering RobotBasic and investigating this.
>

RobotBasic reminds me of my turtle from long ago, I still have that
device built with parts from an erector set. I don't know what your
plans for your future are but C(++) will remain a mainstay as it is
truly a low level language. I wrote one commercial app in basic back in
the early 80s, I've never used it since. Now maybe microsoft managed to
bring basic into the future, but it is still basic. Just my personal
opinion I guess...

Does VB depend on the clr? If so, you could run into trouble if the
proper .NET is not installed on the client machine. From what I see you
don't want to use an installer for your support app, so, you won't get
it installed. You need to look into that if you go with VB. I know zilch
about VB, so I don't know. But I do know that our product installer
carries the proper .NET when installing for what we do. (We have some C#
that depends on ~4.0. For the clients that have not installed our latest
release yet patch, I have to teamview in and install the stuff. Thank
goodness there are just a small handful. The ones where I ask, 'Do you
have the disk we sent you?'; and they say, 'Can't find it'. But they
still have to get that report out today! :)

Point is, a C console app is native, it doesn't require special OS
support. With very minor modifications it should run on Linux or
anyone's OS. If programming is your thing, make C your 'next' language,
really. All the other languages have their vertical importances, and you
should put as many as you can under your belt. But the machine is the
guts and that is what C is all about.

Best, Dan.


The 2024 Embedded Online Conference