CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Washing machine

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dyeatman



Joined: 06 Sep 2003
Posts: 1937
Location: Norman, OK

View user's profile Send private message

We need to see the code to help!
PostPosted: Sat Apr 17, 2004 10:16 am     Reply with quote

It would be helpful for those of us who are not mind readers to see the code and then we might be able to help you.....
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Sat Apr 17, 2004 11:06 am     Reply with quote

What is attached to the reset pin and do you use a powerup timer?
Gabriel Caffese



Joined: 09 Oct 2003
Posts: 39
Location: LA PLATA, ARGENTINA

View user's profile Send private message Visit poster's website MSN Messenger

And the hardware...
PostPosted: Sat Apr 17, 2004 11:10 am     Reply with quote

Hackam,

It would also be important to see the schematic.
It may be hardware reason why the micro gets reseted.
Sergio



Joined: 16 Oct 2003
Posts: 11
Location: Arkansas, USA

View user's profile Send private message

PostPosted: Sat Apr 17, 2004 10:30 pm     Reply with quote

Is this a new or existing product?

Has it ever worked correctly?

When did it start having this problem?

What do you mean "skips code lines"?
_________________
Sergio
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Sun Apr 18, 2004 8:28 am     Reply with quote

You might try a flyback diode acros the relay. Turning a coil off will cause a voltage spike.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Sun Apr 18, 2004 9:31 am     Reply with quote

1) Enable the power-up timer in your FUSE statements, "PUT" I believe is the correct flag.

2) Beg, borrow or steal a digital oscilloscope with at least 20MHz of glitch-capture bandwidth and monitor the VCC line right at the PIC during power up. If you have a dual-channel unit, put CH1 on the VCC pin set for AC coupling and maybe 100mV/div. Use CH2 as your trigger source and set it up to capture the rise of VCC as it comes out of your power supply. Look for glitches, anomolies or invalid rise-times on the power supply rail.

3) Sufficient by-pass capacitors on VCC? Minimum would probably be 0.1uF per PIC VCC pin plus 10uF to 100uF bulk capacitance near PIC.

4) Spagetti gounds or nice neat ground configuration or ground plane?

5) Diodes across relay coils so collapsing magnetic field doesn't disturb VCC?

6) I didn't see you spending time in the main() to configure the PIC so either you just left that out of the listing you posted or you are relying on the default settings of the PIC after power up. You may be lucky and all the default settings are appropriate. Personally, I usually have a subroutine called InitPIC() that is called right away in main() and there I configure all the pins, timers, ADC, etc as I will expect them to operate later in my program.


Based on your descriptions it sounds like a problem with the VCC line having glitches on it as it rises to a valid level. And it could be layers of problems. You might want to consider using a reset IC from the MCP120 or MCP130 families to hold the PIC in reset until well after the power has stabilized.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Gabriel Caffese



Joined: 09 Oct 2003
Posts: 39
Location: LA PLATA, ARGENTINA

View user's profile Send private message Visit poster's website MSN Messenger

It has to be electrical.......
PostPosted: Sun Apr 18, 2004 9:36 am     Reply with quote

Hakam,

If the micro hangs up when you connect it to the mains, nearly SURE it has to be some kind of electrical problem:
1) Check your VDD source.
2) Have you put a .1uf cap between VDD and GND, close to the PIC ?
3) Does it feed the circuit with enough current ? If not, VDD will go down.

Gabriel.-
SteveS



Joined: 27 Oct 2003
Posts: 126

View user's profile Send private message

PostPosted: Mon Apr 19, 2004 7:06 am     Reply with quote

You are in a really tough environment for a micro. You have motors and relays which put out a lot of emmissions - on the lines and coupled through magnetic and electrical fields. You need to isolate and shield.

A few particulars:
- decouple your micro from the relays. As mentioned use a flyback diode at a minimum. I would look at opto-isolation.
- decouple the power supply with ferrites and capacitors.
- the board must be tightly laid out with good ground plane with attention paid to high current vs low current supplied and returns. Think about where the current flows.
- try your LED test board physically in the area where the final board will be and run the washer 'manually'. Does that board still work correctly?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group