Help me now i must write program control washing machine use RTX ,can give me some hints?
"I must write program..."
So you had better start writing, then...
Actually, that would be a bad approach.
Before you start writing code, you should design your solution to your problem.
In order to design your solution, you are going to have to thoroughly study the specification of your Requirements
You need to know what wash programmes and other "user features" your machine must provide, and what external interfaces your software has to interact with; eg:
Motors & pumps; Water valves & level sensors; Water Heater; Temperature sensors; Vibration sensors; User interface; etc, etc,...
With motors, relays and whatever, make sure you design is EMI resistant/tolerant.
Erik
PS that, of course is hardware and thus not a Keil issue, but I can hardly count the number of projects that have missed on this account because of 'cost savings' such as 2 layer boards instead of proper 4 layer boards etc.
"... i must write program control washing machine ..."
What manufacturer, brand, or product?
just homework ..(天啊)..actually it so hard for me.. for example write program control washing machine (rigid axle) 1.user selects wash program (custom,or cotton..) 2.the user press "start" switch 3.the watter is opened to allow watter into the wash drum 4.when the "full water level" is sensed,the water valve is closed 5.the washer motor is turned on to rorate the drum. after wash then rinse then spine.finish washing machine is off. i dont know how to write use RTX.....
dont know how to write use RTX then don't this app (virtually sll '51 apps) will do better without a RTOS. use assembler or C, whatever you are comfortable with. A workloop and a few ISRs will do just fine.
"..actually it so hard for me"
The object of homework is for you to practice what you've learned in class and through your own personal study.
If the homework is really too hard for you, then you have a problem with the course and should speak to your tutors urgently!
"i dont know how to write use RTX"
Did the assignment specifically say that you had to use it? If not - then, as Erik says, don't use it!
If the assignment did specifically say that you had to use it then, presumably, it has already been covered in class or part of the task is for you to find out how to use it!
"this app (virtually sll '51 apps) will do better without a RTOS."
Actually, we don't know (yet) that it is an 8051 app...
Even so, it is still highly unlikely that this application will need an RTOS!
(the homework assignment might require that he use RTX - but the application itself almost certainly doesn't require it)
"just homework"
That's a relief.
my teacher give me a big homework,he only for title :"write program control washing machine (rigid axle) use RTX. write by keilc. that's problem.hjchjc
Did you start to suspect your washing machine :)
"Did you start to suspect your washing machine "
No, but I'm going to be in the market for a new one soon!
"my teacher give me a big homework"
The fact that he gave it to you means that he expects that you should be capable of doing it.
"he only for title: 'write program control washing machine (rigid axle) use RTX. write by keilc.' that's problem"
If you don't think that's an adequate specification, then you need to get your teacher to clarify it - nobody else can do that for you!
i need some hints,coz my teacher hasnt hint anything,only talk : go home open your washing machine and research.. Bullshit..
Why bullshit?
If you really are building a machine, then you have to figure out how to make the machine work. Then write a design. Then implement it. Real companies don't just stumble over a full specification for their next product - they write the specification themselves.
Figure out what a washing machine does - then write a pprogram that listens to the sensors and performs timed actions.
Not hard at all. Present the program together with a schematic for your washing machine. It is enough to have a LED for pumps, valves, ...
And when you do write your program - add error handling. How long to pump water before giving up on the level sensors and doing a safety-stop. And make sure you can't start the washing machine without closing it.