xavierpereira wrote: >=20 > Hello everyone , > I m working on my senior project and I m in real need for help with > programming dspic30f4011. I need to know how do I write a code for > capturing volatge ands current from battery of 12 V. >=20 > I have already deisgn the circuitry to sense battery voltage and Current >=20 > My circuit has 2 output sugnals (current and voltage) which connect to th= e > ADC channels of DSPIC .. >=20 > I also need to set the duty cycle and the output should be at PWM port of > DSPIC which inturn is connected to the Mosfet gate driver.. >=20 > If any one has feed backs or sample code to start with I would highly > appreciate the effort .. >=20 > Thank You=20 > An engineer in Need !!!=20 >=20 thanks guys for all the help I got the facts of dspic staright now=20 but my only problem is how do i make my dspic do this=20 so if i sense the 12v Battery voltage from the analog input it will covert the volatge to Digital=20 As the Duty Cycle will be the Function of the Input Volatge and voltage reference(ie 12 V ). I have to set this Duty Cycle Value to the PWM pin.. I need a formula or some hints to write this algorithim HElp please!! =20 --=20 View this message in context: http://old.nabble.com/Help-Needed-using-Dspic= 30f4011%21%21%21-tp32328270p32388678.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .