Scrolling thermo


Closed Thread
Results 1 to 40 of 56

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    I am so DUMB !!! The file I wrote and I try to compile has the name "16F877A.bas" ! So idiot !!!
    Works fine...now ! Thank You all ! Sorry for my stupidity .
    Code:
    '****************************************************************
    '*  Name    : test scroll-clock-thermometer-16F877A
    '****************************************************************
    @ DEVICE pic16F877A, XT_OSC, WDT_ON, PWRT_ON, BOD_ON
    DEFINE OSC 4
    
    OPTION_REG.7 = 0
    ADCON1 = 7
    CMCON=7
    
    PORTA = %00000001 'Set all INPUTS to 0 except RA0 = DQ
    TRISA = %00000001 'Set PORTA RA0-RA5
    PORTB = %00000000 'Set all outputs to 0 (off)
    TRISB = %00000000 'Set PORTB to all output
    PORTC = %00000000 'Set all outputs to 0 (off)
    TRISC = %00000000 'Set PORTC to all output
    PORTD = %00000000
    TRISD = %00000000                
    DQ     var  PortA.0
    
    SDA Var PORTC.1 ' DS1307 SDA pin #5
    SCL Var PORTC.0 ' DS1307 SCL pin #6
    ...etc...

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    $_hit happens...
    Do not be so hard on yourself.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Still need help...I try to write code for setting clock ; I use parts from the great code of Melanie's (Thanks !). In Proteus I see what happens but... In real-life I need to display each digit of clock-time ; if set hour I need to see, first tens hour digit, then hour digit, tens minutes, minutes.
    How can I display on this matrix static number ? Please, give me a clue !

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Do you mean how do you display 4 digits on an 8x8 display without scrolling? That I don't think you can do and still be able to read it.

    Maybe I just don't understand the question
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Sorry for my poor english...
    So, If set tens hour : on matrix appears (without scrolling) tens hour digit only.
    If set hour : on matrix appears (without scrolling) hour digit only.
    etc, etc.
    Otherwise I can't setting the clock, because I don't see what happens ...

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    I DID IT !
    Full working () version of scroll-thermo-clock, using PIC16F877A. With buttons for setting hours/minutes !
    Enjoy !

    LE : The answer on my previous question:
    Code:
        portb=0
        portd=0
        pause 1
        FOR counter = 0 TO 4
            READ oraa*5+counter,leddata [counter]    
        NEXT 
            PORTB=%11111111
            PORTD = 1
            FOR counter = 0 TO 4
               PORTB = leddata [counter]       
               PORTD = PORTD * 2
            leddata [counter] = leddata [counter+1]
            NEXT
    Attached Files Attached Files
    Last edited by fratello; - 21st October 2011 at 14:35.

  7. #7
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Awesome!!!!!!!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  8. #8
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    I use 4k7 pullup resistors on the I2C bus, as i read somewhere that its a bit fussy with 10K....dont know how true this is

  9. #9
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Now I intend to use two 5x7 led matrix, since some ports of PIC (16F877A) are free...
    Please, I need help : how can making scroll in this case ?
    Note : PortB are lines (7) ; PortC are columns from 0 to 7 ; PortD are columns from 8 to 15.
    Attached Images Attached Images  
    Last edited by fratello; - 26th October 2011 at 19:11.

  10. #10
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    I found a way...but I think it's not the BETTER way .
    Code:
        '
        '    Display RTC & temp.
        '    -----------
    LOOPing:
    FOR scroll = 0 TO 70
        FOR scan = 0 TO 7
            PORTB=%11111111
            PAUSE 1
            PORTc = 1 
            PORTd = 1
            FOR counter = 0 TO 15
                  PORTB = leddata [counter]
                  pause 1
                    if counter > 7 then      
                        PORTD = PORTD * 2
                    else
                        portc = portc * 2
                    endif 
            NEXT
        NEXT        
        FOR counter = 0 TO 70
            leddata [counter] = leddata [counter+1]
        NEXT
    NEXT
    LED's on column 7 (PortD 0) are, sometimes, on ... What @##%$@ is this ?
    Attached Images Attached Images  

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Scrolling thermo

    Thanks for making this an article!
    http://www.picbasic.co.uk/forum/cont...ng-thermometer
    Dave
    Always wear safety glasses while programming.

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