Author Topic: sensor  (Read 1030 times)

0 Members and 1 Guest are viewing this topic.

Offline RoboMoonTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
« on: July 22, 2010, 01:27:53 PM »
How to control this sensor ...
« Last Edit: September 08, 2010, 02:43:25 AM by RoboMoon »

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: sensor
« Reply #1 on: July 22, 2010, 02:20:22 PM »
Always start with the data sheet for the processor (PIC) you are using. There is a chapter on the ADC. Also look at the App
Notes on Microchips web site that use the ADC.

A lot of the coding info you find will be in assembler. The data sheet and other sources have info on the assembler instructions. It is very helpful to know a little about them. Then you easier to code the same functionality in C.

Which C compiler are you using? The C18 & HiTech C compilers have a decent manual and lots of code libraries and examples. Read the manuals and dig through the code.

Another source is the Microchip user's forum. Search for ADc and you'll find lots of examples and discussions.
Start with very simple code to learn the fundamentals. Use the MPLAB SIMulator to debug and understand what your code is actually doing.

good luck and have fun.


Get Your Ad Here