
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
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] DEFINE Max127adres &h90 '??? #Start GOSUB programma PRINT"#ON_LCD#"; PRINT"#L101#"; PRINT"AD1 = ";AD1; PRINT"#L110#"; PRINT"AD2 = ";AD2; 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#"; PRINT"#START#"; PRINT Max127adres GET Var1 GET Var2 Var2 = Var2 SHR 4 PRINT"#STOP#"; PRINT"#OFF#"; AD1 = ((Var1*16) + Var2) RETURN > > Thanks Stefan > > > > But I don't understand it already > > How do I get all 8 Ad variabele in 8 WORD's > > > > IIC.send chsetting There you tell the Max127 which channel you want to read out. > > You have to read each ad-channel in that way. Have you seen the datasheet? > > > > And I only progr. conrad C-control/basic entwicklung > > I use basic++ but it will work in ccbasic as well if you use the ccbasic commands. > > > And I donÂ’t understand the command return zwischenwert > > OK i forgot that :-) "zwischenwert" is a word that returns the AD-value 0-4096 > > > I hope that you can help me again > > my used range is 0-5V for all AD inputs, > > No problem. you can use all AD-channels at 0-5V. > > > I go away for a few day so I cant react before fryday > > > > Hans > > > Stefan > > > > > > > > Hallo > > > > Thanks. > > > > The Max 127 is a much better chip > > > > But I donÂ’t understand anything of the 12C > > > > Do you have a program for the Max127 > > > > > > > > > > '------------------------------ function max127auslesen -------------------------------------------------------- > > > function Max127auslesen(chsetting as byte) > > > IIC.init > > > IIC.stop > > > IIC.start > > > IIC.send max127adresse > > > 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 > > > zwischenwert = ((z1*16) + z2) > > > return zwischenwert > > > end function > > > > > > > > > z1-z4 are bytes that i use global. max127adresse is the set adress of the max127 and chsetting sets the number of the AD-channel and the used range (0-5V, 0-10V,...shown in the datasheet). > > > > > > Stefan |
| Antwort schreiben |