Replacing LCDOUT with direct statements?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,122

    Default Replacing LCDOUT with direct statements?

    Hello.
    After I got external EEPROM working, now it's time to do some graphics.
    For this purpose I use ST7920 controller based LCD, which has parallel interface, so works directly with LCDOUT statement, making many complicated things simpler. However, it can't transmit $FE to display, since it is used as statement. This creates many issues with graphics to be sent to display. So I have to replace LCDOUT with something "discrete".
    I've read HD44780 manual, but some moments are not clear, so are there any code ideas, with which I just can simply send required byte to HD44780 compatible screen, in 4 bit mode, but without using LCDOUT statement?

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    When I was young I did that on a Z80 self made computer in assembly.

    Surely I will not do it again... Too much work.

    I do understand why you want this. Too cheap as graphic display but too much complicated to make it work with Lcdout. Better use a Nextion display. Easier, many colors, RS232 controled and touch input too!

    Ioannis
    Last edited by Ioannis; - 5th February 2022 at 12:00.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    I've read HD44780 manual, but some moments are not clear, so are there any code ideas, with which I just can simply send required byte to HD44780 compatible screen, in 4 bit mode, but without using LCDOUT statement?
    Since LCDOUT works perfectly fine for the HD44780 for which it is meant there's probably never been a need to sort of recreate the same functionallity. Obviously loads and loads of examples for assembly, both PIC and other uC can be found on the internet but you're not interested in that.

    What "moments" are not clear specifically? Perhaps we can clear those "moments" up and then you'll be fine.

    Are you intending to completely replace LCDOUT or are you trying to find a solution only for the occation(s) when you need to send 254?

  4. #4
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    Regarding the nextion display, unfortunately, while in general, idea is good, there are several key disadvantages:
    1. High cost
    2. Bad quality, low contrast, bad viewing angle and not sunlight readable display.
    3. Need for SD card
    4. Long boot time
    5. Complicated, badly written and not user oriented IDE

    So nextion is junk, and unless they fixed all these 5 (which is not going to happen anyways), I'm not going to look for it

    Contrary to that, ST7920 display is pin to pin compatible with standard 1602 LCD modules, has actually two display framebuffers - one for HD44780 mode, another for graphical, and it does OR for them automatically - so you can write text via HD44780 mode, and use graphic mode to only display graphical elements, their overlay is automatically handled by display - thus removing requirement for large amount of ram, rom, eeprom and need to keep separate framebuffer.



    As I understand, working with HD44780 means manipulation with Enable and RS pins, and setting data pins according to required bytes to be sent, and spitting them into two 4 bit parts. So since I usually connect 44780 pins to single port in sequence - like data lines to portb.0-portb.3 and RS and E pins to PORTB.4 and PORTB.5, I guess there should be a statement, which allows to set port bits according to certain variable bits. So after reading HD44780 manual, I don't think it will be too complicated to do bitbanging and drive it in that way...

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    I've actually used a Nextion displays for a project or two because that's what the customer wanted and I must say find a couple of your comments a bit strange. In fact it makes me wonder if YOU have actually tried one....

    1. High cost <-OK, relative to a 1602 or 128x64 graphics display, sure. But compared to a similar product from say 4D Systems, no.
    2. Bad quality, low contrast, bad viewing angle and not sunlight readable display. <- Only used in indoors so can't comment on that
    3. Need for SD card <- Certainly not. None of the projects I've done with them have use an SD card.
    4. Long boot time <- What? Please define long. In my experience they start like "instantly".
    5. Complicated, badly written and not user oriented IDE <- Sure, it's a bot rough but it does get the job done and it allows you test out commands etc virtually.

    EDIT, I just dug one of mine out and powered it up.
    Yes, it starts "instantly" (less than 1s). No, there's no SD-card in it and it still works.
    Black text on white background is no problem reading at almost ANY angle but black text on gray buttons does wash out when viewed from the 6 o'clock position.
    Last edited by HenrikOlsson; - 5th February 2022 at 16:36.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    Quote Originally Posted by CuriousOne View Post
    Regarding the nextion display, unfortunately, while in general, idea is good, there are several key disadvantages:
    1. High cost
    2. Bad quality, low contrast, bad viewing angle and not sunlight readable display.
    3. Need for SD card
    4. Long boot time
    5. Complicated, badly written and not user oriented IDE
    1. comparing to a 12864 monochrome LCD, at about the same size i think it is about 25 euros. So for a color full graphics no. It is not.
    2. My iPhone is also not readable under the sun. Other than that, I found them very acceptable for the price.
    3. No need for SD. The SD is only for loading the program. But that can be done with RS232 also. Not true then.
    4. Boot is instant. Maybe faster than the PIC that it will communicate!
    5. The IDE is different than MCStudio. But not bad! Instead it is helpful and also has emulator that can be used with the PCs RS232 and communicate with your PIC so you can test the system even before you purchase the LCD itself!

    You may need to test it and see for yourself.

    I have a 12864 display but never managed to control it from a PIC. Maybe it is time to show how. The one I got is WG12864D by Winstar with T6963C controller and a couple of LC7940 chips.

    Ioannis
    Last edited by Ioannis; - 5th February 2022 at 16:39.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    Have you seen this: http://www.picbasic.co.uk/forum/showthread.php?t=19842

    Also this but for a different controller: http://www.compsys1.com/support/PBP_...ic/glipicw.bas

    Ioannis

  8. #8
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: Replacing LCDOUT with direct statements?

    1. ST7920 module has same physical dimensions and outline as standard 1602 LCD module, but has 132x32 pixels resolution and larger physical area of pixels (less wasted space, compared to traditional 1602 displays). This means that it can display up to 18 characters x 4 lines using standard 8x8 font matrix. You can have a look here (The slow drawing is animation effect, using LCDOUT it is possible to update whole screen at approximately 20fps rate):

    Regarding the 25 euros, I don't know where you buy them, but I bought nextion on taobao, the basic model, for about $11. ST7920 LCD module is about $6, standard 1602 LCD module is about $1. OLED 1602 - also $10.

    2. Your iphone, your issues. I like my devices to be fully accessible and have as few disabilities, as possible.

    3. And where store graphics, sound files, etc, without SD ?

    4. I don't see any instant boot times, with empty code - maybe.

    5. I have tried it by myself, several times, several versions. IDE looks like monkey's drawing - visually they tried to emulate visual studio, but they didn't went into internals.

Similar Threads

  1. Replies: 2
    Last Post: - 2nd June 2021, 15:11
  2. Replacing pic16f627a from a 16f84(a)
    By PicNewbie in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd February 2009, 02:35
  3. Replacing existing pic
    By Freman in forum General
    Replies: 29
    Last Post: - 5th June 2008, 23:53
  4. 8bit LCDout vs 4bit LCDout
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th May 2006, 12:16
  5. replacing chips
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th February 2005, 18:01

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts