ADC conversion using PIC 16f877a

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

  • Kaustubh Katdare
    Kaustubh Katdare
    Thread moved to electrical/electronic engineering section.
  • shahrul
    shahrul
    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-#.

You are reading an archived discussion.

Related Posts

hi, can we assign any conversion channel to perform a conversion.. example: i have 2 ultrasonics range sensors and i am measuring the distance to a wall. from tutorials, it...
hi all, I am working on video encryption in matlab. I have tried an algo for encryption and decryption on images. and it gives exact image reconstruction. But when i...
CEans, You can now share all CE Forum posts on Twitter. So those who are on twitter, simply hit the button below the post you wish to share. This feature...
Announcement: https://www.crazyengineers.com/forum/announcements/33617-share-ce-posts-twitter.html Discuss in this thread.
Hey CEans i have to make a assembly language program.In this program i will accept the operand in one code segment and and perform the multiplication in another code segment....