I wanted to make 5v when I receive "greater than 2.3V" and make 0V when I receive "less than 2.3V". I am using an LM324 as a comparator .the problem is that when the signal is greater than 2.3V the output should be 5V but it giving me 2.7V.whats the problem?.my VCC IS 3.4v
:???:
Are you expecting an output voltage above Vcc? How?
LM324 can be used as a comparator if fast switching isn't required. According to the bipolar output stage, the output voltage won't reach Vcc (and not go above it anyway).
Comparators with open collector output, e.g. LM339 allow the output voltage to swing above Vcc, but need a pull-up resistor to the logic supply.
As a guess, that is quite normal. You are only supplying the LM324 with 0.4V above it's absolute minimum and it isn't a device that can swing it's output from rail to rail. You always get less output than supply but you seem to be expecting to power it from 3.4V and get a 5V signal from it.