Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

10 bit ADC in 16f676 to 8 bit

Status
Not open for further replies.
void battery_check()
{
/**Condition for LED brightness adjustment Between 13V and 10.5V battery voltages**/
if(Battery_Value > 321)
{
//FLAG_1 = 1;
INTCON = 0b10100000;//////////////Timer0 interrupt starts/////////////////
divide_val = (Battery_Value-321)*255/462;
//LOAD = ON;
if(FLAG_1 == 1){
FLAG_1 = 0;
}

}

Yes load will turn ON once panel volt is less than 1V and will be OFF when Panel Volt is >3V. These two values i.e. 1V and 3V could be changed according to sunlight that's the only case no more complexity is there. Is Timer0 turning ON interrupt is incorrect??????

Can you please tell me the exact problem u r facing now with this code?
 

Hi mathes,

As i posted before, now turning ON and OFF of the LOAD is happening at same time. Say if i set the value of Panel voltage at 3V for LOAD to turn OFF as it indicates sun is rising, LOAD is getting turned ON at the same panel voltage of 3V means less than 3V. I want to set two different voltages to turn ON and OFF the LOAD. So that voltage level can be adjusted according to sun light condition. That's the only issue. Now if i turn ON the LOAD in subroutine, it's not turning OFF once panel volt is greater than 3V.

- - - Updated - - -

Hi jayanth,

MikroC PRO has hardware PWM and PIC16f676 don't have any such facility thats why i have to use software PWM.
 

Many many thnx to u alexan_e..... :)
For complexity in CCS PIC C i've started to work in MIKRO C..but fall difficulties to do the 8bit ADC...Thnx a lot for ur suggestion...Ur suggestion is really helpful...One request if u pls don't mind i will be very happy if u please tell the details actually what happens when we shift right the ADC result 2times(The Procedure how it works nicely?)...Thnk u :)
 

Hi jayanth,
Code is working lil bit now with some modifications. Thanx dude.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top