PIC12F675 A/D example please

Thread Starter

ErnieH

Joined Feb 17, 2017
15
Hello all, could someone help me please with a simplest assembly language source code for an A/D conversion, using a PIC12F675. I' d like to make a day / night switch using an LDR. I have a working system for my garden lights using an op-amp LM358, but would like 2 make a pic version.

Thank you
ErnieH
 

jayanthd

Joined Jul 4, 2015
945
Why asm ? Why not C ? I can help you with C code and the Compiler generates asm code. If you want then you can look at the Compiler generated asm code.
 

MaxHeadRoom

Joined Jul 18, 2013
28,702
Have you used the 12F675 at all for other assembly programs?
There is a book you can download in PDF that should help, "PIC in Practice" by DW Smith.
One feature you may want to incorporate is to ignore random changes, use a certain dwell time before switching.
Also for interfacing, look at logic level Fet/Mosfet.
Max.
 
Top