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.
however you gave no info about the microcontroller family you will use but i can expect what you need.
if you are using PIC16 or PIC18 families just you will need to set ADCON0 and ADCON1 registers for PIC16 or ADCON0, ADCON1 and ADCON2 registers for PIC18 to set the PIC internal A/D, then read the A/D buffer when it exceeds a certain level make one of the digital I/O on another port output "1" to switch the relay on.
i know how to do it in "C" but i think you have the names of the registers so you can do it in assembly.
good luck
please check P16 mid range reference manual and PIC16F716 datasheet, also check microchip website for examples and assembly language manual.
remember to read from the datasheet the A/D section and the register you need to set.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.