VC++ 6.0, MFC Sample "VCTERM", the Propeller, and serial communication
idbruce
Posts: 6,197
Hello Everyone
UPDATED! I will now be offering custom WINDOW applications for serial communications with the Propeller chip.
This thread is an offshoot of Get data from Notepad into Propeller which can be found here: and DEMO: Microsoft Word 2010 ---> Propeller communication which can be found here:
So I ask, "If you could control your computer with a Propeller, what would you like to do with a flexible serial port connection?"
I am really liking all the different possibilities. WINDOWS users, now is the time to show your support for Microsoft.
Suggested Propeller object with the following methods:
EDIT: This sample only includes support for ASCII
UPDATED! I will now be offering custom WINDOW applications for serial communications with the Propeller chip.
This thread is an offshoot of Get data from Notepad into Propeller which can be found here: and DEMO: Microsoft Word 2010 ---> Propeller communication which can be found here:
http://forums.parallax.com/showthread.php?133923-DEMO-Microsoft-Word-2010-gt-Propeller-communication
I realized in the first linked thread that the thought of having a serial port listening program on the PC side of a Propeller chip offers many possibilites, which include:
- File creation and I/O on PC from the Propeller
- In conjunction with FTP, file creation and I/O on internet through the PC from the Propeller
- Automatic cross communication between the PC and the Propeller
- Updating variables on the Propeller
- Run PC program executables from the Propeller
- All of these possibilities combined
- And many other possibilties
So I ask, "If you could control your computer with a Propeller, what would you like to do with a flexible serial port connection?"
I am really liking all the different possibilities. WINDOWS users, now is the time to show your support for Microsoft.
Suggested Propeller object with the following methods:
- CreatePCFile
- ReadPCFile
- WritePCFile
- SendEmail
- Will add more later
EDIT: This sample only includes support for ASCII
Comments
I think I am going to change direction here, but maybe not just yet. In another thread, I provided a link to some VC++ code for serial communications, which is:
So what does this mean? It means that I now have a programming template for serial communications in VC++ 6.0 for MFC. And what does that mean? That means that old Brucey boy has a new toy. This is really exciting!!!!!! I can eliminate all the hassle of figuring out the serial communication, and go straight to programming useful software with nice interfaces for the Propeller.
I believe I will still test with the VCTERM sample provided by Microsoft, but if it fails, I still have something that already works perfectly.
Of course, this technology was available through Parallax by the release of the source code for the Parallax Serial Terminal, but it was not in VC++.
All I need now is some very useful ideas on what to do with this.
In addition to any free software that I may provide, I will also create custom WINDOW applications for those of you who require such services.
Bruce
For my first sample, I will create a piece of software that when a Propeller PIN 0 = 1 the software will:
- Create an internet shortcut on the Desktop to the Propeller forum, with the shortcut being represented by the ole beany, providing that Parallax does not object.
- Grab the web page source code from Parallax's home page and download it to the Desktop, and then open the file for viewing for 5 seconds, then close the file, alter it's content, reopen it for 5 seconds, then close it again, and delete it.
- Get the latest stock listing for Microsoft and upload it back to the Propeller to display on LCD
- Update the Propeller with the stock listing for Microsoft every minute for LCD display
- And finally open this thread on your computer.
The remaining problem is how to make this example available to you.http://www.agaverobotics.com/spinneret/controlpanel.htm
http://spinneret.servebeer.com:5000/pagecnt
I do not dispute that. This is a completely different application. You are attached to the Spinneret. I will be attached to a PC. From your Spinneret can you open NotePad on your PC, write "Mary had a little lamb", close the file, and FTP it to your favorite website? I don't think so.
or
With your Spinneret can you format a drive on your PC by pressing a button connected to PIN 0 on your Propeller? I don't think so. Of course this is extreme, but it could be done very easily. Would you like to test and see for yourself I could do this, but I do not create harmful software.
One other question, how much hard drive space does the Spinneret have for holding data?
Absolutely you can but it would be pin 24, 25, 26, or 27.
I'm using a 4 G SD card
Some other interesting thing the Spinneret can do...
Send Email
Read and Write to a database
Transfer large files
Program a second Propeller
Edit: I'm not trying to argue just pointing out other Parallax technology that's handy for Prop to PC communication.
I am not trying to argue either...
In fact, I am glad you responded. I was really unaware of what the Spinneret could do. However, like I said, they are two completely different applications, but it now appears that both applications can accomplish some of the same tasks.
Bruce
I agree with you when you say it is "exciting" and it does open up many options that are performed better on a PC than can be attained by other forms of hardware. It is quite common to see a machine that would once be PLC controlled now using PC control, the main GUI programmed with one of the above languages. These controllers have interfaces that coordinate general purpose I/O, initialize and monitor industrial servo drives, display images from cameras, send and receive signals from peripheral equipment, have inbuilt oscilloscope functions and display everything on a very professional looking touch screen in real time.
There may or may not be a place in that scenario for the Propeller but I do believe there are many applications where a Prop and PC GUI would compliment each other
On a smaller scale there are hundreds of utility programs that people would find useful when working with micros like terminals, programmers, logic analyzers, educational demos. Depending on skill level I think some of these utilities would be quite easy to create,
I look forward to watching your progress.
Jeff T.
Jeff, thanks for the response. I realize I must not be the first person to think of this, but I never thought of it or even heard of it until Phil made a comment the other day that really made me think of all the possibilities.
I am pretty knowledgable about the WINDOWS OS and the WINDOWS API, so these kind of thoughts really get my blood pumping. I am unsure what I will do with this knowledge at this point, except for one thing. The very first thing I am going to do is create a programming WIZARD. Since I am unaware what you know, please allow me to describe. A programming WIZARD takes all the files from a given project and creates a project template. Once you have the template, it is just a matter of supplying a project name, and some other miscellaneous items, and pressing a button, and POOF you have a ready made project capable of compiling and running. From that point, it is just a matter of program customization. Needless to say that once the WIZARD is created, creating custom serial GUIs should be a breeze.
I will probably create one free serial terminal to show off my skills and knowledge, and then I will probably create custom serial interfaces for monetary reward. Of course I will have my own little special projects, I just don't know what they will be just yet.
Bruce
'
This has been around since the days of DOS.
http://www.wikipedia.org/wiki/Distributed_control_system
'
I think your way over thinking this. (WIZARD)
'
I'll pull up some of my GUI stuff and post later.
Perhaps I am overthinking this, but I am going to continue thinking about until I come up with some very good ideas.
Actually that would be cool stuff, but I was thinking much simpler than that
Creating a WIZARD is fairly straightforward, nothing to daunting about it. Check out this article:
How to create a simple custom AppWizard in Visual C++ 6.0
http://support.microsoft.com/kb/316001
It just makes replicating the framework of a particular type of application very easy to reproduce. Probably a 1/2 to 1 hour job. I made one once before, piece of cake.
Bruce
'
Oh............OK
'
I see it now. Pretty slick idea really.