• 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

    joesaliba-353

    Pulse counter memory problem

    Thread Starter: amod

    Please tell me my faults.My pulse counter memory does not store.When i switch on device after 5 second ,memory exist by after 30 seconds it is washed...

    joesaliba Yesterday, 18:33 Go to last post