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.

16f628 weired problem

Status
Not open for further replies.

janosandi

Full Member level 4
Joined
Jan 23, 2010
Messages
210
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,788
Hello guys
im using 12 relays connected to port A & part of port B & im using this method to move between pins
movlw 01
movwf portA
delay
movlw 02
movwf portA
delay
movlw 04
movwf portA
delay
movlw 08
movwf portA
etc......................

the problem is when i test this machine it works great but after time it make a strange prblem im not sure wht is it really
is it possible of the pic to ignore the numbers i send & use random numbers ?
coz its not allowed in my machine to energize more thn one realy at time & i think it does it
any suggestions ?
 

1. What is Crystal Freq & time delay for relay enrgize
2. What about watch dog timer is enable or disable ?
3. Check output port pin on LED & then connect Relay if LED work but Relay not then may be Relay supply current problem
 

Assuming you clear one port before shifting the bit along the other, it should only drive one relay at a time. Please show yur schematic because it sounds like you may have a problem with either the power source as the relays switch or back EMF upsetting the port pins.

To operate only one random relay at a time, the easiest way is to build a 16-bit shift register out of two 8-bit variables, initialize it to 00000000 00000001 then left shift it a random number of times so the '1' ends up in a new place. Then output one variable to each port.

Brian.
 

Did you put diodes parallel to the relay coils ???.. If not its the EMF that is killing your MCU.
 

Hello guys
Thx for ur reply's
when i test this circuit it works great everything is good but after installing it after few days i had this problem
its kind of disaster coz im using it on mains power using 3 faces on the 12 relays so when it energizes 2 relays at same time u can imagine wht i have
im not sure wht is the problem i'll send u the pic of my circuit & its ok as i think im using diodes for relays & i dont use crystal for pic im using the internal osc

- - - Updated - - -

Hello guys
Thx for ur reply's
when i test this circuit it works great everything is good but after installing it after few days i had this problem
its kind of disaster coz im using it on mains power using 3 faces on the 12 relays so when it energizes 2 relays at same time u can imagine wht i have
im not sure wht is the problem i'll send u the pic of my circuit & its ok as i think im using diodes for relays & i dont use crystal for pic im using the internal osc
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top