Results 1 to 7 of 7

Thread: 8051 +

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User vanmx's Avatar
    Join Date: Oct:2006
    Location:
    Posts: 1,964

    8051 +

    ,

    , . , . 3 sharp gp2y0a21yk0f. ADC 0808 0 255 , . , ADC- (.)





    ADC- :

    SensorVoltage=AdcValue*0.01953 [V]

    ., :

    distance=27*(SensorVoltage)^(-1.15)

    , 8051 .
    X470 AORUS ULTRA GAMING | Ryzen5 2600 |2x16GB Corsair LPX 3200Mhz | EVGA GeForce GTX 1080 Ti SC Black Edition Gaming|512GB Samsung 970 Pro +
    512GB ADATA SU800| Corsair HX1200i | Corsair Graphite 600t |BENQ PD3200U

  2. #2
    Registered User
    Join Date: Jul:2004
    Location:
    Posts: 621
    , 256 , - ? 0-255 ADC-

  3. #3
    Registered User vanmx's Avatar
    Join Date: Oct:2006
    Location:
    Posts: 1,964
    , , - . .
    :

    []=27/([ ADC]*0.01953)^1,15

    , - 255 , ? 89C51 , ?
    X470 AORUS ULTRA GAMING | Ryzen5 2600 |2x16GB Corsair LPX 3200Mhz | EVGA GeForce GTX 1080 Ti SC Black Edition Gaming|512GB Samsung 970 Pro +
    512GB ADATA SU800| Corsair HX1200i | Corsair Graphite 600t |BENQ PD3200U

  4. #4
    Registered User
    Join Date: Jul:2004
    Location:
    Posts: 621
    Quote Originally Posted by vanmx View Post
    ,
    , , ( )

  5. #5
    Registered User vanmx's Avatar
    Join Date: Oct:2006
    Location:
    Posts: 1,964
    Quote Originally Posted by DimKo View Post
    , , ( )
    C. - , ?
    X470 AORUS ULTRA GAMING | Ryzen5 2600 |2x16GB Corsair LPX 3200Mhz | EVGA GeForce GTX 1080 Ti SC Black Edition Gaming|512GB Samsung 970 Pro +
    512GB ADATA SU800| Corsair HX1200i | Corsair Graphite 600t |BENQ PD3200U

  6. #6
    Registered User
    Join Date: Jul:2004
    Location:
    Posts: 621
    , -:
    Code:
     printf("float adcToDistance[256] = {\n");
     printf("\t%.4lf", 0.0);     // Formula is undefined for i == 0
     for (int i = 1; i < 256; ++i) {
        printf(",\n\t%.4lf", 27.0 / pow(i * 0.01953, 1.15));
     }
     printf("\n};\n");
    math.h,

  7. #7
    a.k.a. Kal KaloyanP's Avatar
    Join Date: Dec:2005
    Location: UK
    Posts: 3,750
    , . , , 16 , . , , ( ).

    ADC Sense=AdcVal*Vmax/255, Vmax/256. , 256 255 . . , .

    AdcVal*Vmax/255, distance=27*(SensorVoltage)^(-1.15)

    d=27/(AdcVal*Vmax/255)^1.15

    d=27/(AdcVal/51)^1.15

    d=27*51^1.15/AdcVal^1.15

    d=2483.5/AdcVal^1.15

    AdcVal^1.15.

    . 16 , , - .

    Quote Originally Posted by vanmx View Post
    , , - . .
    :

    []=27/([ ADC]*0.01953)^1,15

    , - 255 , ? 89C51 , ?
    . , - 10 , - , , , .
    D80; 50/1.8D; Tamron 70-300; 18-55 VR;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |