Conversion of bytes to word


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by selbstdual View Post
    No. I want to see a value between 0 and 65536.
    Not possible Im afraid.

    Although having declared Wvalue as a Word and read the upper and lower bytes back into it as per Mister_E's example, you should find that Wvalue contains a value between 0 and 65535.

    You can output this on a display with

    LCDout DEC Wvalue
    LCDout HEX Wvalue

    or any of the other many ways that PBP can format numbers.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    In short:

    -let pic collect data, write to eeprom
    -put pic in programmer
    -read pic's eeprom
    -shows something like

    2100: E0 02 1E 04 74 04 C1 05 à...t.Á.
    2108: FC 06 5D 06 C5 08 0F 08 ü.].Å...
    2110: E9 07 95 09 76 0A E1 09 é.•.v.á.
    ....

    -means: E0 02 is one pair, 1E 04 is the next one and so on
    -want to see a number between 0 and 65K instead of pairs like "E0 02".

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  4. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  5. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15:23

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