electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

PIC18F452 Hangs when GIE set in Specific PCB


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PIC18F452 Hangs when GIE set in Specific PCB
Author Message
saeed_pk



Joined: 20 May 2006
Posts: 199
Helped: 5
Location: Islamabad, Pakistan


Post01 Apr 2009 12:29   

+pic18f452 hang problem


Hi all,
I am working on a project on which i have to send some information via RF. my system works fine on a PCB i made as a general purpose. my second board works fine but when i enable GIE it hangs. if i do not enable interrupt it is fine. (does not hang) extra things i have added in this board are Ferrite beads on Key Pad inputs and to RF module.
one 5V DC relay is also added. i use diode for protection (freewheeling) i am in a fix why my system does not work when i enable interrupts.
my complete system was working on a PCB which is small in size.
does orientation of PIC cause an interrupt to occur, or Hang my system, remember i have not interfaced RF module to my system.

Please Advice.......
Back to top
umery2k75



Joined: 19 Apr 2006
Posts: 378
Helped: 24
Location: Pakistan


Post01 Apr 2009 13:54   

Re: PIC18F452 Hangs when GIE set in Specific PCB


Your PCB layout would be causing the trouble.What do you mean by orientiation of PIC?
Back to top
snawi



Joined: 02 Apr 2009
Posts: 2


Post02 Apr 2009 13:10   

PIC18F452 Hangs when GIE set in Specific PCB


LRC Meter
Back to top
pvinbox@yahoo.com



Joined: 28 May 2004
Posts: 122
Helped: 6
Location: Coimbatore, INDIA


Post11 Apr 2009 7:23   

Re: PIC18F452 Hangs when GIE set in Specific PCB


Hi

You have to take care about pcb routing. You should supply vcc and Gnd directly from power supply. And increase the ground area also. which gives good improvement
Back to top
darcyrandall2004



Joined: 01 Feb 2009
Posts: 32
Helped: 1
Location: Perth, WA, Australia


Post01 May 2009 6:20   

Re: PIC18F452 Hangs when GIE set in Specific PCB


I have had similar problems with a PIC16F870.

I suggest you investigate just exactly what Interruptes are being enabled when you enable global interrupts.

I then suggest you use a simulator to simulate these interrupts occuring. You will then be able to determine where your instruction pointer is jumping to when the interrupt occurs. Perhaps an interrupt occurs and then the processor finds itself in an endless loop.
Back to top
Sobakava



Joined: 27 Mar 2002
Posts: 367


Post04 May 2009 12:03   

PIC18F452 Hangs when GIE set in Specific PCB


may be

- you forgot to clear interrupt event bits before returning interrupts. For instance if you defined a timer interrupt and if timer overflowed and caused and interrupt, interrupt mechanism sets lets say, TMR0IF bit. After you finish with interrupt handler, and if you don't clear this bit, another interrupt will be fired immediately.

- some pins ( ie RB4,RB5,RB6,RB7, INT0, INT1 etc) which can cause interrupts are floating (not connected to anywhere) and they are defined as inputs.


try to turn off all interrupts by their enable bits. then turn on them one-by-one and find which one has the problem.

This is all I can say without seeing the source code.
Back to top
malik_123



Joined: 14 May 2007
Posts: 44


Post05 May 2009 10:37   

PIC18F452 Hangs when GIE set in Specific PCB


please check all the interrupts and try to see that when GIE bit is set then which interrupt is called
Back to top
AHKHANN



Joined: 24 Jul 2008
Posts: 2


Post16 May 2009 16:44   

PIC18F452 Hangs when GIE set in Specific PCB


I have recently built a system using 18F452 and I am facing almost the same problem.

On investigation I found out that my system gets restarted when ever I enable global Interrupt.

Since I am using CCS compiler it gives cause of restart from SLEEP mode.

I am clue less.
Back to top
Google
AdSense
Google Adsense




Post16 May 2009 16:44   

Ads




Back to top
nikhil_damle



Joined: 15 Dec 2005
Posts: 103
Helped: 2


Post02 Jul 2009 8:18   

Re: PIC18F452 Hangs when GIE set in Specific PCB


if in CCS u have a problem resolving he global interrupt u can disble it at runtime using the timer config modeules please check not sure about this
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> PIC18F452 Hangs when GIE set in Specific PCB
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Board hangs when taped (3)
icfb hangs when exit (2)
Can Interrupt be Serviced even when Micro controller hangs?? (3)
application specific instruction set processor-- (5)
How to set fuses for a Pic18f452 (1)
how to set switches when DRC? (4)
Why output set to high impedance when chip disabled? (2)
Why I can't set L=250n when spectre simulation at TSMC .25 (1)
How to set the frequency when measuring mixer IMD? (3)
How to set wave port in CST when simulating the stripline (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS