Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] control washing machine using PIC microcontroller

Status
Not open for further replies.

erfan.khalilian69

Member level 4
Joined
Feb 7, 2011
Messages
71
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Kualalampur
Activity points
1,916
Hi everyone
I need to control the washing machine using PIC microcontroller :

The following are the design considerations to be followed:
1. Set the time using a DIP switch (maximum value is 99 seconds)
2. The setting values should be displayed on the seven segment display
3. The spin process should begin when the start button is pressed and then
 START the Motor (LED ON)
 The display value on the seven segments should start counting down
4. When the value is zero, STOP the motor (LED OFF)
5. Also modify the spin timer by increasing or decreasing the rotational speed

plz help me over this, thanks
 

Hi,

You posted a customized complete project.
Better you ask for each doubt, according it happens.
What you done yet ?

I designed a washer-machine with more features than above with 8051 uC.
But even above design is not so simple, due hardware considerations.

+++
 

Hi thanks for replay,
it is school assignment I dun know how to start?
I think first I need to program counter which count from 99 to zero and display it in seven segment ,
I have experience with LCD but not with seven segment. I dun think so that hardware part will face problem, the problem is just programming wish assembly language.
thanks
 

Well

First step, you must draw a flowchart to define structure of program and states working.
( P.S : I sugest you think about C language if possible )

If you don´t have problem with hardware it´s a good point.

+++
 
Well

First step, you must draw a flowchart to define structure of program and states working.
( P.S : I sugest you think about C language if possible )

If you don´t have problem with hardware it´s a good point.

+++
thanks
the lecture asks to write the program wish assembly language , I think I can write it with C and then convert it to assembly language , I heard that there is software which is able to convert C to assembly language , right ?
 

The compiler is abble to do that.
All those I already used have an option type : "View ASM code".

However be aware that comments wrote at C code will not be visible at ASM code.
You run in a risk of resulted labeling in ASM pehaps will be intelligible ( indexed with numbers ).
If ASM language is mandatory, is better start programming directly in ASM, not in C.

Least wise PIC ASM is not hard ( it RISC set of instructions if very simple ). I suppose you´re working with 16F familly.

+++
 
The compiler is abble to do that.
All those I already used have an option type : "View ASM code".

However be aware that comments wrote at C code will not be visible at ASM code.
You run in a risk of resulted labeling in ASM pehaps will be intelligible ( indexed with numbers ).
If ASM language is mandatory, is better start programming directly in ASM, not in C.

Least wise PIC ASM is not hard ( it RISC set of instructions if very simple ). I suppose you´re working with 16F familly.

+++

thanks for your advice , so is better to write with assembly language from the first, yes I have chosen PIC16F877A because I have it already ,
do you know how to write the program for counter ?
 

Due the 99 counter have range inside magnitude of 8bit variable, you can perform that with just few instructions.
Sorry if I don´t remember PIC assembly sintax, but is something like that in pseudo-code :
Code:
INC COUNTER
COUNTER > 99
IF NO : SKIP
IF YES : PERFORM ACTION

If I have time, will try code it an post here, but is very simple !!
Do yourself meanwhile...

+++
 

Hi Im back I had exam until today, I want to start the assignment today, actually Ive got news that for this assignment we need to use DIP switch to set the time, I know how DIP switch works. is anyone have sample code for DIP switch ?
after the time set and displayed in seven segment then it needs to count down.
thanks
 

not actually i need to set the time so I prefered the normal one as the binary value set the time in seven segment , my problem is how to program to read the value from DIP switch and the display it on seven segment,
thanks
 

you could use thumbwheels switches, I think 2 digit should be OK.

Why not use LCD panel and a keypad as an interface for the washing machine, keypad will longer life than DIP switches or thumbwheels..

For more sophistication a small touchscreen may also do the job..

just thinking...
 
Hi Erfan,

Here's a few tutorials in PDF form covering 7-segment display interfacing and drivers in assembler on a PC 16F Series:









Good example of interfacing multiple 7-Segment Displays:



Microcontroller & 7-Segments LED Display Interfacing

If you can let me know the exact 7-Segment Display configuration you are using, Two Singles, 3 1/2 Digit, etc, I can probably help you with those details.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top