04-06-2011 04:00 PM
Hi,
I would like write two bytes of information to write visa. Two bytes consisting with 5 bits as signed (exponent) and remaining 11 bits are mantissa. I have done some coding but i need extend that to two bytes. you can find attched vi. At last i have to add those 5 bit and 11 bit to a two byte value. example, 3.3 is written input and output should be ---------> 1100001101001101----> here first fivets represents -8(always signed) and next 11 bits represents(845).
One more doubt, Please say in one sentense. what is difference between 4.x typecast and normal type case. I read the help information and not understand any thing.
04-06-2011 04:08 PM
04-06-2011 04:18 PM
yes, though its out of site and i have tried some thing. No one helped there, So here i posted for help. Please excuse me if I done any mistake and help me.
04-06-2011 04:48 PM
i haven't get the real binary value for 3.3v as i said before. i don't know where the error is? please some one help me.
04-07-2011 01:55 PM
04-07-2011 02:40 PM
Thank you for your reply.
I am just communicating with SMPS and it understand only in that format. I am bit lag in adding those 5bits with reaming 11 bits. And also the 11 bits I got is wrong and you can see in before scraps the output binary value. I have used 4.x data conversation and still getting wrong bits.
I really don't know when to use 4.x data and not. Can you explain me in simple way with straight sentence. Please help me.
04-07-2011 02:43 PM
04-07-2011 02:45 PM
ok you can see in http://pmbus.org/docs/Using_The_PMBus_20051012.pdf exactly 77 slide.
04-07-2011 03:14 PM
Thank you , I got a solution and i will move forward with that. I will ask later for furthur doubts.
04-07-2011 03:26 PM
Ok, now I understand what you mean.
So you need a 16 bit integer to be built out of 5 and 11 bits and send it over visa.
The 16 bit integer can be converted into an array of two U8 (bytes) by split number followed by built array.If necessary you can swap the byte positions in the array,
This array can be converted into a string by convert to string.
see the snippet