Quote Originally Posted by HenrikOlsson View Post
Hi,
That would have been good to know so that *I* didn't have to waste time looking at the wrong datasheet when trying to help...

For the 16F628A with CMCON set to 5 you have one comparator enabled, positive input on RA2, negative on RA1. This matches your schematic.
CMCON.7 should be '1' when the voltage at RA1 is less than the voltage on RA2.

In your schematic you have a voltage divider connected to RA2. There's a supply symbol "feeding" the voltage divider but it doesn't say what voltage. Have you "measured" the voltage at the RA2 pin, what is the voltage? Is it 0V by any chance?

/Henrik.

PS. Why don't you wire up the circuit on a breadboard instead of that simulator? I know it's a great tool (I wish I could justify the cost) but sometimes, especially when you're new at this, it's just easier (and a lot better) to play with real life hardware.
your right Henrik, input voltage at the RA2 is 3volts

/chitalula.
I will wire the circuit on the breadboard when the circuit do what i want. as you know that iam new on the world of programming. all what am doing now is just on the way to have boost converter with constant output current.
when the circuit with codes will be complete i will consult you to have that beadboard and other equipments. for now help me here so that i accomplish this task