Customizing font style for running message...


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    What you want to do is shift the bits for each byte. Shift left to scroll up, shift right to scroll down.

    Scroll up: sutun_reg[i]=sutun_reg[i] << 1

    Scroll up: sutun_reg[i]=sutun_reg[i] >> 1

    Note that this does NOT carry the bits over, so after doing it 8 times, the display will be blank.

    If you want to display to "roll", then you would need to save the MSbit (or LSbit scrolling down) and then make it the LSbit (MSbit for scrolling down)after the shift.

    so, here's one way to do that (there is likely a more efficient way).

    Code:
    temp_byte = sutun_reg[i]
    temp_bit = temp_byte.7
    temp_byte = temp_byte << 1
    temp_byte.0 = temp_bit
    sutun_reg[i] = temp_byte

  2. #2
    Join Date
    Jun 2011
    Location
    Philippines
    Posts
    223


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    @ SteveB
    Code:
    temp_byte = sutun_reg[i]
    temp_bit = temp_byte.7
    temp_byte = temp_byte << 1
    temp_byte.0 = temp_bit
    sutun_reg[i] = temp_byte
    Thank you for the info and code..works awesome on my setup. However I was thinking of adding a little delay when (each letter are complete and reached the base of the matrix), before it'll scroll up again. I tried to add pauseus 200 in the code below but no effect..what do you think I'm missing?
    Code:
    pauseus 200
    for i=0 to 30
            ;sutun_reg[i]=sutun_reg[i+1]
            temp_byte = sutun_reg[i]
            temp_bit = temp_byte.7
            temp_byte = temp_byte << 1
            temp_byte.0 = temp_bit
            sutun_reg[i] = temp_byte
     next i
    Kind regards,
    tacbanon
    Last edited by tacbanon; - 30th June 2012 at 03:54.

  3. #3
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    "pauseus 200" is too quick, hardly a blink of an eye (it's 1/5 of a millisecond). Try "PAUSE 1000" This will be a 1 sec pause.

  4. #4
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    Here is a little more optimized code for the scroll up:

    Code:
    temp_byte = sutun_reg[i]
    temp_Byte = temp_Byte << 1
    temp_Byte.0 = STATUS.0
    sutun_reg[i] = temp_byte
    It get's rid of the bit variable by taking advantage of the fact that the underlying assembly instruction moves the MSbit from the left shift into the "C" bit (which is bit 0) of the "STATUS" register.

    This will also work in a similar way for scrolling down:

    Code:
    temp_byte = sutun_reg[i]
    temp_Byte = temp_Byte >> 1
    temp_Byte.7= STATUS.0
    sutun_reg[i] = temp_byte

  5. #5
    Join Date
    Jun 2011
    Location
    Philippines
    Posts
    223


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    @SteveB
    Thanks again for the update...but sorry to bother you with this again, my text is scrolling downward at pauseus 200(fast) but in a certain point I want to pause it for about a 1 sec before it continue its process again.
    Name:  scroll.png
Views: 3107
Size:  7.6 KB

    I tried to place pause within the program but not the exact output I'm trying to achieve...hope there is a way to do this.

    regards,
    tacbanon
    Last edited by tacbanon; - 30th June 2012 at 09:30.

  6. #6
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    You need to pause after 8 cycles, this should work:

    Code:
        Scroll_Position = Scroll_Position + 1
        IF Scroll_Position = 8 THEN
            PAUSE 1000
            Scroll_Position = 0
        ELSE
            PAUSE 100
        ENDIF
    It looks like it should go after the "NEXT Q"

  7. #7
    Join Date
    Jun 2011
    Location
    Philippines
    Posts
    223


    Did you find this post helpful? Yes | No

    Default Re: Customizing font style for running message... Dot matrix editor

    Scroll_Position = Scroll_Position + 1
    IF Scroll_Position = 8 THEN
    PAUSE 1000
    Scroll_Position = 0
    ELSE
    PAUSE 100
    ENDIF
    Hi,
    The only problem now I'm having is that when it execute the "PAUSE 1000" it clears the matrix(blank) and prints again the letters after the pause.

    Kind regards,
    tacbanon

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