1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Trying to output to LCD screen

Discussion in 'Oshonsoft' started by jnilo, Mar 15, 2015.

  1. jnilo

    jnilo New Member

    Joined:
    Mar 15, 2015
    Messages:
    9
    Likes:
    0
    Hello all
    I am new to Oshonsoft and to this forum. I am running into a very basic problem with the following simple program:

    Dim x As Word
    x = 65535
    AllDigital
    Lcdinit 3
    WaitMs 100
    loop:
    Lcdout "I am counting!"
    Lcdcmdout LcdLine2Home
    Lcdout #x
    x = x - 1
    WaitMs 250
    Lcdcmdout LcdClear
    Goto loop

    When I select an 16F88 it runs without any problems. When I select a 16f690 nothing shoes up on the screen. In both cases I am initializing the LCD tool with the default from the code.
    What am I doing wrong here ?
    PICIDE88.JPG PICIDE690.JPG
    Jacques
     
  2. House0Fwax

    House0Fwax Member

    Joined:
    Nov 15, 2006
    Messages:
    583
    Likes:
    17
    Location:
    Hampshire U.K.
    The 16f690 does not have a RB2 or RB3, it only has RB4,5,6 and 7.
     
  3. jnilo

    jnilo New Member

    Joined:
    Mar 15, 2015
    Messages:
    9
    Likes:
    0
    You are right! It worked perfectly well after inserting the following lines at the begining of the code. I initially tought that default ports where consistents with the selected PIC. I should have checked :)
    Define LCD_BITS = 4
    Define LCD_DREG = PORTC
    Define LCD_DBIT = 0
    Define LCD_RSREG = PORTC
    Define LCD_RSBIT = 5
    Define LCD_EREG = PORTC
    Define LCD_EBIT = 4
    Many thanks !
    Jacques
     

Share This Page