Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: March 22, 2007, 03:59:11 am
 ;D
It works.

  _SFR_IO8(0x35) |= 4;
  _SFR_IO8(0x35) |= (1<<4);

instead of _SFR_IO8(0x30) |= 4; according to the atmega168 documentation the MCUCR is located at 0x35.
i didnt check wich of both rules is the matching one, but at least one of both is working, cause my led is flashing in short terms an is i have a look into my serial console i receive the data of illumination.
if i take it into my hand and close is (100% dark) i get "0".
if there is minimal light i get "1". and so on. :o

max
2  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: March 16, 2007, 11:20:10 am
did you try:
MCUCR=(PUD<<1)
at the moment iam not able to try it myself cause i dont have my arduino with me.

max
3  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: March 12, 2007, 03:27:55 am
i already tried to use the 5V power supply and control it by a relais connected to the digital pins, so there wasnt any resistor i had to turn off - but the relais was just too slow. :-/
4  Forum 2005-2010 (read only) / Français / Re: Une LED qui mesure l'éclairement et qui éclair on: March 10, 2007, 10:06:46 am
Hi,
I just tried to run the code on an Atmega168.
The problem is that i dont get the pull-up resistors deactivated. :'(
according to the a168 manual the code for switching off the resistors is the same as in the atmega8
does anyone know how to deactivate the resistors in the a168?

thank you.
max.
Pages: [1]