Up to date driver for MAX1202 A/D chip
Rsadeika
Posts: 3,837
Does anybody have an updated driver for the MAX1202 chip? Since I am destroying my electronics stuff (Activity Board) with my latest experiments, I am going a cheaper route, individual parts. I dug out my old Propeller Platform Board and I found a MAX1202 chip. I will breadboard the MAX1202 and if something goes wrong, it will cost me less than $10.00 which include a Propeller chip, I think.
I would prefer a C driver, this is a big stretch, but I would be very happy with Spin driver. I did find a driver in the OBEX, but it relies on a BS2 object, the last time I worked with a BS2 was probably 10 or 15 years ago, not sure if I want to go backwards. Hopefully somebody has something that is the latest.
Thanks
Ray
I would prefer a C driver, this is a big stretch, but I would be very happy with Spin driver. I did find a driver in the OBEX, but it relies on a BS2 object, the last time I worked with a BS2 was probably 10 or 15 years ago, not sure if I want to go backwards. Hopefully somebody has something that is the latest.
Thanks
Ray
Comments
For example, the call to
just does this in SPIN
You can get rid of the BS2 object, and just use to SPIN code for the Shiftout.
Ray
Spin - Max1202
5 - 18
3 - 16
Not sure about the rest of them, if somebody could enlighten me, would be appreciated.
Ray
ClkAdc = 11 > 19 ' A/D clock (Change These Values/Pins As Needed)
CsAdc = 5 > 18 ' Chip Select for ADC
AoutAdc = 13 > 17 ' A/D Data sent to the ADC
AinAdc = 12 > 15 ' A/D Data received from the ADC
Sstrb = 3 > 16 ' SSTRB signal for max 1202
ready = 16 > ?? ' Cog ready signal (pin to read for ready state)
?? - Not sure where this connects. Could be the SHDN, it is the only control signal not accounted for, but I do not have time to hunt through the code to find it.
Pin 14 is the low voltage power input and should be connected to 3.3V if you want to connect the ADC pins directly to the propeller pins. If you connect +5V here you will need protection resistors for propeller input pins.
You can download the data sheet here if you do not have it already. http://www.maximintegrated.com/en/products/analog/data-converters/analog-to-digital-converters/MAX1202.html/tb_tab2
So now I have two choices, use my PropBOE board or use my C3 board, which one is expendable? The PropBOE has some code for doing voltages, but the code would need to be changed to suit my purposes, this is Spin code, now I am used to working with C. I believe the same thing is true with the C3, would have to make code changes to make it work for me.
Ray