Nov 12, 2010 #1 A arun_9998 Banned Joined Aug 25, 2008 Messages 53 Helped 11 Reputation 22 Reaction score 10 Trophy points 1,288 Location india Activity points 0 how i convert 10 bit data to voltage if recived 10 bit data is 07CE vrf is 4.096:-(
Nov 19, 2010 #2 Y yadog Member level 1 Joined Mar 12, 2006 Messages 33 Helped 3 Reputation 6 Reaction score 3 Trophy points 1,288 Activity points 1,427 arun_9998 said: how i convert 10 bit data to voltage if recived 10 bit data is 07CE vrf is 4.096:-( Click to expand... it's a math problem. for example,the range for 10bit data is 0~3ff(hex), if ADC data 3ff equals to 4096(depends on your hardware definition), then you can calc that 1'b1=4096/(2^10)=4096/1024=4mV, that is, 10'h1 = 4mV,10'h2=2*4mV=8mV...10'h1024=1024*4mV=4096 so you can calc the voltage for "07CE"!
arun_9998 said: how i convert 10 bit data to voltage if recived 10 bit data is 07CE vrf is 4.096:-( Click to expand... it's a math problem. for example,the range for 10bit data is 0~3ff(hex), if ADC data 3ff equals to 4096(depends on your hardware definition), then you can calc that 1'b1=4096/(2^10)=4096/1024=4mV, that is, 10'h1 = 4mV,10'h2=2*4mV=8mV...10'h1024=1024*4mV=4096 so you can calc the voltage for "07CE"!
Nov 19, 2010 #3 keith1200rs Super Moderator Staff member Joined Oct 9, 2009 Messages 10,865 Helped 2,065 Reputation 4,130 Reaction score 1,596 Trophy points 1,403 Location Yorkshire, UK Activity points 57,270 7CE is more than 10 bits! Keith
Nov 19, 2010 #4 Y yadog Member level 1 Joined Mar 12, 2006 Messages 33 Helped 3 Reputation 6 Reaction score 3 Trophy points 1,288 Activity points 1,427 sorry,i didnot notice the number, maybe write mistake
Nov 19, 2010 #5 keith1200rs Super Moderator Staff member Joined Oct 9, 2009 Messages 10,865 Helped 2,065 Reputation 4,130 Reaction score 1,596 Trophy points 1,403 Location Yorkshire, UK Activity points 57,270 It could be a triping mistake as you say :wink: The other possibility is that the SPI is not configured correctly - MSB/LSB first etc. Keith.
It could be a triping mistake as you say :wink: The other possibility is that the SPI is not configured correctly - MSB/LSB first etc. Keith.
Nov 23, 2010 #6 A arun_9998 Banned Joined Aug 25, 2008 Messages 53 Helped 11 Reputation 22 Reaction score 10 Trophy points 1,288 Location india Activity points 0 can u post me c source code for spi thonks