Shop OBEX P1 Docs P2 Docs Learn Events
Bar Graph (Advanced) What need to be change to have an output from the MAX186 s — Parallax Forums

Bar Graph (Advanced) What need to be change to have an output from the MAX186 s

sam_sam_samsam_sam_sam Posts: 2,286
edited 2010-05-16 02:17 in General Discussion
This from my from my meter code

The scale for this one is· 0 to 50 C and a scale 0 to 125 F

 SEROUT TX, T2400, [noparse][[/noparse]LcdCls]

DO

  PAUSE 5
  LOW CS                                          ' Enable ADC
  SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%10111101]   ' Select CH0, Single-Ended [noparse][[/noparse]%1XXX1101]
  SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]KLN\12]       ' Read ADC
  HIGH CS                                         ' Disable ADC
  tC = KLN  - 275
                                  ' convert to tenths C
  SEROUT TX, T2400, [noparse][[/noparse]LcdLine1,  "TC ", DEC  TC]   ' Displays voltages & digital value

  LOW CS                                          ' Enable ADC
  SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11111101]   ' Select CH7, Single-Ended
  SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]KLN1\12]      ' Read ADC
  HIGH CS                                         ' Disable ADC
  tC1 = KLN1 - 275 ' convert to tenths C
  SEROUT TX, T2400, [noparse][[/noparse]LcdBLon, LcdLine1_1, "TC1 ", DEC  TC1]  ' Displays voltages & digital value
 
   LOW CS                                           ' Enable ADC
  SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11001101]   ' Select CH1, Single-Ended [noparse][[/noparse]%1XXX1101]
  SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]results0\12]       ' Read ADC
  HIGH CS
  Volts0 =  results0 */ Cnts2Mv
  IF volts0 > 1 THEN
  SEROUT TX, T2400, [noparse][[/noparse]LcdLine1_2,  "VT ",DEC Volts0 ]
  ELSE
  SEROUT TX, T2400, [noparse][[/noparse]LcdLine1_2,  "V ____" ]
  SEROUT TX, T2400, [noparse][[/noparse]LcdLine2,  "                   " ]
  PAUSE 100
  ENDIF
LOOP
  

I want to display it as a Bar Graph this code·using this what need to be changed
' -----[noparse][[/noparse] Initialization ]--------------------------------------------------
  HIGH LCD                              ' Setup Serial Output Pin
  PAUSE 100                             ' Give LCD Time To Settle
Download_Chars:
  FOR index = 0 TO 45                   ' Download Custom Characters
    READ CC0 + index, work              ' Read EEPROM Data
    SEROUT LCD, Baud, [noparse][[/noparse]work]            ' Send To LCD CGRAM
  NEXT
  SEROUT LCD, Baud, [noparse][[/noparse]LcdOn1, LcdBLon]   ' Turn LCD Display & Backlight On
                                        ' Backlight Only On Backlit Models
  PAUSE 10                              ' Allow LCD Time To Settle
  highVal = 255                       ' You can change this value to any
                                        ' Non-Zero value
' -----[noparse][[/noparse] Program Code ]----------------------------------------------------
Main:
  DO
    SEROUT LCD, Baud, [noparse][[/noparse]LcdCls]            ' Clear LCD Screen
    PAUSE 10                              ' Must Follow CLS
    FOR index = 0 TO highVal              ' Count To highVal can add (Step 100}
      GOSUB Disp_Graph                    ' Update Display
    NEXT
    PAUSE 5000                            ' Wait 5 Seconds Then Repeat
  LOOP                                    ' Forever
  STOP

