LCD 20X4 connect with DS1820


Closed Thread
Results 1 to 7 of 7
  1. #1
    jojokatada's Avatar
    jojokatada Guest

    Default LCD 20X4 connect with DS1820

    'display message on the 4 X 20 character LCD using pic16f84a and DS1820

    DEFINE LCD_DREG PORTA 'LCD data port
    DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
    DEFINE LCD_RSREG PORTA 'LCD register select port
    DEFINE LCD_RSBIT 4 'LCD register select bit
    DEFINE LCD_EREG PORTB 'LCD enable port
    DEFINE LCD_EBIT 3 'LCD enable bit
    DEFINE LCD_BITS 4 'LCD bus size 4 or 8
    DEFINE LCD_LINES 4 'Number lines on LCD
    DEFINE LCD_COMMANDUS 2000 'Command delay time in us
    DEFINE LCD_DATAUS 50 'Data delay time

    symbol DQ = PORTB.4
    temp var word
    cou var byte
    cou1 var byte
    pause 100
    main:
    owout DQ, 1,[$CC, $44]
    owin DQ, 4,[cou]
    if cou = 0 then
    owout DQ, 1, [$cc, $BE]
    owin DQ, 0,[temp.lowbyte, temp.highbyte, skip 4, cou,cou1]
    endif

    temp = (((temp >> 1) * 100) - 25 ) + (((cou -cou1) * 100) / cou)
    lcdout $fe, 1, dec (temp / 100), " . " , dec2 temp, " C"
    pause 1000
    goto main
    end


    end

    Please help take alook at my attchment i got many error which i could not solved
    Attached Images Attached Images  

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Unhappy

    hummm no error here when compiling your code. Looks like your PBP .INC, .BAS files are corrupted...

    Reinstall your PBP and MPLAB an tell us what's happening.
    Last edited by mister_e; - 6th February 2005 at 19:00.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default lcd 20x4 with ds1820

    i am using microcode studio suite a free software and picbasic pro 2.3 i only unzipped the pbp to drive c of my pc

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Reason is simple now. Version 2.3 don't support OWIN and OWOUT.. must buy an upgrade disk.

    http://www.melabs.com/support/upgrade.htm#pbp
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default

    ok thank you for the advice

  6. #6
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default

    hi
    is it possible to use 4 ds1820 a pic16f84a which will be display four different temperature on the 4 lines of the lcd?

    with my single ds1820 how can i edit to make it work for 4 ds1820

    any help will be highly appreciated.

  7. #7
    Ceug2005's Avatar
    Ceug2005 Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    $55 - match ROM
    $10,$BB,$40,$2C,$00,$08,$00,$F9 - 64 bit rom code for sensor 1
    $44 - do temp conversion

    sensor 1:
    OWOUT PortB.0, 1, [$55,$10,$BB,$40,$2C,$00,$08,$00,$F9,$44]
    ' match ROM &
    pause 1000 ' conversion time 750 ms
    OWOUT PortB.0, 1, [$55,$10,$BB,$40,$2C,$00,$08,$00,$F9,$BE]
    ' match ROM & read scratchpad memory

    OWIN PortB.0, 2, [R_Temp0.Lowbyte, R_Temp0.Highbyte,skip4,count_remain_0,count_per_c_ 0]

    same for sensor 2,3,4 --- if you heave enough space in PIC16F84

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  3. Pic18f452 with 20x4 LCD Help
    By djmachine in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th November 2008, 22:43
  4. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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