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 Stefan Süßmann - 20.02.2006 8:35)
 Als Antwort auf Re: 12 bits AD Wandler von Hans - 17.02.2006 20:47
Stefan Süßmann nutzt:  CC1-M-Unit V1.2/2.0, Micro
> 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 Hans - 22.02.2006 20:21)
    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)
Re: 12 bits AD Wandler (von Hans - 22.02.2006 20:20)