Scaling ADC Result to a Set Range


Results 1 to 40 of 45

Threaded View

  1. #26
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Scaling ADC Result to a Set Range

    none of these are correct
    #IFDEF USE_LCD_FOR_DEBUG
    LCD_INST CON 254 ' instruction
    LCD_CLR CON 1 ' Clear screen
    LCD_L1 CON 128 ' LCD line 1
    LCD_L2 CON 192 ' LCD line 2
    #ENDIF

    LCD_CLR CON 12 ' Clear screen
    LCD_HOME CON 1 ' HOME
    LCD_NEXT_LINE CON 13 ' CR does this go back to line 1 when current line is line2 ? seems it will go to first pos of line

    LINE 2
    WOULD BE HSEROUT [16,80] to be sure


    TRY
    HSEROUT [1,"ADCInVal=", DEC ADCInVal, " ", 13, "MotorDuty=", DEC MotorDuty, " "]
    or
    HSEROUT [1,"ADCInVal=", DEC ADCInVal, " ", 16,80, "MotorDuty=", DEC MotorDuty, " "]


    ps the display needs 1000ms delay to power on/boot before you try to write to it
    Last edited by richard; - 1st November 2015 at 01:34. Reason: ps and home display

Similar Threads

  1. Replies: 4
    Last Post: - 27th January 2015, 15:34
  2. Replies: 4
    Last Post: - 30th May 2012, 08:28
  3. Converting 10bit ADC result to 8 bit
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 5th March 2012, 20:38
  4. strange A2D 5V scaling result - 16F819
    By Max Power in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th April 2010, 02:28
  5. Scaling ADC values
    By purkolator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th November 2007, 05:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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