Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Re: 12 bits AD Wandler Kategorie: Programmierung Basic (von Hans - 22.02.2006 20:21)
 Als Antwort auf Re: 12 bits AD Wandler von Stefan Süßmann - 20.02.2006 8:35
Hans nutzt:  CC1-M-Unit V1.2/2.0
Hoi Stefan

Thanks for answering
I have the Data sheet of the MAX127 but I donÂ’t get it
I made both the Â….. Max127 adres &h90 and put & hee up
So it cant work at all
And how do I get AD1 t/m AD8
I cant work it out
So I ask you, do you have a sample of one that works

Hans


DEFINE Var1     BYTE[1]
DEFINE Var2     BYTE[2]
DEFINE AD1      WORD[2]
DEFINE AD2      WORD[3]
DEFINE AD3      WORD[4]
DEFINE AD4      WORD[5]

DEFINE Max127adres       &h90


#Start
GOSUB programma
 PRINT"#ON_LCD#";
 PRINT"#L101#";
 PRINT"1=";AD1;
 PRINT"#L109#";
 PRINT"2=";AD2;
 PRINT"#L201#";
 PRINT"3=";AD3;
 PRINT"#L209#";
 PRINT"4=";AD4;
 PRINT"#OFF#";
GOTO Start

#Programma
 PRINT"#ON_IIC#";
 PRINT"#START#";
 PUT Max127adres
 PUT &hee
 PRINT"#STOP#";





> > Oke thanks,
> > but i dont understand it already
> > I have made this, but it donÂ’t works of course ??
> > Can you look at this once more
> >
> >
> > DEFINE Var1     BYTE[1]
> > DEFINE Var2     BYTE[2]
> > DEFINE AD1      WORD[2]
> > DEFINE AD2      WORD[3]
> > DEFINE AD3      WORD[4]
> > DEFINE AD4      WORD[5]
>
> OK.
>
> >
> > DEFINE Max127adres       &h90 '???
>
> This is the i2c-device-adress. Most i2c-devices have pins A0,A1,A2 to set the adress by putting them to 5V or ground. The adress-setting is shown in the datasheet. You have a max127 and a datasheet?
>
>
> >
> >
> > #Start
> > GOSUB programma
> >  PRINT"#ON_LCD#";
> >  PRINT"#L101#";
> >  PRINT"AD1 = ";AD1;
> >  PRINT"#L110#";
> >  PRINT"AD2 = ";AD2;
>
> If you have 2x16 display this will run out. AD1= 4 characters+ "AD1_=_" = 6 characters
>
>
> >  PRINT"#L201#";
> >  PRINT"AD3 = ";AD3;
> >  PRINT"#L210#";
> >  PRINT"AD4 = ";AD4;
> >  PRINT"#OFF#";
> > GOTO Start
> >
> >
> > #Programma
> >  PRINT"#ON_IIC#";
> >  PRINT"#START#";
> >  PUT Max127adres  
> >  PUT &hee  '???
> >  PRINT"#STOP#";
>
>  > > >            IIC.init
> > > > >          IIC.stop
> > > > >          IIC.start
> > > > >          IIC.send max127adresse
>
>
> There is a "stop" missing.
>
>
> >
> >  PRINT"#START#";
> >  PRINT Max127adres
> >  GET Var1
> >  GET Var2
> >  Var2 = Var2 SHR 4
> >  PRINT"#STOP#";
> >  PRINT"#OFF#";
> >  AD1 = ((Var1*16) + Var2)
> > RETURN
> >
> >
>
>
> Try again :-)
>
> bye
>
> Stefan

 Antwort schreiben

Bisherige Antworten:

Re: 12 bits AD Wandler (von Stefan Süßmann - 22.02.2006 22:41)
    Re: 12 bits AD Wandler (von Hans - 23.02.2006 20:42)
        Re: 12 bits AD Wandler (von Stefan Süßmann - 23.02.2006 22:05)
            Re: 12 bits AD Wandler (von Hans - 25.02.2006 13:47)
                Re: 12 bits AD Wandler (von Windt H.J. - 1.03.2006 23:12)
                    Re: 12 bits AD Wandler (von Hans - 4.03.2006 10:49)
Re: 12 bits AD Wandler (von Stefan Süßmann - 22.02.2006 22:21)