i2c and byte or word


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    26

    Post i2c and byte or word

    Hello,

    a] To write a value(Say integer 12,000 to 30,000) in 24C04 using I2cwrite should I use
    a vriable declared as byte or word ?

    Code:
    i2c_read_value var word 'Is it the right one ?
    I guess word. (becasue 12000 will be more than 8 bits in binary ?) What is the right one.


    b] And to store a value of integer 12000 in a vairable do I declare it like this ?
    Code:
    delay_value var word 'Most likely byte is incorrect


    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    You are correct on both accounts.

    delay_value var word
    <br>
    DT

  3. #3
    Join Date
    Apr 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Thanks

    Quote Originally Posted by Darrel Taylor View Post
    You are correct on both accounts.

    delay_value var word
    <br>
    Thanks .

  4. #4
    Join Date
    Apr 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Thumbs up Bits,Bytes, Words and Languages:-)


Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. Help with Circuit
    By Art in forum General
    Replies: 14
    Last Post: - 23rd December 2009, 13:21
  3. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  4. How to set sequence of interrupt for PIC
    By chai98a in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st June 2008, 11:17
  5. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33

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