CrazyEngineers
  • hi,

    can we assign any conversion channel to perform a conversion?
    example: i have 2 ultrasonic range sensors and i am measuring the distance to a wall.

    from tutorials, it say the first conversion can be done in channel 2. i.e.

    distance_1=Adc_Read(2);

    now i want to measure the distance using the secomd sensor..

    distance_2=Adc_Read(?);

    what do i use here??

    its urgent guys.. please help..

    cheerz,
    satanas
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorApr 13, 2010

    Thread moved to electrical/electronic engineering section.
    Are you sure? This action cannot be undone.
    Cancel
  • shahrul

    MemberApr 22, 2010

    satanas
    distance_1=Adc_Read(2);

    now i want to measure the distance using the secomd sensor..

    distance_2=Adc_Read(?);

    what do i use here??

    its urgent guys.. please help..
    Adc_Read(2) is maybe read the analog input on channel 2 (RA2, that is pin 4 PIC16F877A). This is where your sensor connected. I said maybe, because it's depends the Adc_Read() function. I assume that is channel number.
    So, for second sensor, just put for the second sensor channel. I have sample program #-Link-Snipped-#.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register