Shop OBEX P1 Docs P2 Docs Learn Events
MAX1499 ADC Meter Chip Working on this project again — Parallax Forums

MAX1499 ADC Meter Chip Working on this project again

sam_sam_samsam_sam_sam Posts: 2,286
edited 2011-12-23 15:27 in General Discussion
·Here is the Data Sheet for this chip
http://datasheets.maxim-ic.com/en/ds/MAX1497-MAX1499.pdf

I going to order some free sample

I found a company that will ·put this chip on a DIP format board ·for for a small fee

I am hoping that some one can help with this ·or can tell me if it is doable or not

and which Basic Stamp I need to use

I want to thank any one that can help

·

·

·
·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·idea.gif·that you may have and all of your time finding them :smile:

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 2/2/2010 2:55:38 AM GMT

Comments

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-22 06:08
    ·How do I write the code to control SHIFTIN and SHIFTOUT· idea.gif



    '______________________________________________________________________________________
     
    'REGISTER N0.    ADDRESS RS [noparse][[/noparse]4:0]        NAME WIDTH ACCESS
    '
    '  1               00000                 Status register 8 READ only
    '  2               00001                 Control register 16 R/W
    '  3               00010                 Overrange register 16 R/W
    '  4               00011                 Underrange register 16 R/W
    '
    '         [color=#ff0000]The one in red are not going to be use as of now [/color]
    [color=#ff0000]'[/color]
    [color=red]'  5               00100                 LED segment-display register 1 16 R/W    
    '  6               00101                 LED segment-display register 2 16 R/W
    '  7               00110                 LED segment-display register 3 8 R/W[/color]
    [color=red]'
    [/color]'  8               00111                 ADC custom offset register 16 R/W
    '  9               01000                 ADC result register 1 (16 MSBs) 16 READ only
    '  10              01001                 LED DATA register 16 R/W
    '  11              01010                 Peak register 16 READ only
    '  12              10100                 ADC result register 2 (4 LSBs) 8 READ only
    '________________________________________________________________________________________
    '
    ' Command Byte (WRITE Only)
    '
    ' MSB                                                                LSB
    '
    ' Bit 7      Bit 6    Bit 5    Bit 4    Bit 3    Bit 2    Bit 1      Bit 0
    '
    ' START(1)    R/W       RS4     RS3      RS2      RS1      RS0         X
    '________________________________________________________________________________________
    '
    ' Status Register (Read Only)
    '
    ' MSB 
    '                                                                LSB
    ' SIGN       OVER       UNDER     LOW_BATT      DRDY    0      0       0
    '
    ' Default values: 00h 
    '________________________________________________________________________________________
    '
    ' Control Register (Read/Write)
    '
    ' MSB
    '
    ' Bit 15     Bit 14    Bit 13   Bit 12   Bit 11    Bit 10    Bit 9     Bit 8
    '
    ' SPI/ADC    EXTCLK    INTREF    DPON    DPSET2    DPSET1    PD_DIG    PD_ANA
    '
    '                                                                              LSB
    '
    ' Bit 7      Bit 6     Bit 5    Bit 4    Bit 3     Bit 2        Bit 1         Bit 0
    '
    ' HOLD       PEAK      RANGE    CLR      SEG_SEL   OFFSET_CAL1  OFFSET_CAL2   ENABLE
    '
    ' Default values: 0001h
    '___________________________________________________________________________________
    '
    ' Overrange Register (Read/Write)
    '
    ' MSB                                                                                       LSB
    '
    ' D15   D14   D13   D12   D11    D10    D9    D8   D7   D6    D5    D4    D3    D2    D1    D0
    '
    ' Default values:
    '
    ' 7CF0h   (FOR 3.5-digit, +1999)
    '
    ' 4E1Fh   (FOR 4.5-digit, +19,999)
    '_______________________________________________________________________________________________
    '
    ' Underrange Register (Read/Write)
    '
    ' MSB                                                                                       LSB
    '
    ' D15    D14   D13   D12   D11   D10   D9    D8   D7    D6     D5    D4    D3   D2    D1    D0
    '
    ' Default values:
    '
    ' 8300h    (FOR 3.5-digit, -2000)
    '
    ' B1E0h    (FOR 4.5-digit, -20,000)
    '
    '______________________________________________________________________________________________
    '
    ' ADC Custom Offset-Calibration Register (Read/Write) 
    '
    ' MSB                                                                                       LSB
    '
    ' D15    D14   D13   D12   D11   D10   D9    D8   D7    D6    D5     D4    D3   D2    D1    D0
    '
    'Default values: 0000h
    '_______________________________________________________________________________________________
    '
    ' ADC Result Register 1 (READ Only)
    '
    ' MSB                                                              LSB(MAX1497)            LSB(MAX1499)
    '
    ' D15      D14   D13   D12   D11   D10   D9    D8   D7    D6    D5   ^ D4 ^   D3    D2   D1  ^ D0 ^
    '
    ' Default values: 0000h
    '______________________________________________________________________________________________
    '
    ' ADC Result Register 2 (READ Only)
    '
    ' MSB                                           LSB
    '
    ' D3     D2     D1      D0    0       0    0    0
    '
    ' Default values: 00h
    '___________________________________________________________________________________________________
    '
    ' PEAK Register (Read Only)
    '
    ' MSB                                                                LSB(MAX1497)             LSB(MAX1499)
    '
    ' D15     D14    D13    D12   D11    D10    D9   D8   D7   D6    D5   ^ D4 ^   D3    D2    D1   ^ D0 ^
    '
    ' Default values: B1E0h
    
    

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

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/31/2010 4:57:02 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-24 16:36
    How similar is the MAX186 to the MAX1499 in the way you write the code for it

    I have the free sample now and ae unable to read the chip


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

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/31/2010 6:23:14 AM GMT
  • FranklinFranklin Posts: 4,747
    edited 2010-01-24 21:47
    Sam, it would help if you would tell us what it is you are trying to do and how you have things hooked together. Then maybe we could tell you if you are going in the right direction. If it works for you you are doing it right

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-01-31 04:48
    I do not uderstand this part of the data sheet
    'REGISTER N0.    ADDRESS RS [noparse][[/noparse]4:0]        NAME WIDTH ACCESS
    '
    '  1               00000                 Status register 8 READ only
    '  2               00001                 Control register 16 R/W
    '  3               00010                 Overrange register 16 R/W
    '  4               00011                 Underrange register 16 R/W
    '
    '         [color=#ff0000]The one in red are not going to be use as of now [/color]
    [color=#ff0000]'[/color]
    [color=red]'  5               00100                 LED segment-display register 1 16 R/W    
    '  6               00101                 LED segment-display register 2 16 R/W
    '  7               00110                 LED segment-display register 3 8 R/W[/color]
    [color=red]'
    [/color]'  8               00111                 ADC custom offset register 16 R/W
    '  9               01000                 ADC result register 1 (16 MSBs) 16 READ only
    '  10              01001                 LED DATA register 16 R/W
    '  11              01010                 Peak register 16 READ only
    '  12              10100                 ADC result register 2 (4 LSBs) 8 READ only
    '________________________________________________________________________________________
    '
    ' Command Byte (WRITE Only)
    '
    ' MSB                                                                LSB
    '
    ' Bit 7      Bit 6    Bit 5    Bit 4    Bit 3    Bit 2    Bit 1      Bit 0
    '
    ' START(1)    R/W       RS4     RS3      RS2      RS1      RS0         X
    
    

    I do not understand how to write the HEX value if the default value is 0001
    ' Control Register (Read/Write)
    '
    ' MSB
    '
    ' Bit 15     Bit 14    Bit 13   Bit 12   Bit 11    Bit 10    Bit 9     Bit 8
    '
    ' SPI/ADC    EXTCLK    INTREF    DPON    DPSET2    DPSET1    PD_DIG    PD_ANA
    '
    '                                                                              LSB
    '
    ' Bit 7      Bit 6     Bit 5    Bit 4    Bit 3     Bit 2        Bit 1         Bit 0
    '
    ' HOLD       PEAK      RANGE    CLR      SEG_SEL   OFFSET_CAL1  OFFSET_CAL2   ENABLE
    '
    ' Default values: 0001h
    
    

    How do I use this to control the Data coming from the meter chip
    Can any one help with this
    This is what I have used
    DO
    · LOW CS········································· ' Enable ADC
    · SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%1101000]·· '·I·THINK this is·the·Command Bytes·but not sure if this what I am controlling
    · SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result0\12]·· ' Read ADC
    · HIGH CS········································ ' Disable ADC
    · 'mVolts0 =· result0 */ Cnts2Mv·················· ' Convert To Millivolts



    · DEBUG HOME, CRSRXY, 11, 0, DEC result0, CLREOL, ' Displays voltages & digital value
    ············· CRSRXY, 11, 1, DEC mVolts0 DIG 3,·· ' for both channels
    ······················ ".", DEC3 mVolts0

    · PAUSE 100
    LOOP·

    The result0·value dose go up and down but only from 0 to·1.4 volts how ever the value flash every second
    and the value dose not start 0000 it starts like 0050 and go to 0999

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

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 1/31/2010 6:53:48 AM GMT
  • David CarrierDavid Carrier Posts: 294
    edited 2010-02-02 00:34
    Sam,
    The command byte tells the MAX149x which register you are accessing and whether you are reading or writing. To use the MAX149x, send a command with the R/!W bit set to 1 for a read, 0 for a write, and the register address in RS4..RS0, then read or write the data. Here is an example to write the value %0000000001000001 to the Control Register, which has an address of %00001.

    SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11000010]
    SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%0000000001000001]

    The first line tells the MAX149x that you are writing data to address %00001, and the second line writes the data.
    To read from the peak register, at address %01010, use these commands:

    SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%10010100]
    SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]results\16]

    The first line tells the MAX149x that you are reading data from address %01010, and the second line reads the data.

    I don't have a MAX149x chip with me, so I cannot verify the above commands, but they should get you started in the right direction.

    — David Carrier
    Parallax Inc.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-02-02 00:41
    ····· smile.gif

    ·I want to Thank...>>> David Carrier <<<...in Tech Parallax Support for his help
    ·He help me Understand the Data Sheet for the MAX1497 Meter Chip

    Here is a Demo for this chip I hope that you can use this Demo Code· for this Chip


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

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 2/2/2010 2:34:37 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-02-02 02:38
    The Problem that·I was having with the data sheet was I know that I had to write to the· Control Register· to Bit 5 which set the Voltage Range to

    2.000 volt

    I had not seen any Demo code that had TWO ·SHIFTOUT DataIn, Clock, MSBFIRST line one right after the other I did not know that you could do that I have to say that today I learn something that I did not know

    Set_Volt_Range:

    · LOW CS··················································· ' Enable ADC
    · SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%10000010]············ ' Enable Write to Control Register
    · SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%0000000000100001]···· ' Enable bit ON ,RANGE = 2.0 Volts
    · HIGH CS·················································· ' Disable ADC

    · RETURN



    ·I had this part right but could not·SET the Voltage··Range and could read READ ADC Result Register· because of not being able to·Enable Write Command



    Meter:


    · LOW CS··················································· ' Enable ADC
    · SHIFTOUT DataIn, Clock, MSBFIRST, [noparse][[/noparse]%11010000]············ ' Enable READ ADC Result Register 1 (16 MSBs)
    · SHIFTIN DataOut, Clock, MSBPOST, [noparse][[/noparse]result\16]
    · HIGH cs·················································· ' Disable ADC
    · Volts = result / Cnts2Mv

    · DEBUG······ CRSRXY, 11, 0, DEC result, CLREOL,·········· ' Displays voltages & digital value
    ············· CRSRXY, 11, 1, DEC Volts DIG 3,············ '
    ······················ ".", DEC3 Volts

    RETURN


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

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 2/2/2010 2:50:25 AM GMT
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2011-12-23 15:27
    When I first did this project I only had the Basic Stamp but no LED Display and I did it on a small demo board

    Now I using a double sided board and now wiring up LED Display

    As I get more done on this project I will post update
Sign In or Register to comment.