Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help programming pic to operate washine machine

Status
Not open for further replies.

kasey

New Member
I bought a kit called the PIC18F4XK20 Pic kit. Comes with everything. Just having lots of trouble programming in C. aNYONE EVER HELP?
 
Hi,

Thats a nice looking development kit - what exactly are you having problems with ?

The kit comes with a load of demo files and lessons starting with the usual flasing led - have you tried them yet?
 
yo

yes but i STILL cant understand what is goin on. C in new to me. I never did any sort of programming. The only logic I know is ladder logic. So I am having trouble understanding the codes. I am also on a deadline. So I am trying to get this going asap. I tried modifying the programs. I got sum to werk. (like making another switch do the operations) But timing is a big problem. I cant understand the code.
 
Do you have a typical washing machine sequence as a starter?

Do you have to program in C ?

Isn't BASIC an alternative? Less compact I know but takes less time to learn..Assuming you can compile the code or the pic...
 
Last edited:
What code? What washing machine?

If it's your first foray into C programming start with flashing an LED. Lots of tutorials out there for that.

Swordfish BASIC is handy for the 18F series.
 
Last edited:
Hi,

Your kit comes with all the tutorials and lessons for C but there is no reason why you cannot use Assembler instead, you might find it easier to follow - the Sticky at the top of this page has plenty of references to various tutorials for all codes.

Learning to program Pics when on a deadline -Wow ! - How long ??
 
Considering the application is just to run a washing machine, it's hardly tasking - you're only replacing a mechanical switch system.

Hardest part is going to be the interfacing.
 
4 weeks!!!

I actually have a sequence I want:

1) After Operator selects either heavy or medium load, he / she then selects Automatic cycle and Machine starts.
2) Water supply inlet valve opens, and fills machine until level switch shuts off valve.
3) Same signal from level activation then releases brake and turns on motor. Motor runs forward for four (4) seconds, stops for three (3) seconds, runs on reverse for four (4) seconds then stops for another three (3) seconds, and continuously goes back and forth for the programmed wash period (fifteen minutes).
4) After preset time expires, motor stops, brake activates, drain pump activates, and machine drains out until empty level switch contacts engage.
5) Empty level contacts then shuts off drain pump, and water inlet valve re-opens and machine fills again until high level.
6) Same signal from high level activation then releases brake and turns on motor. Motor runs forward for four (4) seconds, stops for three (3) seconds, runs on reverse for four (4) seconds then stops for another three (3) seconds, and continuously goes back and forth for the programmed rinse period (five minutes).
7) Rinse operation completes, and drain pump activates, brakes release and motor starts on forward and runs continuously for preset time for spin mode.
8) After spin mode times out, automatic cycle is complete
 
Last edited:
hi

Yes its for school and I am trying to do the best I can, but with a new baby, work, and part time tuition, its hard to do this. This is why I am seeking help.
 
wel I am using MPlab IDE and MPlab C18. tHE ONLY LANGUAGE i AM KIND OF FAMILIAR NOW WITH IS c, so Yes I would like it to be in C.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top