12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Oh dear, I can't even count up to 20 now

    I've been working on my HEX today, maybe that explains it

    Working a treat now thanks, 'again'.

    Post you custom character code and we will see whats up.
    It's not mine it's Darrel Taylor's, from that link you posted. It's the battery symbol.

    Code:
    MAIN:
    PAUSE 500
    LCDOUT $FE,$78,$06,$0f,$0f,$0f,$0f,$0f,$0f,$00
    GOTO MAIN
    Dave
    Last edited by LEDave; - 23rd April 2010 at 22:37.

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


    Did you find this post helpful? Yes | No

    Default

    The LCDOUT character stuff place at the beginning of your code, in the variable area.
    Code:
    LCDOUT $FE,$40,$06,$0f,$0f,$0f,$0f,$0f,$0f,$00 'This is the first character #0
    'The first place in the RAM is $40
    'The next character would start with $48
    VARS
    DEFINES
    ...
    Then in your loop
    Code:
    MAIN:
    PAUSE 500
    LCDOUT $FE,1,0 'First character
    LCDOUT $FE,1,1 'Second character if you have one
    GOTO MAIN
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Cheers mackrackit,

    Things slowly starting to filter through. I'll have a look tomorrow.

    I love the old LCD though, cracking.

    Dvae

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Well I managed to get the program to do what I wanted it to do, namely run through four custom characters then place the four custom characters one in each corner of the display ( program code below).

    All the info to do this was found within the LCD link you posted However, I can't really see how the CONSTANT:
    Code:
    Row1  CON 128
    works, what does the 128 part of it mean? I guess it must relate to LCD position HEX 0000 DDRAM Address for a 4 Line LCD but can't relate that to a CGRAM character position.

    Code:
    ANSEL   = %00000000    'Disable analog select so ports work as digital i/o.
    CMCON0  = %00000111    'Disable analog comparators.
    TRISA   = %00000000    'Set PORTA as OUTPUT.
    PORTA   = %00000000    'Set PORTA pins all low.
    TRISC   = %00000000    'Set PORTC as OUTPUT.
    PORTC   = %00000000    'Set PORTC pins all low.
    
    DEFINE LCD_DREG     PORTC    'PORTC.0 WILL CONNECT TO DB4, PORTC3 TO DB7
    DEFINE LCD_DBIT     0
    DEFINE LCD_RSREG    PORTC
    DEFINE LCD_RSBIT    4        'PORTC.4 CONNECT TO LCD PIN4
    DEFINE LCD_EREG     PORTC
    DEFINE LCD_EBIT     5        'PORTC.5 CONNECT TO LCD PIN6
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    4
    DEFINE LCD_COMMANDUS 2000     
    DEFINE LCD_DATAUS 150
    
    Row1  CON 128
    Row2  CON 192
    Row3  CON 148
    Row4  CON 212
    
    DEFINE OSC 4
    LCDOUT $FE,$40,$02,$06,$1a,$1a,$1a,$06,$02,$00 'FIRST  CHAR 0 (Battery)
    LCDOUT $FE,$48,$06,$0f,$0f,$0f,$0f,$0f,$0f,$00 'Second CHAR 1 (Speaker)
    lcdout $FE,$50,$1F,$11,$15,$17,$17,$15,$11,$1F 'Third  CHAR 2 (Copywrite)
    lcdout $FE,$58,$00,$0a,$0a,$00,$00,$11,$0e,$00 'Fourth CHAR 3 (Smiley)
    MAIN:
    PAUSE 500
    LCDOUT $FE,1,0 'First character
    pause 1000
    LCDOUT $FE,1,1 'Second character 
    pause 1000
    lcdout $FE,1,2 'Third character
    PAUSE 1000
    lcdout $fe,1,3 'Fourth Character 
    pause 1000 
    LCDOUT $FE,Row1+0,0 'Places CHAR 0 Top LHS of display.
    PAUSE 250
    lcdout $FE,ROW1+19,1 'Places CHAR 1 Top RHS of display.
    PAUSE 250
    LCDOUT $FE,Row4+0,2  'Places CHAR 2 Bottom LHS of display. 
    PAUSE 250
    LCDOUT $FE,Row4+19,3 'Places CHAR 3 Bottom RHS of display.
    PAUSE 4000
    GOTO MAIN
    Dave (lovin his LCD).
    Last edited by LEDave; - 25th April 2010 at 20:06.

  5. #5
    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.

  6. #6
    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

  7. #7
    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

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