1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Reading temps with a pic.

Discussion in 'Software' started by hcker2000, 17 Jul 2005.

  1. hcker2000

    hcker2000 What's a Dremel?

    Joined:
    21 Oct 2004
    Posts:
    109
    Likes Received:
    0
    Alright I think I have every thing I need to start this project. I just need some technical help. Basicly I want to have a pic 16F88 read as many ds1820 temp sensors as I can.

    If some one can help me with the timing and what not I would realy appreciate it.
     
  2. nick01

    nick01 What's a Dremel?

    Joined:
    6 Nov 2004
    Posts:
    598
    Likes Received:
    0
    Unless you have masochistic tendencies don't try to do the timing yourself in SW. Get a chip that does it for you. Since you apparently want many temp sensors look at the I2C to 8 channel interface DS2482-800
    http://pdfserv.maxim-ic.com/en/ds/DS2482-800-DS2482S-800.pdf . The chip has 3 address pins, so you can have 8 chips on a single I2C bus. Each provides 8 1-wire master channels. Each channel supports at least 50 temp sensors (assuming separate power line). Total number of sensors: 8x8x50=3200. Enough?
     
  3. hcker2000

    hcker2000 What's a Dremel?

    Joined:
    21 Oct 2004
    Posts:
    109
    Likes Received:
    0
    Yea 3200 should be enough. Actualy 32 would be way more than enough. Could you or some one post a layout for how I would connect the chip you linked to and my pic16f88?

    Oh and any help with the software to interface them would help as well. I'v never done i2c stuff before.
     
  4. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
  5. hcker2000

    hcker2000 What's a Dremel?

    Joined:
    21 Oct 2004
    Posts:
    109
    Likes Received:
    0
    Alright I got to ask what MASM is? Could 32 be suported by software timing? If so would you help me out?
     
  6. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    masm = microchip's macro assembly language.

    www.microchip.com has lots of how-to's and other such usefull stuff on getting to know this language (its straight forward enough). You can easily get 32 on one PIC, and whack it down the USART to the PC's rs-232 port say. This wouldnt be a problem.

    but before you try messing with such things you'd better learn howto PIC. play with LEDs buttons and the like.
     
  7. hcker2000

    hcker2000 What's a Dremel?

    Joined:
    21 Oct 2004
    Posts:
    109
    Likes Received:
    0
    Well I got buttons and such down alright and leds and some simple pwm for servo's but this one is throwing me for a little more of a loop. I guess I need to read up on them. Any idea how many temps I could store on the pic16f88 before all the memory was used up?
     
  8. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    well you can be *naughty* and use the program memory to store it.

    the f88 can write to its own program memory, this way you can log values there.

    I'm assuming you know how to use a 'data table' (if not, search microchip website), the same principle can be done in code very easily, you only get 8bit from the much larger instruction word, its so easy to read when you do that! (and writing is simplish too).

    But if you really want plenty of space, the best thing to do is to put an external EEPROM chip on, using I2C is easy, and you can buy very low cost large (0.5mbit) DIL chips very easily.
     
  9. hcker2000

    hcker2000 What's a Dremel?

    Joined:
    21 Oct 2004
    Posts:
    109
    Likes Received:
    0
    Well I just wondered for another project I might want to do. For just reading the temp I dont need to realy store the data to long as it will be sent to the pc via serial port.
     

Share This Page