I would give the PBP demo a try if I were you
http://melabs.com/pbpdemo.htm
I would give the PBP demo a try if I were you
http://melabs.com/pbpdemo.htm
Dave
Always wear safety glasses while programming.
thanks for the compiler,but when i bought the pic kit 2 it comes with that compiler.ill try to utilize that.how to handle the timing feature on the adc-LTC2400,do you have any idea?if have then please give me a sample code to get the data from the adc in picbasic.i connected the ltc2400 in 3 wire communication mode.thanks a lot for spending your valuable time with me.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
The ****IN command in PBP will handle the timing for you when the correct MODE is selected.
The best I can do at the moment because I have not used the ADC you have is to have you look at the sample I linked you to and compare that to the data sheet of your ADC.
But I have to ask... Why use the external when the 690 has an ADC built in?
Dave
Always wear safety glasses while programming.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
Hi,
I'm sure you have your reason but can you explain why you need 24bits?
I mean, 100bar across 24bits gives you a resolution of 0.000006bar. Does a transducer capable of measuring 100bar really resolve to that kind of precision?
If you already have your 4-20mA converted to 0-5V (and not 1-5V) you'd get ~0.1bar resolution with the built in 10bit ADC. You could do some oversampling to "emulate" a 12bit ADC giving you ~0.025bar resolution.
Just some ideas.
/Henrik.
THANKS FOR YOUR SUGGESTION MR.HENRIK
Actually as you said the 10 bit adc gives a 0.1 resolution on 0~100bar range which is as equal to a "primary master" and thats fine,but i want to use the 24bit adc because i want learn how to communicate a external adc through "spi" to the pic and particularly the 24bit adc is because thats the one i have in my hand to give a try.can you please explain me about the "oversampling to "emulate" a 12bit ADC to give a ~0.025bar resolution"
THANKS A LOT FOR SPENDING YOUR VALUABLE TIME FOR ME.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
Hi,
I'd say learning qualifies as a (very) valid reason ;-) By all means try using the 24bit ADC but perhaps you should start with interfacing to something "easier" like a EEPROM to begin with so you learn the basics about how the SPI interface works. I haven't looked at the datasheet for your ADC though, perhaps it's pretty straight forward.
As for the oversampling, all you really do is take a bunch of readings and then average them. If you take 16 readings with your 10bits ADC, add them all together and divide the result by 4 you'll get a value ranging from 0-4096.
You can read a bit more about here. Note, you can not use that code with Oshonsoft, the theory behind it obviously applies to any language/compiler though.
Good luck!
/Henrik.
Bookmarks