Max5250 DAC - bit gluing
Tom_005
Posts: 7
I have a MAX5250 Low-Power, Quad, 10-Bit Voltage-Output DAC with Serial Interface. A nice article was done in Nuts and Volts Column #59, March 2000 by Lon Glazner:
A Digital-to-Analog Converter for All Seasons. This is where I drew I inspiration on how to achieve my goal. The article was written for the BS2 not the Prop.
My confusion is How do I paste together the 16 bit word?
I understand the first 4 bits contains the address and control; the next 10 bits are my value for voltage, and then 2 addition bits that don’t matter to my case.
I can send a word hard coded and the chip responds no problem.
But I can not figure out how to “glue” the bits together so I can change my voltage value programmaticaly.
Here is a non-programmatic example of what I am trying to achieve.
adct=%0011
Vdata= %0000011111
So=%00
Wordtosend=(adct)+(Vdata)+(So)
Any advice, or direction on where to look for a method on how to do this “bit gluing” would be appreciated,
Thanks
A Digital-to-Analog Converter for All Seasons. This is where I drew I inspiration on how to achieve my goal. The article was written for the BS2 not the Prop.
My confusion is How do I paste together the 16 bit word?
I understand the first 4 bits contains the address and control; the next 10 bits are my value for voltage, and then 2 addition bits that don’t matter to my case.
I can send a word hard coded and the chip responds no problem.
But I can not figure out how to “glue” the bits together so I can change my voltage value programmaticaly.
Here is a non-programmatic example of what I am trying to achieve.
adct=%0011
Vdata= %0000011111
So=%00
Wordtosend=(adct)+(Vdata)+(So)
Any advice, or direction on where to look for a method on how to do this “bit gluing” would be appreciated,
Thanks
Comments
If your wanting to do this for a Propeller, then this would work...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 11/26/2008 4:56:41 PM GMT