helooo........


Closed Thread
Results 1 to 8 of 8

Thread: helooo........

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Posts
    72


    Did you find this post helpful? Yes | No

    Default you are welcome

    take this elements in your code

    Code:
    number 	var 	word 	' a word sized variable with 2 bytes
    
    
    	number = 350	' give them the max value for testing
    
    
    	serout PORTA.3,t2400,[" the number are : ", number.byte0, number.byte1,13,11]
    you receive now two values : 94 and 1. this two must be added

    byte0 and byte1 has both a range from 0 to 255 (1byte = 8bit). but byte0 is the lowbyte and means really 0 to 255, but byte1 means how many times the value of 256. 256 is the value which is coming after 255 when byte0 is full.

    some examples.

    number = 0 : byte0 = 0, byte1 = 0 ' the minimum
    number = 1 : byte0 = 1, byte1 = 0
    number = 199 : byte0 = 199, byte1 = 0
    number = 255 : byte0 = 255, byte1 = 0
    number = 256 : byte0 = 0, byte1 = 1
    number = 266 : byte0 = 10, byte1 = 1
    number = 65536 : byte0 = 255, byte1 = 255 ' the maximum
    i know it's only microcontrolling, but i like it!

  2. #2
    Join Date
    Feb 2006
    Posts
    14


    Did you find this post helpful? Yes | No

    Cool thank a lot....

    to mischi
    thank you for helping me..
    willing to help me to understand..

    may god bless you...

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts