![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| hi there i have build a line follower robot using the above mentioned pic...i am now in the process of trying to program it.....i have used 3 phototransistors as sensors that are connected to AN0, AN1 and AN3 of the pic.....how do i actually go about programming it so that i should keep reading the outpts of these sensors all the time? please help me....i need the code in C. thanks a lot.... | |
| |
| | (permalink) |
| You need to:- Set the analog input to AN0 wait the sampling time Start the conversion wait for the conversion to finish read the value of AN0 etc for AN1 and for AN2 repeat There is only one ADC converter, but it is very quick so the whole lot takes very little time. I only have code in assembly language. | |
| |
| | (permalink) |
| Urgent usually means school assignment. PS line followers usually use comparators not A/D. | |
| |
| | (permalink) |
| lol...it is actually not a project...just a little thing i decided to do but in like 2 days i go back to school and wont hae anytime for my line follower....so thought i would finish as soon as possible....i am using the pic16f877 and it just makes sense to use the adc....thanks diver300...that was helpfuk | |
| |
| | (permalink) |
| In that case this site is helpful for budding robot builders. http://www.robotroom.com/ | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| urgent!! interfacing the pic16f877 to the pc serial port | foosm | Micro Controllers | 15 | 15th May 2008 02:44 PM |
| Problem with multiple ADC using pic16f877 | andyto | Micro Controllers | 15 | 24th September 2007 11:48 PM |
| 16F877 Timer0 Interrupt Affecting ADC | sebana | Micro Controllers | 13 | 12th September 2007 10:43 AM |
| PIC16F877 ADC problems, urgent help needed | grutt | Micro Controllers | 6 | 1st April 2004 04:07 PM |
| urgent help needed for pic16f877 programming | bythesea | Micro Controllers | 5 | 10th January 2004 07:53 PM |