• PicŪ Basic


  • Alpha LCD Only 8 characters displayed

    All Alpha LCD 2x16 are expected to print all 16 characters per line. But it happens that only the first 8 characters are effectively displayed using PROTON.

    This is even nearly always the case with actual 1x16 LCD's.

    Is this a bug of PROTON?

    Not at all. This happens because all alpha LCD's, although being quite looking the same, do not necessarily use the exact same controller.

    PROTON expects a HITACHI 44780 controller. But some manufacturers used a slightly different type of controller, or use a 2x16 controller to build 1x16 LCD's. In this case, the 8 first characters are viewed as LINE 1 and the 8 next are viewed as LINE 2 as the mapping of the characters displayed on the screen is not the same as the original one.

    Do not discard this type of LCD. They work fine. The solution resides in a slight adaptation of your code.

    Example Code

    ' Example of 16 caracters displayed on a 'strange' LCD

    'First declare them as 2 lines:

    DECLARE LCD_INTERFACE 4
    DECLARE LCD_LINES 2
    DECLARE LCD_DTPIN PORTB.0
    DECLARE LCD_ENPIN PORTB.4
    DECLARE LCD_RSPIN PORTB.5

    'Then manage to print your data on two lines of 8 characters:

    PRINT AT 1,1, "12345678"
    PRINT AT 2.1, "ABCDEFGH"

    'This will display: "12345678ABCDEFGH"
    contributed by Olivier.
  • Recent Activity

    towlerg-21522

    Ram Variable Bytes 18F86J55

    Thread Starter: Dave-S

    IDE only States 1024 where data sheet states 3904, is 3904 in def file and PPI file. Where does the IDE get information from, states I have run out...

    towlerg Today, 00:59 Go to last post
    KevinPBaker-28910

    Programming a Pickit2 (or 3)

    Thread Starter: KevinPBaker

    Hi I'm an absolute novice with Proton, but I have written a small program and I would like to test it in the real world (ie I want to program a PIC...

    KevinPBaker Yesterday, 18:41 Go to last post