12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Each position on the display has a number for an "address".
    Code:
    Row1  CON 128 = $80
    Row2  CON 192 = $C0
    Row3  CON 148 = $90
    Row4  CON 212 = $D0
    'All first position on each of the lines
    By adding to the constant you can place the character anyplace you want on the display.
    First line third position from the left would be
    $83 or 131

    Setup a loop adding to the constant and see if you can make something scroll.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Ah right (penny drops) cheers mackrackit.


    Setup a loop adding to the constant and see if you can make something scroll.
    Mmm, I'll see what I can do.

    Dave

  3. #3
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I'm still working hard on this........!

    I know what I need to do to get this to work (on paper as it were, I think I do anyway). I'm reading and GQQGLing like made to find and learn the programming skill I need to make it work.

    If I can't crack it tonight I'll have to ask, tick, tick, tick....must dash.

    Dave

  4. #4
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Well I did try.......

    It was getting the LCD to output B0 as a DEC number (LCD location for the smiley) rather than just B0 that foxed me. I tried DEC B0 and a few other things ("."B0..."B0") but still no good. I think (and hope) I was on the right lines though.

    Here's my attempt:

    Code:
    BO VAR BYTE          'BYTE 0  Sets position for CHAR  128...+19
    LC var byte          'Loop_Count Counts 0 to 19 'positions' across display
    
    LCDOut $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00  'Smiley Face
    
    Pause 500
    MAIN
    For LC = 0 TO 19
    PAUSE 500
    LET BO = 128 + LC     'Start at LCD Top LHS then add 1 to move across display
    LCDOUT $FE,1,B0,0     'Output the 'Smiley Face' at location B0
    PAUSE 500
    Next LC
    GOTO MAIN
    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Reallllllly close
    Made a couple smal changes
    Code:
    LCDOut $FE,$40,$00,$0a,$0a,$00,$00,$11,$0e,$00  'Smiley Face
    For LC = 0 TO 19
    PAUSE 500
    LET BO = 128 + LC     'Start at LCD Top LHS then add 1 to move across display
    LCDOUT $FE,1
    LCDOUT $FE,BO,0     'Output the 'Smiley Face' at location B0
    PAUSE 500
    Next LC
    GOTO MAIN
    But there is still one small problem...
    I will leave that for you
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Well I compiled it and it ran........ Like you say I wasn't a million miles off on this one which is pleasing.

    But there is still one small problem...
    Mmm, I've looked and looked and I can't see one. Was it from the original brief where you said use a CONSTANT and I've used a VARIABLE?

    Quick question. In the program you made the change of address from $60 to $40, that's because the Custom characters are given memory addresses $40.....$78 (Char 0 - 7) and they must be sequential right? In other words I had Character '0' at address $60 which was a mistake.

    Also having the:

    LCDOUT $FE,1
    Simply clears the display on every loop so the next increment of LC moves the character along one and clears the previous character.

    Dave (Oop's what's next?)

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LEDave View Post
    Mmm, I've looked and looked and I can't see one. Was it from the original brief where you said use a CONSTANT and I've used a VARIABLE?
    OOPPSS! Now I am the one that can not count. I have a 16x4 I use for testing. It would work for you 20x4 display.
    Quick question. In the program you made the change of address from $60 to $40, that's because the Custom characters are given memory addresses $40.....$78 (Char 0 - 7) and they must be sequential right? In other words I had Character '0' at address $60 which was a mistake.
    Yes, your were calling the wrong address.
    Simply clears the display on every loop so the next increment of LC moves the character along one and clears the previous character.
    Code:
    LCDOUT $FE,1
    Can not have a character location after it, only display commands. But for spped you can do this, (a snippet from,,)
    Code:
     LCDOUT $FE,1,"THE TEMPERATURE",$FE,$C0,"IS: ",DEC TRESULT,$FE,$90,"BAD READS ",DEC BCS
    Dave (Oop's what's next?)
    I will get back to you with something
    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