A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
Strange Reset Problem - Soumya Chatterjee - Feb 6 8:13:42 2009
Hii.. EveryBody
I have a strange problem.... I have wrote a simple code
void main()
{
TRISB = 0 ;
PORTB = 0 ;
DELAY_MS( 2000 ) ;
PORTB = 255 ;
DELAY_MS( 2000);
while(1)
{
PORTB = 0xF0 ;
}
}
So everytime O/p Of PORTB will 0XF0. Only when a reset will occur all the LEDs connected
with PORTB will Glow.
But when I Power Up the System the system resets in a regular fashon. In Configuration
word Watch Dog Timer is Disabled. Brown Out Detect is also Disable. I am using code word
as 0x3F39.
In reset pin 10K,10 uF is connected. I am taking the Vcc from a 7805. AC ripple present is
0.2 mV. particulary when I switch on some other equipments connected with the AC Line like
tubelight,CRO,Variac either during switch on period or during switch off period
Microcontroller resets.
I am using 4 Mhz with 15 PF capacitors. 470 uf is connected in the o/p of 7805.
But if brown out reset is disabaled then what could cause the problem??
Thanks in advance
Soumya
With Thanks and Regards Soumya Chatterjee Mobile: 9007282980 Gravitation is
not responsible for people falling in love. - Albert Einstein
Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Strange Reset Problem - yosupicprog - Feb 18 9:03:33 2009
Hi my friend,
Two stuff, what Pic are you using, and do you using one resistors in=20
each I/O of the port B connected to the leds?? Sometimes the pic can=20
not drive all the port because the courrent source is to small...!!
Remember too if you using one pic with interrupts on Portb you must=20
desactivate this because if one interrupt occur and you dont have the=20
IRQ routine the pic must be in the reset point.
But never forgot your iniciative routine to configurate all the pic=20
and the ports, so is important to know what kind of pic are you using=20
for this project.
And them try with this...=20
void main()
{
TRISB =3D 0 ;
PORTB =3D 0 ;
while(1)
{=20
DELAY_MS( 2000 ) ;
PORTB =3D 255 ;=20
DELAY_MS( 2000);
PORTB =3D 0 ;
}
}
Whe are in touch from Venezuela... Bye..!!
--- In p...@yahoogroups.com, Soumya Chatterjee
=20
wrote:
>
> Hii.. EveryBody
>=20
> I have a strange problem.... I have wrote a simple code
>=20
> void main()
> {
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TRISB =3D 0 ;
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 0 ;
>=20
> =C2=A0 =C2=A0 =C2=A0 DELAY_MS( 2000 ) ;
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 255 ;
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DELAY_MS( 2000);
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while(1)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 0xF0 ;
> =C2=A0 =C2=A0 =C2=A0 }
>=20
> }
>=20
> So everytime O/p Of PORTB will 0XF0. Only when a reset will occur=20
all the LEDs connected with PORTB will Glow.
>=20
> But when I=C2=A0 Power Up the System the system resets in a regular=20
fashon. In Configuration word Watch Dog Timer is Disabled. Brown Out=20
Detect is also Disable. I am using code word as 0x3F39.=20
>=20
> In reset pin 10K,10 uF is connected. I am taking the Vcc from a=20
7805. AC ripple present is 0.2 mV. particulary when I switch on some=20
other equipments connected with the AC Line like tubelight,CRO,Variac=20
either during switch on period or during switch off period=20
Microcontroller resets.=20
>=20
> I am using 4 Mhz with 15 PF capacitors. 470 uf is connected in the=20
o/p of 7805.
>=20
> But if brown out reset is disabaled then what could cause the=20
problem??
>=20
> Thanks in advance
>=20
> Soumya
>=20
>=20
>=20
> =C2=A0 With Thanks and Regards Soumya Chatterjee Mobile:=20
9007282980 =C2=A0Gravitation is not responsible for people falling=20
in love. -=C2=A0Albert Einstein
>=20
>=20
> Add more friends to your messenger and enjoy! Go to=20
http://messenger.yahoo.com/invite/
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Strange Reset Problem - pic_peraloca - May 1 18:14:55 2009
Hi Soumya!
I had a similar problem when driving a small motor with a small relay; ever=
y time I connected the motor; my PIC was reseting. When I tested the PIC se=
paratedly from the motor; everything was fine; as long as I connected the m=
otor the problems started. I even wrote a similar routine to yours in assem=
bler, to know if the PIC was reseting. What I found was that my prototype (=
that was hand wired and soldered), had ground problems (same ground for mot=
or and PIC in the same wire). The cure was to separate grounds (power groun=
d and signal ground). I think your problem is on ground or Vdd; try to add =
a 0.1 Mf cap between Vdd and Vss (beside the cap you already have); the clo=
sest possible to the PIC chip.
I hope this can be helpful to you.
--- In p...@yahoogroups.com, Soumya Chatterjee
wrote:
>
> Hii.. EveryBody
>=20
> I have a strange problem.... I have wrote a simple code
>=20
> void main()
> {
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TRISB =3D 0 ;
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 0 ;
>=20
> =C2=A0 =C2=A0 =C2=A0 DELAY_MS( 2000 ) ;
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 255 ;
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DELAY_MS( 2000);
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while(1)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PORTB =3D 0xF0 ;
> =C2=A0 =C2=A0 =C2=A0 }
>=20
> }
>=20
> So everytime O/p Of PORTB will 0XF0. Only when a reset will occur all the=
LEDs connected with PORTB will Glow.
>=20
> But when I=C2=A0 Power Up the System the system resets in a regular fasho=
n. In Configuration word Watch Dog Timer is Disabled. Brown Out Detect is a=
lso Disable. I am using code word as 0x3F39.=20
>=20
> In reset pin 10K,10 uF is connected. I am taking the Vcc from a 7805. AC =
ripple present is 0.2 mV. particulary when I switch on some other equipment=
s connected with the AC Line like tubelight,CRO,Variac either during switch=
on period or during switch off period Microcontroller resets.=20
>=20
> I am using 4 Mhz with 15 PF capacitors. 470 uf is connected in the o/p of=
7805.
>=20
> But if brown out reset is disabaled then what could cause the problem??
>=20
> Thanks in advance
>=20
> Soumya
>=20
>=20
>=20
> =C2=A0 With Thanks and Regards Soumya Chatterjee Mobile: 9007282980 =
=C2=A0Gravitation is not responsible for people falling in love. -=C2=
=A0Albert Einstein
>=20
>=20
> Add more friends to your messenger and enjoy! Go to http://messenge=
r.yahoo.com/invite/
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )