Searching \ for '[OT] Can this be done in excel?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=can+done+excel
Search entire site for: 'Can this be done in excel?'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Can this be done in excel?'
2005\05\16@180630 by alan smith

picon face
Gathering data...by hand right now at least....a data
packet from the PIC, representing the 10bit AD values.
Would be nice for something to dump right into
excel...


So ive got it left justified, high byte being the
upper 8 bits and low byte upper two bits being the
lowest two bits...that made sense right?

Say we have the value 0x79C0, I want to have excel
strip off the lower 6 bits and convert to decimal.
And so I get the final result of 487.  Is there a
simple way in excel to do this?


               
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

2005\05\16@181827 by wayne

flavicon
face
Hex2dec.... I think you need the maths library pluging thingy

Wayne Allen
Director E-Stim Systems
http://www.e-stim.co.uk
spam_OUTwayneTakeThisOuTspame-stim.co.uk


{Original Message removed}

2005\05\16@183705 by Mauricio Jancic

flavicon
face
You have to send each value from the pic "like" this:

[assuming your data on the pic is right justified]

Send_232( hex_to_ascii( upper_byte & 0x03 ) );        // send upper 2 bits MSB
Send_232( hex_to_ascii(   lower_byte>>4   ) );        // Send mid 4 bits
Send_232( hex_to_ascii( lower_byte & 0x0F ) );        // send lower 4 bits LSB

Send_232( /n );        // new line
Send_232( /r );        // return of carriage (cursor actually)

So you'll end up having something like

125
245
2a4
2b6
Etc
Etc
Etc

Hex to accii must conver a 0~15 value to its corresponding ASCCII (48, 49...
Etc)

Then, capture that with any terminal software and import to excell. It will
open up as a column with data.

The you must use a built in function called HEX2DEC( "source" ) I don't
recall if it has more params.

If excell doesn't recognize the function you might have to add it. Go to
TOOLS> ADD-Ins
Add "solver.." and "analisys..."

Best regards,


Mauricio Jancic
Janso Desarrollos - Microchip Consultants Program Member
.....infoKILLspamspam@spam@janso.com.ar
http://www.janso.com.ar
(54) 11 - 4542 - 3519


> {Original Message removed}

2005\05\16@185922 by PicDude

flavicon
face
On Monday 16 May 2005 05:06 pm, alan smith scribbled:
> ...
> Say we have the value 0x79C0, I want to have excel
> strip off the lower 6 bits and convert to decimal.
> And so I get the final result of 487.  Is there a
> simple way in excel to do this?


Don't have Excel installed anywhere currently, so from memory, and subject to
typos, you should be able to use ...
       = HEX2DEC( MID(A1,3,LEN(A1)-2) ) / 64
where A1 is the cell containing the text "0x79C0".

The Mid() function will find the length of the hex text string and return
everything but the first 2 chars (the "0x").  64 is the 6 bits on the right
(2^6).

Cheers,
-Neil.


2005\05\16@205100 by James Newtons Massmind
face picon face

> > ...
> > Say we have the value 0x79C0, I want to have excel strip
> off the lower
> > 6 bits and convert to decimal.
> > And so I get the final result of 487.  Is there a simple
> way in excel
> > to do this?
>
>
> Don't have Excel installed anywhere currently, so from
> memory, and subject to typos, you should be able to use ...
>        = HEX2DEC( MID(A1,3,LEN(A1)-2) ) / 64
> where A1 is the cell containing the text "0x79C0".
>
> The Mid() function will find the length of the hex text
> string and return everything but the first 2 chars (the
> "0x").  64 is the 6 bits on the right (2^6).


You could also do a lookup table with one column of "text"
0,1,2,3...A,B,C,D,E,F and the next column of numbers,
0,1,2,3...10,11,12,13,14,15 and then make your own version of Hex2Dec. If I
remember the command is actually LOOKUP(src,dest,value) where src is the
text column, dest is the number column and value is the thing to look up. In
this case, it would be Niels MID... formula

---
James.


2005\05\17@072144 by Gerhard Fiedler

picon face
alan smith wrote:

> So ive got it left justified, high byte being the upper 8 bits and low
> byte upper two bits being the lowest two bits...that made sense right?
>
> Say we have the value 0x79C0, I want to have excel strip off the lower 6
> bits and convert to decimal. And so I get the final result of 487.  Is
> there a simple way in excel to do this?

This is not quite clear, to me at least. All the others seemed to think
that you are sending the /string/ "0x79C0" to Excel (or typing this
string). Is that what you are doing?

How and in what form do you put the data into Excel?

Gerhard

2005\05\17@090340 by alan smith

picon face

>
> This is not quite clear, to me at least. All the
> others seemed to think
> that you are sending the /string/ "0x79C0" to Excel
> (or typing this
> string). Is that what you are doing?
>
> How and in what form do you put the data into Excel?

HEX2DEC will probably work...just need to see if I
have that loaded or if it works.

For now, I am entering the data by hand.  Eventually I
do want it to be automagik, but its a matter of just
confirming data that I am getting.

Thanks for those who replied, I appreciate it very much.


               
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...