• 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

    teo-16018

    Microsoft security essentials blues

    Thread Starter: shantanu@india

    Hi, A strange thing happened just now.My Windows 7 Micrsoft Sercurity Essentials suddenly gave a warning that prplus.exe(Compiler) is a potential...

    teo Today, 19:23 Go to last post
    barak-1433

    SPI mssp

    Thread Starter: picprotonguy

    Just ordered Digital to Analog IC MCP4822 with SPI interface and immediately opened proton manual. I'm very disappointed, it looks like Proton...

    barak Today, 22:50 Go to last post
    David Barker-251

    UMC bootloader 18F46K22

    Thread Starter: shunt010

    Hi all. I am trying to build a UMC bootloader file for the 18F46K22, and it doesn't appear to work. It returns (in the error log) Error ...

    David Barker Today, 11:20 Go to last post