Yahoo Groups archive

AVR-Chat

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

Message

Re: Timer Counter

2006-10-03 by Celso Monteiro

Dear Owen,

It seems to me you've got a noise problem that is corrupting your 
latch. It would be interesting for you to investigate what's going 
on. One suggestion I can tell you is periodically rewrite the 
contents of you latch. Shit happens all the time for everyone. What 
makes the difference is what you do after that.

Good luck,

Celso



--- In AVR-Chat@yahoogroups.com, "OWEN-A" <oldboot@...> wrote:
>
> I am trying to modifying a PIC program to get a shift register to 
work
> properly, toggle the clear pin on the shift register to force all 
outputs to
> "0" to prevent it from holding the data for too long and burning 
out an
> expensive solenoid.
> 
> The shift register is a 74HC595 and will occasionally lock an 
output on for
> a long enough period to destroy a solenoid.
> 
> These solenoids are $350-00 each and they burn out around 40 to 50 
a year on
> the system.
> 
> Have tried a PIC group but have not received any replies.
> 
> I normally use AVR's with a C compiler the more that I see of the 
PIC the
> more I dislike them!
> 
> Thanking You,
> 
> Owen.
> 
>  
> 
>  
> 
> Are you trying to modify a PIC program to operate on AVR?
> 
>  
> 
> Jim
> 
>  
> 
> On Mon, 2 Oct 2006 10:25:29 +1000
> 
>  "OWEN-A" <oldboot@...> wrote:
> 
> > 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]
> 
> > 
> 
>  
> 
> ---------------------------------------------------------------
> 
> The Think Different Store
> 
> http://www.thinkdifferentstore.com/
> 
> For All Your Mac Gear
> 
> ---------------------------------------------------------------
> 
>  
> 
>  
> 
>  
> 
> Yahoo! Groups Links
> 
>  
> 
> 
>  
> 
> 
>  
> 
> 
>     (Yahoo! ID required)
> 
>  
> 
> 
>     mailto:AVR-Chat-fullfeatured@yahoogroups.com
> 
>  
> 
> 
>  
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> 
> [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.