Atmega 16 Project / Dust sensor [Bascom]
Répondre à la discussion
Affichage des résultats 1 à 2 sur 2

Atmega 16 Project / Dust sensor [Bascom]



  1. #1
    inviteb127b9ca

    Atmega 16 Project / Dust sensor [Bascom]


    ------

    Hi all,

    I am doing a school electronics project with one atmega16, Lcd 16x2, 2 actuators and a couple of sensors. I am using Bascom-AVR to programme.

    I would like to ask if anyone has a code for sharp dust sensor GP2Y1010AU.

    Actually I started to work with that sensor last week. I have tested it without micro and now I'm trying to interface it with the mega16. I have done a simple code, just to see the adc changes on lcd, but it doesn't work. Im using Adc(1). See the code please. I think it would be better to use a timmer with 3rd pin( of the sensor) but I don't know how to do that. Anyone can help me please.




    $crystal = 4000000
    $regfile = "m16def.dat"


    Config Lcd = 16 * 2
    Config Lcdpin = Pin , Db4 = Portd.3 , Db5 = Portd.2 , Db6 = Portd.1 , Db7 = Portd.0 , E = Portd.6 , Rs = Portd.7

    Config Adc = Free , Prescaler = Auto

    Dim A As Long
    Dim B As Long
    Dim Total As Long


    'Config Portc.5 = Output
    Config Portc.6 = Output
    Start Adc

    Cls

    Do

    Set Portc.5
    Set Portc.6

    Waitms 0.24


    Reset Portc.5
    Reset Portc.6

    Waitms 0.24

    A = Getadc(1)
    B = Getadc(1)
    Total = A + B
    Total = Total / 2

    Home

    Lcd "ADC(1):" ; Total ; " "

    Loop
    End


    See this please:

    http://itp.nyu.edu/physcomp/sensors/Reports/GP2Y1010AU

    Thanks everyone

    -----

  2. #2
    invite5637435c

    Re : Atmega 16 Project / Dust sensor [Bascom]

    Hi limus,

    welcome on FSG.

    I put your request here.
    I'm looking for GP2Y1010AU (i don't know it) and i come back for help you as soon as possible.

Discussions similaires

  1. Doc ATMEGA en FR
    Par invitee45823af dans le forum Électronique
    Réponses: 4
    Dernier message: 03/03/2018, 11h41
  2. Programmation ISP ATmega
    Par invite14944041 dans le forum Électronique
    Réponses: 12
    Dernier message: 16/10/2008, 20h25
  3. moteur sensor less
    Par invite4f7a60b6 dans le forum Électronique
    Réponses: 2
    Dernier message: 12/10/2006, 08h51
  4. Lave vaisselle Siemens aqua sensor
    Par invite47e37118 dans le forum Dépannage
    Réponses: 0
    Dernier message: 26/09/2006, 15h29
  5. Planet-dissolving Dust Cloud ?¿
    Par invitebae3576d dans le forum Archives
    Réponses: 2
    Dernier message: 19/09/2005, 15h39
Dans la rubrique Tech de Futura, découvrez nos comparatifs produits sur l'informatique et les technologies : imprimantes laser couleur, casques audio, chaises gamer...