|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
urgent help
dear all,
i have and gp2d12 ir sensor in my project i need a help in writing a code that operate this sensor the idia is to interface the GP2D12 sensor with PIC16F877A and the sensor will detect the object (moving on a line) and then display the distance on an LCD 16*2 note: this sensor gives analog output and then we need to convert it to digital through PIC A/D pins plz any one can give me help as i need it as soon as he can thanx |
|
#2
|
|||||
|
|||||
|
Re: urgent help
What language are you programming in?
What is the interface to your LCD display? (is it an RS-232 serial connection or something else?) You may find that PIC Basic Pro has all the functions that you need. Read the manual and download the demo version from the page I have linked to and you could have your problem solved pretty quickly. Jason |
|
#3
|
|||
|
|||
|
Re: urgent help
Quote:
the language that i need is c language and it will be compiled on pic c compiler and the used pic is pic16f877a about the LCD it will be interfaced surly with the pic also thanx again Jason |
|
#4
|
|||
|
|||
|
Re: urgent help
Do you have access to a PIC programmer? Are you doing this on a dev board or a circuit that you designed? What type of LCD are you using? Is it a parallel or serial (SPI, UART, I2C, etc) interface? This is a description of a fairly common parallel LCD interface. It also has a PIC assembly example.
-Ken |
|
#5
|
|||
|
|||
|
Re: urgent help
Quote:
i have pic16f877a and i need sample code written in c language to operate this type of sensors about the lcd it is 16*2 and it is usual lcd any way any one can help me iam glad to him |
|
#6
|
||||
|
||||
|
Re: urgent help
Hi Jason,
first of all, are you a member of a FIRST team, or just got here by chance? =] now.. *read your datasheet to this sensor, check to see what king of output does it give. *read PIC's datasheet as well, to see what do you need in order to operate the PIC's ADC, it shouldn't be hard, but educational. -if you are pressed with time, I could assist you, but studying the PIC's architecture would be of much greater value to you. do you have any former experience with PICs? Ran. |
|
#7
|
|||
|
|||
|
Re: urgent help
Quote:
Ran iam engkhlaif who need the help any way about me i dont know what is FIRST but iam a student in my last year and ,ofcourse i had experience witth PIC's i have read the sensor datasheet the type of my sensor if GP2D12 wich gives analog output so i need to configure them (ADC's pins) i need sample code that will read the sensor output then convert it to digital and then display the distance on LCD the programm iam using is MPlab v7.31 please any one can help thanx to all |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HELP-URGENT PROGRAMMING HELP NEEDED | Rohith Surampudi | Lego Mindstorm Discussion | 1 | 24-03-2006 23:05 |
| urgent help | hiimcristhian | Technical Discussion | 3 | 16-02-2006 19:10 |
| URgent Programming Help needed | rcubes85 | Programming | 4 | 15-02-2005 23:21 |
| Gear Help Needed- Urgent | psychoCHIPMUNKK | Technical Discussion | 6 | 05-02-2004 13:44 |
| URGENT: i need help!!! | Ydnar | 3D Animation and Competition | 4 | 14-03-2002 22:37 |