Hard wire a bit to a pin?

woodrufj

New Member
Using a MicroChip (16F1829), is there a code (C) way to make an output pin directly follow a readable bit?

Specifically I'm looking for a pin to follow TMR0IF. This would be nice so I don't have to constantly check the flag while doing other important things.

I was thinking the #define tag, but doesn't look like it'll work that way.

Jay W
 
No, executable code has to read the state of TMR0IF, and then set a port pin high or low...
 
If you use an interrupt then as soon as TMR0F gets set, an interrupt fires, so that you can set your pin. This way you don't need to check constantly.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…