Write Onewire data toa I2C memory / read ASCI


Closed Thread
Results 1 to 40 of 68

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Code:
    [QUOTE=languer;64516]Eugeniu, below are some ideas on how to modify your code with the help of an LCD.
    Thank you for your try to halp me , But remember I do not use a LCD display !


    P.S. When posting use the "code" tags to wrap the code and display it nice and tidy. Also use the "quote" tags when quoting somebody; again it displays nice and tidy
    I do not use it , becose I do not know it . Thanks !

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    Thank you for your try to halp me , But remember I do not use a LCD display !
    But you did say earlier that you do HAVE an LCD, and if you know how to use it, and can make it work, then why not use it to help you find your problem.
    And with those code snippets above, you should be able to pull out of them the chunks of code you may and/or may not need to get your project working, whether it be displayed on an LCD (which would be very handy) or LED matrix or on punch cards.

    I do not use it , becose I do not know it . Thanks !
    Which is why I put that link in post #57 above. That way you can learn how to use those 'tags'.
    Last edited by skimask; - 21st October 2008 at 18:55.

  3. #3
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    But you did say earlier that you do HAVE an LCD, and if you know how to use it, and can make it work, then why not use it to help you find your problem


    I have try , be sure . I use a test program on LCD , bat there it work , on LEDS display not . For LCD are very usefully DEC ; HEX;...commands . I'try to change the kind of writing text ,(in my programme) ,to use " SELECT CASE " for binary or hexa byte .

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    I have try , be sure . I use a test program on LCD , bat there it work , on LEDS display not . For LCD are very usefully DEC ; HEX;...commands . I'try to change the kind of writing text ,(in my programme) ,to use " SELECT CASE " for binary or hexa byte .
    So are you saying that everything works as you want it to work if you are using the LCD?
    There is no need to rewrite the entire program!!! Your answers have been practically handed to you in previous posts, with example provided. The only thing left to do is to write the code for you.

  5. #5
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    So are you saying that everything works as you want it to work if you are using the LCD?
    Yes ! But not on this plate . On this plate (Leds display )I use a PIC 16F876 and I have 3 free pins only on it . I can not install a LCD. Will be very usefully . I am not sure ( in my mind )every time that sensor work . In future I try to change PIC with 16F877 ,to can have together Leds and LCD display for ilk sensor .

    There is no need to rewrite the entire program!!! Your answers have been practically handed to you in previous posts, with example provided. The only thing left to do is to write the code for you
    I am not sure that I understand what you say !

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eugeniu View Post
    Yes ! But not on this plate .
    Ok, as long as the code works in one place... I understand you don't have enough pins to run the LCD on this particular board and need to use the matrix'd LEDs...

    I am not sure that I understand what you say !
    Meaning that the posts referring to the use of the DIG function with bytes/words/whatever are most likely what you need to pull the individual digits out of the bytes/words/whatever to send to the LEDs...

  7. #7
    Join Date
    Nov 2007
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Meaning that the posts referring to the use of the DIG function with bytes/words/whatever are most likely what you need to pull the individual digits out of the bytes/words/whatever to send to the LEDs...
    I have made a few changes :

    In the first time write a few blanks (16)
    I2cwrite I2CDAT , I2CCLK , $A0,ADR,[ ]

    I have insert this lines
    SELECT CASE CARACTER
    ................................................
    CASE %0000000 : SIR_NO=137 ;0
    CASE %0000001 : SIR_NO=140 ;1
    CASE %0000010 : SIR_NO=145 ;2
    CASE %0000011 : SIR_NO=150 ;3
    CASE %0000100 : SIR_NO=155 ;4
    CASE %0000101 : SIR_NO=160 ;5
    CASE %0000110 : SIR_NO=165 ;6
    CASE %0000111 : SIR_NO=170 ;7
    CASE %0001000 : SIR_NO=175 ;8
    CASE %0001001 : SIR_NO=180 ;9
    ..................................................

    TEMP1 VAR BYTE
    TEMP2 VAR BYTE

    temp1 = temperature.LOWBYTE /2
    temp2 = (100- (100/16)*(count_remain))

    (This FORMULAS work very well with LCD display )

    and writing
    adr = 4
    i2cwrite I2CDAT, I2CCLK, $A0, adr,[(temp1)dig 1,(temp1)dig 0,",",temp2 dig 1,temp2 dig 0 ]
    pause 15

    Now I read on LEDS display

    for begining 2000404,0502 ( this ciphers from the right side are more variables)
    when I put my fingers on sensor all nubers are modify . More right side
    and last ciphra from left side :

    200050x,0x0x
    200060x,0x0x
    ..................
    200090x,0x0x
    200010x,0x0x

    " 2 " not change in "3" . And not 25,xx or 26,xx ......and so on

    GIVE ME AN OTHERS IDEAS !

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