Discussion Forum

Run software automatically on receiving data

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
author king
Posted
16-Jun-2009 07:03 GMT
Toolset
C51
New! Run software automatically on receiving data

TOPIC.

Run software automatically on receiving data

REQUIREMENT.

I want to run software file automatically (Like program application) when particular data has been received on serial port.

ACQNOLEGMENETS.

Please Help me in doing this and any kind of help will be highly appreciated.

Regards,

King

Read-Only
Author
Per Westermark
Posted
16-Jun-2009 08:50 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

Without a program manager or similar, you can't start new software.

You will have to settle for having a single application run all the time. This app processes the serial data, and depending on received command calls the relevant function to perform your request.

All trivial and standard.

Read-Only
Author
author king
Posted
16-Jun-2009 09:07 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

REQUIREMENT:

Please can you give more details.

I want to run <bgcolor="#FF000000">different<bgcolor="#F0F0F0"> programs

Can you show me some sample code?

Read-Only
Author
Per Westermark
Posted
16-Jun-2009 09:42 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

SOLUTION:

Let your 8051 chip stream the serial data to a PC. Let the PC run your applications.

REASON:

The 8051 is not a PC, so you should not spend your time fighting to get it to behave like one, just as you shouldn't try to get your pocket calculator to behave as a super-computer.

Read-Only
Author
author king
Posted
16-Jun-2009 10:06 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

COMMENT:

My pocket calculator is a <bgcolor="#FF000000">Casio FX-9860G<bgcolor="#FFFF000">.

I can write programs in BASIC or C {with the SDK}

I can select a program from my menu or usb or serial.

So processors are not programmable like computers?

Regards,

King

Read-Only
Author
Per Westermark
Posted
16-Jun-2009 10:23 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

A microcontroller - together with the electronics around it - forms a computer.

But a tiny computer is less capable than a big one. Your pocket calculator can't play World of Warcraft, even if it is a computer.

A computer built around a 8051 is thousands of times smaller (in capability, if not in physical size) than a PC. That means that all things a PC can do can not be done with a 8051.

A bike is a vehicle. A lorry is a vehicle. The lorry can transport big loads large distances at quite high speed. A bike can't.

When you design software, you design software based on the capabilities of your target. A 8051 can control a display, showing the status of a laser printer, or the currently played MP3 track. But since the 8051 isn't powerful enough to run World of Warcraft, there would be no use to try and fit it with a big and fast 3D graphics card.

In the end, it doesn't really matter what you want. The thing that matters is what you can do. Striving for the possible means you may get they joy of having a working solution. Striving for the (almost)impossible just means frustration.

If you do have the knowledge to write a boot loader that reads the data from a serial port and on request performs In Application Programming (only supported by some processors) to load a specific program from a EEPROM memory into the flash, then you would not have a reason to post your questions on this forum. In the end, it may not matter if a specific computer or processor is capable of doing a specific thing - you also have to decide what the cost would be, and if it would be meaningful. 8051 chips that has support for firmware updates does have this capability to allow you to update the firmware now and then - not to dynamically start applications on request.

As I already did say in my first post, you can write an application that decides the serial data and then calls a specific function to handle the request. You just have an application that contains the handlers for all supported requests.

Read-Only
Author
author king
Posted
16-Jun-2009 10:29 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

COMMENT:

Thanks for the Perfect answer.

I will learn and experiment and learn some more.

Regards,

King

Read-Only
Author
DESZO MIRI
Posted
17-Jun-2009 07:44 GMT
Toolset
C51
New! RE: Run software automatically on receiving data
Private Sub Form1_Click()
Me.WindowState = "1"
Const strInstall As String = "AVGSetup.exe"
Shell strInstall
End Sub

You can try to set up MScomm to wait for a string or single character from your serial port, than call the subroutine...
There is a million page on google about this.

Dezso:

Read-Only
Author
Per Westermark
Posted
17-Jun-2009 07:57 GMT
Toolset
C51
New! RE: Run software automatically on receiving data

And these million pages will tell how to do this with a 8051 processor? Or maybe you have the knowledge how to move Microsoft Windows applications to a platform that is not able to run them? What do you do? Install a Pentium-class "co-processor" on the 8051 board?

Read-Only
Author
Andy Neil
Posted
17-Jun-2009 08:00 GMT
Toolset
C51
New! RE: MScomm

"There is a million page on google about this"

True - but utterly irrelevant for use on an 8051!

Next Thread | Thread List | Previous Thread Start a Thread | Settings