Page 1 of 1
How do i set Vref
Posted: Fri Apr 20, 2007 8:48 pm
by Tummers
Hello All,
I want to use the Vref functions of a PIC 16F818 within Flowcode V3 pro.
I added the c-code
adcon0 = 0xC5;
adcon1 = 0x08;
But the PIC doesn't respond to that.
Does anyone have a clue?
Greets Frank.[/img][/list]
Posted: Mon Apr 23, 2007 9:55 am
by Benj
Hello
You will probably have to rewrite the ADC sample function in the Flowcode FCD file to do this. The FCD file can be found in the Flowcode V3/FCD directory. Open the FCD file for your PIC processor and edit the following line.
ADCCapture =
Make sure to make a backup of your FCD file and also remember that updates and patches for Flowcode may overwrite your edited FCD files so remember to make backups of this also.
Posted: Mon Apr 23, 2007 3:46 pm
by Mark
Tummers,
Rather than overwite the fcd file you can define a new chip. I for example can use 16f876B.fcd by copying 16f876A.fcd with modifications and it appears as a new chip on the Flowcode menu.
This may also have the advantage that any update will presumably not overwite chip names that are not standard.
Mark
Posted: Mon Apr 23, 2007 3:50 pm
by Steve
Flowcode gets the name of the chip from the FCD filename itself, so you will need to add something else to the FCD file if you are to do this.
In the [Device] section, add a line similar to the following to define the chip. This will override the name of the FCD file itself.
Posted: Fri Apr 27, 2007 7:26 pm
by Tummers
Ok Thanks,
It works!!
Greets Frank