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


Hi,

at first i would suggest that you try the "IIC_Device_Seek++.bas" to see if the Max127 will answer at the adress &h90. If it doesn´t, there is something wrong in your hardware (see "typical operating circuit" in datasheet)

    IIC.init
         IIC.stop
         IIC.start
           IIC.send max127adresse   "adress that iic-device-seek has shown)
           IIC.send chsetting
         IIC.stop
         IIC.start
          IIC.send (max127adresse + 1)
          IIC.get z1
          IIC.get z2
          z2 = z2 shr 4
        IIC.stop
      IIC.off
    adwert = ((z1*16) + z2)    



z1,z2= byte
adwert= word (0-4095)
chsetting = see page 10 in datasheet, for example:

chsetting = 10110000b  ' Ch3, 0 bis 5V, normal Operation


                  1    011  00   0
                  |       |     |      normal operation
                  |       |      0-5 V input range
                  |        channel 3 (AD3)
                  Startbit, alsway 1


bye

Stefan

 Antwort schreiben

Bisherige Antworten: