• 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

    Stephen Moss-711

    Select a choice of include file

    Thread Starter: Dave-S

    Is there any way to select a choice of a include file, ie: by holding a button connected to a Pin?

    Stephen Moss Today, 09:19 Go to last post
    crankshaft-122

    I2C Slave problems with 12F1840

    Thread Starter: crankshaft

    Spent the last 2 days on this and are hoping someone can help, as I have googled and tried lots of things and there's not much in these forums...

    crankshaft Today, 11:35 Go to last post
    charliecoultas-16125

    PicKit3 Programmer

    Thread Starter: Dave-S

    Trying to setup a PicKit3 Programmer. Has gone through the install programmer and the Dos screen flashes up but does not stay there, and it does not...

    charliecoultas Today, 08:29 Go to last post
    towlerg-21522

    Issue with MID$

    Thread Starter: Frizie

    Hi people! I have a small issue with the MID$ command. If I put a semi-colon in the source-string then I get the compiler error: Unbalanced...

    towlerg Yesterday, 22:22 Go to last post