586,217 active members*
3,403 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012
    Posts
    0

    Need help with coding

    How do i read sensor voltage to microcontroller, PIC18F4520. Any codes i can use?

  2. #2
    Join Date
    Nov 2011
    Posts
    0
    You need to get MPLAB and a chip programmer. Write your assembly in the MPLAB and then download your hex file to the chip. You will have to write a code to read the voltage on the ADC pin of the chip. It is 10 bit resolution. Read about ADCON0, ADCON1, ANSEL, ADRESL, and ADRESH. If your voltage to read is over the Vss of the chip, you will have to use a voltage divider to scale the results down.

Similar Threads

  1. Anyone know some advanced GPP coding?
    By SolidCam_ in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 2
    Last Post: 04-25-2012, 04:58 PM
  2. Roller cam coding
    By greybeard in forum Coding
    Replies: 6
    Last Post: 10-23-2010, 06:28 PM
  3. Algorithm for G02 / G03 coding
    By jemmyell in forum Coding
    Replies: 19
    Last Post: 08-06-2009, 11:58 PM
  4. New to G-Coding
    By Larry Myers in forum G-Code Programing
    Replies: 4
    Last Post: 09-20-2007, 03:06 PM
  5. G2/G3 Coding
    By jrobson in forum G-Code Programing
    Replies: 24
    Last Post: 09-02-2006, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •