bytes to longs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bytes to longs

792 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Fri Sep 30 15:02:07 MST 2011
Hi, there, it is me again.

At work, the guys have put our lunch money together to see who can write the most portable code that can build an unsigned long type from unsigned char types.

I only had $5 to put down. No, it is not a lot but that was all I had. and I can not afford to lose it so please help me.

The winner will get back about $75 dollars and that is one week's grocery money for me.

Please post your best ideas so that I can win.

Thank you very much.
0 Kudos
18 Replies

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Fri Nov 04 00:46:48 MST 2011

Quote: rmteo
Perhaps get fdan00 to assist?



NFW! He disrespects me.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Fri Oct 21 14:04:03 MST 2011
Great news.

I got my first 32-bit embedded job: my buddy managed to get me a piece of the assignment I talked about last time. They have agreed to let me write just the PID piece of the code, for a fraction of the package that I was thinking.

Good bye, my burger-flipper friends.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Mon Oct 10 18:21:40 MST 2011
Perhaps get fdan00 to assist?
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Mon Oct 10 18:02:05 MST 2011

Quote: dhenry
It is more and more difficult to get customers to fund my learning, for sure.



Speaking of the devil: a buddy of mine's employer is looking to develop a customized process management system: up to 64 channels of PID control, all independent of each other, TFT LCD display with capacitive touch sensing, RS485 uploading, background data logging, and BT transmission. They are looking to outsource the coding and my buddy thinks he can get me into this. A $30K job, according to him, all done with 32-bit processors.

Goodbye, my 1991 Taurus station wagon. Hello, something more fashionable, like a Prius, maybe a used one?.

This will be my first 32-bit job and first embedded job in a long while. I am excited about it because it is my ticket back from hell.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Sun Oct 09 07:42:13 MST 2011

Quote: Zero
So after 1 week a new NXP trainee has (1 year/52)*28000 = 538 years of experience :confused:



That may be the math in the 32-bit land - I am not as up to speed about it as you are.

In the 8-bit land where I am more comfortable, you may have 1 week of experience assuming that your learning was accumulative, or you may have 5x of 1 day experience assuming that your learning was not accumulative and you start from the same spot every day.

How you would have gone from 1 week to 538 years is a little beyond my comprehension. Perhaps with the aid of a time machine?
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Sat Oct 08 07:41:30 MST 2011
Public Profile for dhenry
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Oct 08 07:30:41 MST 2011
That's the land of opportunity :)

So after 1 week a new NXP trainee has (1 year/52)*28000 = 538 years of experience :confused:

Wow, that's about 20 times more than my few years :eek:

Didn't know how smart this guys are :)
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Sat Oct 08 03:07:38 MST 2011

Quote: rmteo
firmware developer with 20+ years of specialization



That is 20x of 1-yr experience.

It is more and more difficult to get customers to fund my learning, for sure.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Tue Oct 04 23:24:34 MST 2011

Quote: dhenry
I use my spare time to earn 2nd income to support my family. Weekends are when I have some free time.



My experience is mostly in the 8-bit world. 32-bit world seems so difficult for me.



No, sir. So your help is greatly appreciated.



Can you be more specific, OXO? please?



http://en.wikipedia.org/wiki/Union_(computer_science)

But, as I said it's not portable.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Oct 04 16:41:37 MST 2011

Quote: oxo
and you can't figure this out yourself??


firmware developer with 20+ years of specialization  
Quote:
c  & assembly on pic, 8051, msp430, arm, powerpc, microblaze, rabbit,  z80, 68hcxx, 680x0, 80x86, i960, and 29000 platforms.  Rtos kernels.   Embedded linux.  Wireless comms and rfid.

0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhenry on Tue Oct 04 15:26:04 MST 2011

Quote:
I think he is following the tradition of writing something funny or interesting weekend in the forum.



I use my spare time to earn 2nd income to support my family. Weekends are when I have some free time.


Quote:
that's really experienced



My experience is mostly in the 8-bit world. 32-bit world seems so difficult for me.


Quote:
And you can't figure this out yourself??



No, sir. So your help is greatly appreciated.


Quote:
It's easy to do with a union



Can you be more specific, OXO? please?
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Sat Oct 01 18:04:46 MST 2011

Quote: Wenzu
But......isn't April's fool gone by some months already ???


I think he is following the tradition of writing something funny or interesting weekend in the forum.

Oh yes, the weekends are back!!!
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wenzu on Sat Oct 01 13:56:15 MST 2011
But......isn't April's fool gone by some months already ???
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Oct 01 09:48:40 MST 2011

Quote:

...to see who can write the...

The task seems to find someone who is doing it, that's really experienced :)
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Sat Oct 01 05:55:50 MST 2011

Quote: dhenry
FIRMWARE DEVELOPER WITH 20+ YEARS OF SPECIALIZATION



And you can't figure this out yourself??
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbm on Sat Oct 01 02:23:53 MST 2011
I guess one cent goes for writing the code and $74.99 for understanding what does it mean to "build an unsigned long type from unsigned char types".
:confused::D
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Sat Oct 01 00:46:58 MST 2011
It's easy to do with a union of your 4 bytes and the 32 bit long, but that isn't portable if the long has a different byte order.

I think you'll be doing it by shifting.
0 Kudos

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Fri Sep 30 23:45:11 MST 2011
Why would typecasting a variable be worth $75?
Am I missing something here?
0 Kudos