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.

C program that makes PIC 16F877A wait until PORTD changes (HITECH HI-TIDE v3)

Status
Not open for further replies.

crocklip

Junior Member level 1
Joined
Nov 23, 2005
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,568
Hi,

I am using a PIC for a project that Im working on at the moment. I need to program it (in C) to wait until PORTD changes, ie. when any bit in portD toggles.
Maybe an interrupt?

Thanks for the help
 

Jack// ani

Advanced Member level 3
Joined
Dec 2, 2004
Messages
759
Helped
106
Reputation
220
Reaction score
58
Trophy points
1,308
Activity points
5,010
simpe C question

It would be sensible if you mention your C compiler too....
 

waseem

Full Member level 5
Joined
Apr 13, 2005
Messages
284
Helped
64
Reputation
128
Reaction score
19
Trophy points
1,298
Location
Pakistan
Activity points
3,674
Re: simpe C question

Hi!
Mention the compiler and also the microcontroller that u wish to use.
Regards.
 

kishangk

Newbie level 4
Joined
Feb 15, 2006
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Re: simpe C question

for 8051->u use keil c cross compiler..

for motorola 68000->use tasking compiler.....
 

sp002

Newbie level 4
Joined
Feb 12, 2006
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
Re: simpe C question

U need to be polling for the portd bits , each iteration check for the change.
If there is no change then sleep few msecs.
 

crocklip

Junior Member level 1
Joined
Nov 23, 2005
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,568
Re: simpe C question

The PIC is 16F877A and I'm using the HITECH HI-TIDE V.3 compiler
Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top