Menu

LCD_IO 4 Help Please

Anobium
2011-11-19
2013-05-30
  • Anobium

    Anobium - 2011-11-19

    Are the any issues with the LCD_IO 4 code?

    I know the LCD is ok. But, I get nothing display when using GCB.

    This is my program.

    Thank you. Most grateful for any help.

    #config OSC = INTRC_OSC_CLKOUT
    'Chip settings
    #chip 16F627, 20

    'LCD settings
    #define LCD_IO 4
    #define LCD_DB4 portb.4
    #define LCD_DB5 portb.5
    #define LCD_DB6 portb.6
    #define LCD_DB7 portb.7
    #define LCD_RS portb.3
    #define LCD_Enable portb.2
    #define lcd_no_rw

    InitTimer1 Osc, PS1_1/8
    StartTimer 1
    CounterValue = 0

    Wait 100 ms
    Print "Int Test"

    On Interrupt Timer1Overflow Call IncCounter

    Do
        CLS
        Print CounterValue
        Wait 100 ms
    Loop

    Sub IncCounter
        CounterValue ++
    End Sub

     
  • Nobody/Anonymous

    Do you managed the contrast?. potenciometer is ussually used, when power on, 1st line of lcd ussually show black squares.

     
  • Nobody/Anonymous

    It is a timing issue.  I have changed LCD.h to cater for this cheap LCD device.  You get what you pay for!

    I will test again with the original LCD.h today to ensure that is the root cause of the issue.

    Thank you.

     
  • Anobium

    Anobium - 2011-11-21

    However, it could be because I had fours ports floating…..

    Would this cause some issues?  :-)

     
  • gcha44

    gcha44 - 2011-11-21

    Hi ,
    It seems there is no clock .
    I think Intrc_osc_clkout only works with 4 Mhz , but not 20Mhz
    So you must write #chip 16F627,4  preferably before #config OSC=Intrc_osc_clkout
    Regards
    GC

     
  • Anobium

    Anobium - 2011-11-21

    Thank you.

    So, the #chip…. must come before config of the clock.

    I have made the changes TO 4 Mhz.

    Thank you.

    I will leave on test tonite.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.