' -----[noparse][[/noparse] Subroutines ]-----------------------------------------------------
Disp_Graph:
  perCent = ((index * 100) / highVal)
  ' Draw index, highVal and perCent Values.  This line can be removed.
  SEROUT LCD, Baud, [noparse][[/noparse]LcdLine1, DEC5 index, "/",
    DEC5 highVal, "=", DEC perCent, "%"]
  ' Draw Header And Left-Most, Solid Blocks
  SEROUT LCD, Baud, [noparse][[/noparse]LcdLine2, "0%", REP 4\(perCent MIN 1 - 1 / 10)]
  ' Draw Partial Block
  IF perCent > 0 THEN SEROUT LCD, Baud, [noparse][[/noparse](perCent - 1 / 2) // 5]
  ' Draw Right-Most, Blank Blocks And Footer
  SEROUT LCD, Baud, [noparse][[/noparse]REP 32\10 - ((perCent + 9) / 10), "100%"]
  RETURN 

I also want to use this as well and I want to display it as a Bar Graph this code·using this what need to be changed
I aslo have where I to do the same thing with voltage 0 to 4 volts·
 ' -----[noparse][[/noparse] Initialization ]--------------------------------------------------
  HIGH LCD                              ' Setup Serial Output Pin
  PAUSE 100                             ' Give LCD Time To Settle
Download_Chars:
  FOR index = 0 TO 72                     ' Download Custom Characters
    READ CC0 + index, work              ' Read EEPROM Data
    SEROUT LCD, Baud, [noparse][[/noparse]work]            ' Send To LCD CGRAM
  NEXT
  SEROUT LCD, Baud, [noparse][[/noparse]LcdOn1, LcdBLon]   ' Turn LCD Display & Backlight On
                                        ' Backlight Only On Backlit Models
  PAUSE 10                              ' Allow LCD Time To Settle
  highVal = 5000                       ' You can change this value to any
                                        ' Non-Zero value
' -----[noparse][[/noparse] Program Code ]----------------------------------------------------
Main:
  DO
    SEROUT LCD, Baud, [noparse][[/noparse]LcdCls]            ' Clear LCD Screen
    PAUSE 10                              ' Must Follow CLS
    FOR index = 0 TO highVal      ' Count To highVal can add (Step 100}
      GOSUB Disp_Graph                    ' Update Display
    NEXT
    PAUSE 5000                            ' Wait 5 Seconds Then Repeat
  LOOP                                    ' Forever
  STOP

' -----[noparse][[/noparse] Subroutines ]-----------------------------------------------------
Disp_Graph:
  perCent = (index / (highVal / 100))     ' Calculate Percent Value
  ' Draw index, highVal and perCent Values.  This line can be removed.
  SEROUT LCD, Baud, [noparse][[/noparse]LcdLine3, DEC5 index, " / ", DEC5 highVal]
  ' Draw Header And Left-Most, Solid Blocks
  SEROUT LCD, Baud, [noparse][[/noparse]LcdLine1, "0%  ", REP 4\(perCent MIN 1 - 1 / 10)]
  ' Draw Partial Block
  IF perCent > 0 THEN SEROUT LCD, Baud, [noparse][[/noparse](perCent - 1 / 2) // 5]
  ' Draw Right-Most, Blank Blocks And Footer
  SEROUT LCD, Baud, [noparse][[/noparse]REP 32\10 - ((perCent + 9) / 10), DEC perCent, " %"]
   SEROUT LCD, Baud, [noparse][[/noparse]LcdBLon ,LcdLine2,5,7,7,7,7,7, 6,"  KW"]
  RETURN

Thank to any one that can help

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 5/4/2010 2:38:32 PM GMT

Comments

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-04 14:29
    Here is the code for all three


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/4/2010 2:35:01 PM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-05 17:51
    Has any one done this before even with the ADC Chips that Parallax sells

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-05 17:56
    Sam, I am unclear...are you just having trouble scaling the values from the ADC to the 100% range? The 12-bit ADC will count up to 4095, that 4096 possible values and that will work with my Bar Graph code, if that's what you're using.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-05 17:59
    Chris that is what i want to but what do you have to change in order to read the data from the adc chip that is what i need to know

    also how do you scale the bar graph as well

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-05 18:49
    As per the comments in the code, highVal is the variable that tells the high range of the input. In your code you would set it to 4095. This would cause an input value (sotred in index) from 0 through 4095 to be scaled to a percentage from 0 through 100% and the display would adjust accordingly. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-05 20:11
    Chris I have try for a while and can not get the data from the ADC Chip to the LCD Bar Graph and I do not know what it is that I am missing

    How do you take the data that you have from the ADC part of the code and Put in·to the Bar Graph part of the code

    There is where I am··I am ·REAL·Lost or just have REAL big brain f cry.gif t

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 5/5/2010 8:33:49 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-05 23:53
    The Bar Graph programs were designed to be relatively simple in that there is an initialization section which must be present and then just the subroutine. You're only passing two values into the subroutine. highVal, which in your case should be 4095 and index, which in your case should be assigned after the ADC is read from whatever variable has the value. That value goes into index and should be between 0 and 4095. index and highVal should both be Word variables and so should the one reading your ADC value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-05 23:56
    If it's not solved by Friday send me a PM and this weekend I will wire up a 12-bit ADC, potentiometer and the LCD Bargraph demo with the code to display the values coming in from the ADC. I will post a video of it to the Savage Circuits YouTube channel.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-10 18:26
    Okay, based on PM we'll be covering this in a video. I should have it posted tonight. I will link it here once it is up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-10 22:39
    Chris

    Could you also post the code that you used

    Thanks for your help

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-11 20:12
    Sam,

    Yep, got the programs and code done last night here at work, however I had forgotten when I got home that my main PC is down and the HD had just arrived. I didn't have time to install it last night. I will get it back up tonight though. If you're not sure what I am talking about, see this post.

    Or this one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-12 18:09
    Chris

    I do understand and I did read·that post on your web site

    Please take a much as you need I am in no big hurry· I just want to know how you do this

    Thanks for you time and help in this project

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-12 18:12
    Video is rendering currently while I am working. I will post it shortly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-13 01:29
    Condensed it down and it still took two parts...ah well...you can find the videos at the following links and the source code attached to the second link. I hope this helps. If you have any questions on the code or video please reply to the thread their psted in on the Savage Circuits website.

    Episode 5: Merging Programs Part 1 of 2

    Episode 6: Merging Programs Part 2 of 2



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-13 19:51
    Chris

    That was a GREAT how to do video
    ···········································

    ·············································· That help alot
    ··································································



    ········································································ ·Thanks



    ····························································································· I got it to work


    ·································································································································· ··smile.gif·· smile.gif· smile.gif· up

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-13 20:01
    Yeah, I appreciate the input but in all honesty it was supposed to be a 1 part video and that ended up not being possible. But in trying to make it that way the resultant 2-part video (the second part) seriously fell short. I reshot the video I intended and I will be revising part 2 later to explain in more detail what is happening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-14 17:32
    Sam,

    The second part video (Episode 6) has been fully updated and posted at the link above. It gives more details than I thought I had time for originally.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Shawn LoweShawn Lowe Posts: 635
    edited 2010-05-14 19:11
    Chris-
    Thanks for taking the time to make this video. You explain alot in a clear manner that helps people like me really understand the thinking process in merging programs together. Well done!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-14 19:36
    Shawn, thanks for your feedback. I really do appreciate the good and the bad. Some feedback on YouTube prompted me to change the way I do cuts and that had a huge impact on the flow of the videos, so it shows that I can make adjustments as needed. More to come!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-14 20:59
    Chris

    The info that you add at the end ·WAS GREAT··that helps alot Thank for all of your help

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-05-16 02:17
    Here is some thing that I have been playing with

     ' =========================================================================
    '
    '   File...... MAX186 Bar Graph (Hi-Res_Advanced).bs2
    '   Purpose... Demostrate A Hi-Res Advanced Bar Graph
    '   Author.... Sam
    '   E-mail.... [url=mailto:sam1030@comcast.net]sam1030@comcast.net[/url]
    '   Started... 5-12-2010
    '   Updated...
    '
    '   {$STAMP BS2}
    '   {$PBASIC 2.5}
    '
    ' =========================================================================
    '
    ' I want to thank Chris Savage for his help writing the line of
    ' code to make ADC chip work with the Bar graph
    '
    ' -----[noparse][[/noparse] Program Description ]---------------------------------------------
    ' This program shows how to draw an Advanced Bar Graph Display on a
    ' Paralax 2X16 Serial LCD.  The subroutine needs only to know the highVal
    ' and the current index to display the Percent and Bar Graph.  Feel free to
    ' change the code to suit your own application.
    '
    ' NOTE: This code includes other unused constants for the display so you
    ' have them, however if not used, these do not take up any memory in the
    ' BASIC Stamp, so they are good to have available.
    '
    ' You can change the value of highVal and see how it affects things.
    ' highVal and index are Word values and should never exceed 65535.
    
    ' -----[noparse][[/noparse] Revision History ]------------------------------------------------
    ' Increased resolution from 255 to 65535.
    
    ' -----[noparse][[/noparse] I/O Definitions ]-------------------------------------------------
    LCD             PIN     15              ' LCD Serial I/O Pin
    CS              PIN     1               ' Chip Select
    Clock           PIN     0               ' Clock
    DataOut         PIN     3               ' DataOut
    DataIn          PIN     2               ' DataIn
    
    ' -----[noparse][[/noparse] Constants ]-------------------------------------------------------
    LcdBkSpc        CON     $08             ' Move Cursor Left
    LcdRt           CON     $09             ' Move Cursor Right
    LcdLF           CON     $0A             ' Move Cursor Down 1 Line
    LcdCls          CON     $0C             ' Clear LCD (Use PAUSE 5 After)
    LcdCR           CON     $0D             ' Move Pos 0 Of Next Line
    LcdBLon         CON     $11             ' Backlight On
    LcdBLoff        CON     $12             ' Backlight Off
    LcdOff          CON     $15             ' LCD Off
    LcdOn1          CON     $16             ' LCD On; Cursor Off, Blink Off
    LcdOn2          CON     $17             ' LCD On; Cursor Off, Blink On
    LcdOn3          CON     $18             ' LCD On; Cursor On, Blink Off
    LcdOn4          CON     $19             ' LCD On; Cursor On, Blink On
    LcdLine1        CON     $80             ' Move To Line 1, Column 0
    LcdLine2        CON     $94             ' Move To Line 2, Column 0
    LcdCC0          CON     $F8             ' Define Custom Char 0
    LcdCC1          CON     $F9             ' Define Custom Char 1
    LcdCC2          CON     $FA             ' Define Custom Char 2
    LcdCC3          CON     $FB             ' Define Custom Char 3
    LcdCC4          CON     $FC             ' Define Custom Char 4
    LcdCC5          CON     $FD             ' Define Custom Char 5
    LcdCC6          CON     $FE             ' Define Custom Char 6
    LcdCC7          CON     $FF             ' Define Custom Char 7
    Baud            CON     396             ' 2400 Kbps (BS2)
    Cnts2Mv         CON     $00F6           ' x 245
    ' -----[noparse][[/noparse] Variables ]-------------------------------------------------------
    work            VAR     Byte            ' Work Variable
    index           VAR     Word            ' Current Value Of Count/Loop
    highVal         VAR     Word            ' Highest Value Expected
    perCent         VAR     Byte            ' Percentage
    result         VAR     Word             ' Conversion Result CH0
    mVolts         VAR     Word             ' Result0 --> mVolts
    
    ' -----[noparse][[/noparse] EEPROM Data ]-----------------------------------------------------
    CC0             DATA    LcdCC0, $10, $10, $10, $10, $10, $10, $10, $10
    CC1             DATA    LcdCC1, $18, $18, $18, $18, $18, $18, $18, $18
    CC2             DATA    LcdCC2, $1C, $1C, $1C, $1C, $1C, $1C, $1C, $1C
    CC3             DATA    LcdCC3, $1E, $1E, $1E, $1E, $1E, $1E, $1E, $1E
    CC4             DATA    LcdCC4, $1F, $1F, $1F, $1F, $1F, $1F, $1F, $1F
    
    ' -----[noparse][[/noparse] Initialization ]--------------------------------------------------
      HIGH LCD                              ' Setup Serial Output Pin
      PAUSE 100                             ' Give LCD Time To Settle
    Download_Chars:
      FOR index = 0 TO 45                   ' Download Custom Characters
        READ CC0 + index, work              ' Read EEPROM Data
        SEROUT LCD, Baud, [noparse][[/noparse]work]            ' Send To LCD CGRAM
      NEXT
      SEROUT LCD, Baud, [noparse][[/noparse]LcdOn1, LcdBLon]   ' Turn LCD Display & Backlight On
                                            ' Backlight Only On Backlit Models
      PAUSE 10                              ' Allow LCD Time To Settle
      highVal = 4095                        ' You can change this value to any
                                            ' Non-Zero value
    ' -----[noparse][[/noparse] Program Code ]----------------------------------------------------
    Main:
      DO
      SEROUT LCD, Baud, [noparse][[/noparse]LcdCls]
      GOSUB Read_ADC                        ' Read ADC Value
      index = result                        ' Copy to index
      GOSUB Disp_Graph                      ' Draw Graph
      PAUSE 100                             ' Small Delay
      LOOP                                    ' Forever
    
    ' -----[noparse][[/noparse] Subroutines ]-----------------------------------------------------
    Disp_Graph:
      perCent = (index / (highVal / 100))     ' Calculate Percent Value
      ' Draw index, highVal and perCent Values.  This line can be removed.
     ' SEROUT LCD, Baud, [noparse][[/noparse]LcdLine1, DEC5 index, "/",
       ' ]
      ' Draw Header And Left-Most, Solid Blocks
      SEROUT LCD, Baud, [noparse][[/noparse]LcdLine1, "0_", REP 4\(perCent MIN 1 - 1 / 10)]
      ' Draw Partial Block
      IF perCent > 0 THEN SEROUT LCD, Baud, [noparse][[/noparse](perCent - 1 / 2) // 5]
      ' Draw Right-Most, Blank Blocks And Footer
      SEROUT LCD, Baud, [noparse][[/noparse]REP 32\10 - ((perCent + 9) / 10), DEC perCent, "%" ]
      RETURN
    
    Read_ADC:
      LOW CS                                          ' Enable ADC
      SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11001101]   ' Select CH1, Single-Ended [noparse][[/noparse]%1XXX1101]
      SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result\12]    ' Read ADC
      HIGH CS                                         ' Disable ADC
      mVolts =  result */ Cnts2Mv                    ' Convert To Millivolts
      RETURN
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·Now wanting to learn Spin· Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.