Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Direct analog
1. Direct Analog-To-Microcontroller Interfacing
This paper will demonstrate how signals from analog sensors can be directly interfaced to any
digitalembedded system even though they may not be equipped with an on-chip ADC (Analog-
to-Digital Converter),comparator or OP amp (Operational Amplifier). With only two resistors
and one capacitor, we willpresent a solution that allows analog voltages to be measured directly
using only a few digital I/O-pins.The digital target system requirements are minimized and
limited to only two digital I/O-pins (with tristatecapability). No ADC, comparators, timers or
capture modules are necessary. The extremely modesthardware requirements make it a suitable
solution also for CPLDs/FPGAs (Complex Programmable Logicdevices/Field Programmable
Gate Arrays). Since this solution will allow even the simplest embeddedsystem to be interfaced
to analog voltage sensors, it has the potential of reducing design costs considerably.The proposed
design is for DC or low-frequency signals and compared to other similar solution, thisdesign
needs no embedded analog blocks at all.
The techniques of interfacing analog sensors directly to digitalembedded systems without the use
of embedded ADCs or complexsignal conditioning electronics was developed in the mid-
1990s.These techniques may be divided into two categories. One class ofinterfaces focused on
passive sensors (i.e. resistive, capacitive andbridge sensors). Pioneering work was presented by
Cox,Richey, Baker and Bierl. The other class is focused on sensors with analog voltage
outputsand Peter et al. that these sensors couldbe interfaced without using the embedded SAR
ADC (SuccessiveApproximation Register) of a typical microcontroller. If only thecontroller has
an embedded comparator, a Sigma Delta can be implemented with only a few passive
components. Thishas later been confirmed and demonstrated by several, both inmicrocontrollers
and in FPGAs (with embedded or externalcomparators). The analog-to-digital conversion is a
multi-step process. This is controlled in firmware by polling the comparator’s output. If the
comparator’s output is high the I/O-pin is reset and if it is low the I/O-pin is set.It is slow
(limited bandwidth) and most of all, it only works for embedded systems with integrated
comparators, which indicates that it requires a relatively advanced (expensive) micro-controller
and excludes inherently digital systems such as CPLDs and FPGAs. The solution presented in
this work, uses only two I/O-pins but has the advantage of not requiring a comparator; the
technique can be implemented also in FPGAs.
Block Diagram
2. //in this i am using adc0808 for selecting adc channel & 8 bit
data pin for lcd data selection bit
#include <reg51.h>
#include "lcd.h"
sbit ADD_A = P2^0;
sbit ADD_B = P2^1;
sbit ADD_C = P2^2;
sbit clk= P2^3; //for clock
sbit ALE = P2^4; //adress latch enable
sbit OE = P2^5; //output enable
sbit SC = P2^6; //start convertion
sbit EOC = P2^7; //end convertion
3. sfr input=0x80; //0x80 is the adress of port 0 of 8051,it act as a sensor o/p & microcontroller i/p
//function prototype
void channel_selection(unsigned char channel);
unsigned char read_adc(unsigned char channel_area);
void sensor_display(unsigned char var);
void timer0() interrupt 1 // Function to generate clock of frequency 500KHZ using Timer 0 interrupt.
{
clk=~clk;
}
void channel_selection(unsigned char channel)
{
if(channel==0)
{
ADD_C=0; ADD_B=0;ADD_A=0;
}
else if(channel==1)
{
ADD_C=0; ADD_B=0;ADD_A=1;