max1236 with bs2?
Archiver
Posts: 46,084
Hi,
Has anyone done a routine to talk to a Max1236 ADC with a bs2?
I am stuck with bs2 as this is the only stamp family device that is
offered in an extended temperature range version and I want to use
this outside all year round.
The only document I have found so far that applies is the experiment
#39 from the stampworks manual. I am sure that I should be able to
adapt the code from this article almost directly but my old brain is
being a bit foggy and I don't want to reinvent the wheel if there is
some code out there for the asking.
Thanks and best regards,
BJH
Has anyone done a routine to talk to a Max1236 ADC with a bs2?
I am stuck with bs2 as this is the only stamp family device that is
offered in an extended temperature range version and I want to use
this outside all year round.
The only document I have found so far that applies is the experiment
#39 from the stampworks manual. I am sure that I should be able to
adapt the code from this article almost directly but my old brain is
being a bit foggy and I don't want to reinvent the wheel if there is
some code out there for the asking.
Thanks and best regards,
BJH
Comments
>
>Has anyone done a routine to talk to a Max1236 ADC with a bs2?
>
>I am stuck with bs2 as this is the only stamp family device that is
>offered in an extended temperature range version and I want to use
>this outside all year round.
>
>The only document I have found so far that applies is the experiment
>#39 from the stampworks manual. I am sure that I should be able to
>adapt the code from this article almost directly but my old brain is
>being a bit foggy and I don't want to reinvent the wheel if there is
>some code out there for the asking.
>
>Thanks and best regards,
>
>BJH
You will find that the other stamps usually do perform okay in low
temperatures, despite not being certified. You could test individual
units yourself in a deep freeze. mainly to be sure the clock
oscillator keeps running and that the chip wakes up from sleep.
Avoid condensation by careful attention to your packaging, and use
desiccants.
Check out the OWL2pe, on which all parts are rated for the industrial
temperature range, and it is based on the BS2pe-40 chip.
<http://www.owlogic.com/OWL2pepr.htm>.
It includes an ADC (TLC2543I). (disclaimer--that is my baby).
The I2C MAX1236 data sheet takes careful reading, for all the
options. It is easy on the BS2p and 'pe, though:
read_MAX1236:
' enter with channel number, ADch=0 to 3
' one single ended conversion, supply as reference
I2COUT sdap,$6a,[noparse][[/noparse]$80, ADch << 1 | $61]
I2CIN sdap,$6b,[noparse][[/noparse]result.Byte1, result,Byte0]
result,Nib3=0 ' knock down the 4 high bits
RETURN ' with result, 12 bits
-- best regards
Tracy Allen
electronically monitored ecosystems
http://www.emesystems.com
mailto:tracy@e...
temperatures, despite not being certified. You could test individual
units yourself in a deep freeze. "
That is not my experience with the small group I have tested. Here in
Canada, we don't need a deep freeze, we live in one.
I'd really like some max1236 bs2 code if its out there.
Thanks,
BJH