Yahoo Groups archive

AVR-Chat

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

Message

[QUARANTINE] [AVR-Chat] Re: GP2D02 + ATmega32

2006-09-12 by katraven1

well, now i feel jst silly...

after all this stressing and request for aid it turns out there was 
nothing wrong with my code - the error was assuming delay_ms(70) 
actually means a delay of 70ms...

i dun believe it... calling library functions without research is a 
bad idea... assumptions are bad things (i need to remember this...)

after borrowing a logic probe from my supervisor, we found the 
problem of the incorrect delays, thus not producing the correct 
signal to drive the sensor.

Once these delays were set right (go voodoo programming) the ir 
responds as expected and now working perfectly fine.

thx for all the help guys.. and sorry for not finding this out 
sooner...

--- In AVR-Chat@yahoogroups.com, "Larry Barello" <yahoo@...> wrote:
>
> I don't think your shifting of data in does what you want it to 
do...  I
> would guess it always returns 0xFF00 or maybe 0x7F80
> 
> change 
>  	output |= (IR_PIN & 0x80);
> to
> 	if (IR_PIN & _BV(7))
> 		output |= 0x01;
> 
> Cheers!
>

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.