Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Timer Counter

2006-10-02 by OWEN-A

I have a situation where a counter used in an interrupt may rollover before
a compare is reached, for example the timer is set to 0x26 within the
interrupt then decremented by one every time the interrupt is entered until
0 is reached, then reset to 0x26 again.

PORTD PIN0 is set high somewhere within the count of 26 down to 1  (or 0
within the interrupt) and has to be set low after say 0x1A counts,  if the
counter is read when PORTD PIN0 is set high and is on 0x0F the counter will
rollover before the turnoff point is reached, this may or may not happen
depending on when PORTD PIN0 is set.

I am not very proficient at assembly and any help would be appreciated I am
modifying another person's program and the processor is a PIC16F877.

 

Thanking You,

Owen

 

 



[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.