Discussion in "8051 Discussion Forum" started by    romel_emperado    Nov 4, 2010.
Sun Jan 30 2011, 09:55 pm
i found the answer.. is it correct? i think it is correct..

u8 --> 2^8 - 1 = 255
s8 --> 2^7 - 1 = 127
u16 --> 2^16 - 1 = 65535
s16 --> 2^15 - 1 = 32767
u32 --> 2^32 - 1 = 4294967295
s32 --> 2^31 - 1 = 2147483647

Sun Jan 30 2011, 11:04 pm
yes romel ur right
 romel_emperado like this.
Sun Jan 30 2011, 11:12 pm
thanks for confirming majoka..
Fri Feb 04 2011, 07:02 pm
hi guys..

check this block of code if it is logically correct? hehe :

main()
{
  P1=0xFF;
  P2=0x00;
 
  while(1)
   {
     P2=P1;
   }
}



Im on mobile I cannot check if it is working... hehe I just thinking for something weird .. ehehe
Fri Feb 04 2011, 09:54 pm
If you want code that locks up and does nothing it's fine
Fri Feb 04 2011, 10:32 pm
how about if the user input something ? Does it also change the output?

By the way that code is from someone. I dont know why he wants to use that maybe he has a purpose
Sat Feb 05 2011, 04:50 pm
probably he is just moving data from one port to other. but i dont find the use of it. coz he can just connect input o/p lines together without need of a controller
Sat Feb 05 2011, 06:55 pm


probably he is just moving data from one port to other. but i dont find the use of it. coz he can just connect input o/p lines together without need of a controller

Ajay Bhargav




yes, ajay that's what I said to him..

according to him he is just using the controller for decoration.

he is from different school and that is his project this sem ... lol hehe


[ Edited Sat Feb 05 2011, 10:04 pm ]
Sun Feb 06 2011, 04:29 pm
haha.. wow! i want to meet his professors
Sun Feb 06 2011, 06:44 pm


haha.. wow! i want to meet his professors

Ajay Bhargav




me too... hehe..

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Martinorics
Sun May 12 2024, 02:03 am
Nigarcarm
Sat May 11 2024, 11:22 pm
JefferyBrazy
Sat May 11 2024, 02:33 pm
autogCar
Sat May 11 2024, 03:38 am
Dulcehet
Fri May 10 2024, 04:22 pm
ElvasKl
Fri May 10 2024, 04:54 am
RonaldNak
Thu May 09 2024, 07:45 pm
Jamescon
Thu May 09 2024, 12:52 pm