max1272 and spi
Sawmiller
Posts: 276
hi all,
tring to interface a max1272 to the prop... keep getting a 0 signal... the question i have is it is using a serial clock in its data sheet, and the timing diagram shows sclk continuing to run between data in and data out... do i need to use a seperate cog to run a sclk ? or what? i'm tring to redo the ds1620.spin to work with this ADC chip. been looking at the datasheet for several days , but a lot of it is greek to me
( and i'm not greek )
dan
tring to interface a max1272 to the prop... keep getting a 0 signal... the question i have is it is using a serial clock in its data sheet, and the timing diagram shows sclk continuing to run between data in and data out... do i need to use a seperate cog to run a sclk ? or what? i'm tring to redo the ds1620.spin to work with this ADC chip. been looking at the datasheet for several days , but a lot of it is greek to me
( and i'm not greek )
dan
Comments
I not qualified to spin a proppeller yet, but I have worked with the Max1270 a lot. It's very similar to the 1272 you have.(just a little faster and more fault tolerant). There stamp code on how to generate one conversion in the link under the stamp PLC( in the industrial section).http://www.parallax.com/detail.asp?product_id=30064
·However without the stamps Shiftin and shiftout commands they are a little touchy.
If you have a 1270 I could help you more as they generate a framesync pulse usefull in retrieving the output.(Plus with a continuous clock capacitance at the input is kept to a min making offset's less needed in some app's.
dan
but at least it responds to the linear transducer 0- 10v signal
but yes , it does work , if i pull the rod out to around 46" i get readings in the 3600 range, all the way in gives 0 or so, it looks linear, just unexceptable jitter... maybe its in the time of the sample..
dan
ps doing about 100 samples per sec... nowhere near straining the ADC i think, but i cant read them any faster anyways...( old eyes )
the 1270 pdf file didnt have it , but in N&V 105 they showed a capacitor from ref and refadj to ground...
did the ref to ground with a 10 uF and presto... no jitter.. heres the latest spin bambino
prop to 1270 to 0 - 10 VDC linear transducer
measures 0 to 48 inches to within a 32nd, good enuf for the sawmill
now to do the motor controls and settings
dan
avg = 0
main:
avg = ((avg+ADCreading)/2)
If timer then print (avg + 1)
goto main
Glad to hear you got it going.