Attiny2313 analog comparator

Hello!

claudiu_mirescu:
I just accidentally burnt out my atmega168 and all i have around the house is an Attiny2313.

Bummer.

I read that the 2313 does not have an ADC, but it does have an analog comparator, ...

That is correct.

Does any of you have an Arduio IDE code for that?

To add support for the 2313 to the IDE...
http://code.google.com/p/arduino-tiny/

Basically, if a value is below another value, digitalWrite(ledPin, LOW) and viceversa, that is what I need.

I think I have exactly what you need. I'll be back in a few minutes...