LCDout and large filesize 18F452 -> paging problem?


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    11

    Default LCDout and large filesize 18F452 -> paging problem?

    Howdy,

    LCD is in portD (data=D.0-D.3,RS=D.4,En=D.5)
    TRISD = %01000000 (D.6 is input)
    LCDout interferes pin D.7 as program size grows
    PortD.7 = 1 won't make pin high...
    pulsout portD.7,10000 still works... cannot figure it out.. o:-)

    If I decrease code size, the problem disappears...
    Has anyone faced same kinda problems?

    thnx adv.
    m.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Post the code...

  3. #3
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Code is basicly like this:

    DEFINE LCD_BITS 4
    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 5
    TRISD = %01000000
    LED VAR portD.7
    ...
    --->8---(klipeti-klipeti)--->8--- (lots of stuff)
    ...
    Lcdsub:
    lcdout $FE,2,"hello"
    lcdout $FE,C0,"world"
    return
    ...
    main:
    LED=1 ' This should illuminate the led?
    gosub Lcdsub
    pause 500
    LED=0
    pause 500
    goto Main

    So, if I replace LED=1 with pulsout portD.7,65530 it will blink..
    Otherwise it wont.. BUT..
    If I remove gosubs away, LED=1 will work and it LED will blink..



    Quote Originally Posted by skimask View Post
    Post the code...

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mara View Post
    --->8---(klipeti-klipeti)--->8--- (lots of stuff)
    ...
    ...
    It's this that makes it suspicious.


    And which version of PBP are you using?
    Last edited by skimask; - 24th January 2008 at 16:02.

  5. #5
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    > It's this that makes it suspicious.
    yep, I know.. the code is 500 lines...
    I just tried to save some bandwidth.. o:-)

    > And which version of PBP are you using?[/QUOTE]
    pbpro v:2.50a and uCodeStudio+ v:3.005

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Ok, how about this code, and ONLY this code:

    Code:
    DEFINE LCD_BITS    4
    DEFINE LCD_DREG   PORTD
    DEFINE LCD_DBIT    0	
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT  4	
    DEFINE LCD_EREG   PORTD	
    DEFINE LCD_EBIT    5		
    TRISD = %10000000
    LED VAR portD.7
    Lcdsub:  lcdout $FE,2,"hello" : lcdout $FE,C0,"world" : return
    main:  LED=1 : gosub Lcdsub : pause 500 : LED=0 : pause 500 : goto Main
    END
    Last edited by skimask; - 24th January 2008 at 18:09.

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