Write Onewire data toa I2C memory / read ASCI


Closed Thread
Results 1 to 40 of 68

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    Briefly : Tell me how can write in a I2C memory result from this :
    I too am having a bit of difficulty in understanding what you wish to achieve...

    adr = xx
    i2cwrite I2CDAT, I2CCLK, $A0, adr,[temperature]
    pause 5

    ******************

    and how can read from memory something xx,xx (ASCI CODE )
    Is 'temperature' a byte or a word value?
    Are you wanting to get a fractional value out of the eeprom itself?
    Have you put a fractional value into that location of the eeprom?

    I2CREAD I2CDAT , I2CCLK , $A0 , adr , [ temp_read ] - would be a command line for starters...

  2. #2
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    I too am having a bit of difficulty in understanding what you wish to achieve...
    " i2cwrite I2CDAT, I2CCLK, $A0, adr,[I do not know what to write here ]".......

    and , to can read 2 digits and 2 decimals for example
    25,55 grade C

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    " i2cwrite I2CDAT, I2CCLK, $A0, adr,[I do not know what to write here ]".......

    and , to can read 2 digits and 2 decimals for example
    25,55 grade C
    If you read the PBP manual, you'll find commands in the LCD, I2Cxxxx, SERIN/SEROUT, HSERIN/HSEROUT, and various other sections that will show you have these various commands handle digits, decimals (which PBP does NOT natively handle), numeric characters, ASCII values, etc.etc.etc. DEC DIG HEX BIN, and all sorts of other good information in there...

  4. #4
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    I put all program .
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    If you read the PBP manual, you'll find commands in the LCD, I2Cxxxx, SERIN/SEROUT, HSERIN/HSEROUT, and various other sections that will show you have these various commands handle digits, decimals (which PBP does NOT natively handle), numeric characters, ASCII values, etc.etc.etc. DEC DIG HEX BIN, and all sorts of other good information in there...
    I know this , and I have used for LCD display , for serin/serout and work , but now I do not know how can use this commands for I2CXXXX. When I use one of this do not accept by MicroCode Studio .

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    I know this , and I have used for LCD display , for serin/serout and work , but now I do not know how can use this commands for I2CXXXX. When I use one of this do not accept by MicroCode Studio .
    You don't have to store them in eeprom in anyway out of the ordinary. If you can display it using those modifiers, then store the data as the raw data. Then recover it as raw data and display it using those modifiers again. You don't have to do anything special to store it.

  7. #7
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    You don't have to store them in eeprom in anyway out of the ordinary. If you can display it using those modifiers, then store the data as the raw data. Then recover it as raw data and display it using those modifiers again. You don't have to do anything special to store it.
    Can you give me a in context example ? Please !

    Thank you !

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    Can you give me a in context example ? Please !
    Just exactly what you had...
    i2cwrite I2CDAT, I2CCLK, $A0, adr,[Byte_integer,Byte_decimal]
    Then read them back the same way and display them on the LCD seperately with a decimal point in between them.

  9. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Split value into two separate bytes

    i2cwrite I2CDAT, I2CCLK, $A0, adr,[Byte_integer,Byte_decimal]

    Al.

  10. #10
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Split value into two separate bytes

    i2cwrite I2CDAT, I2CCLK, $A0, adr,[Byte_integer,Byte_decimal]

    Al.
    You can see in program that I wish to do this . to write at adr. 71 2 digits , and at adr 74, other 2 ( decimals ) But how ?

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. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  3. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  4. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 00:22
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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