How exactly LCDOUT statement works?


Closed Thread
Results 1 to 33 of 33

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    And what about BMP180 pressure sensor?
    I only find sample code for BMP085 on this forum, and it requires PBPL and high end chip too
    but why? isn't that simple I2C interfacing?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Sure, interfacing the chip is simple I2C or SPI but there's some quite heavy math involved in order to go from the raw values you get out of the chip to actual "units". Just look at the datasheet. If you can use the BME280/BMP280 instead, I've posted code for that - but yes it requires an 18F part in order to perform the math involved.

    (It might be that the code would work for the BMP180 as well, I won't investigate).

  3. #3
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Thanks!
    So there is no PIC16 friendly barometric pressure sensor available?
    I want to integrate it into my VFD clock project - I already have DHT22, DS3231, TTP223 up and running. So I wanted to add barometric pressure, to do some weather forecasting

    (Sorry for not removing protective sheet from filter, this is quite expensive material, a gift was send by Noritake, so I'm keeping it sealed till I'll go to final design stage and incorporate it into finished product).

    Name:  noritrake.jpg
Views: 1029
Size:  398.5 KB

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


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Say if 1% precision for me is enough, still 18F needed?

  5. #5
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Got some time and tested that approach with ST7920. And it indeed works.
    While PBP seems to beginning to belong to dead language category, I'll leave this simple code here anyways - maybe someone will find it useful.

    ST7920 is wired as standard HD44780 in 4 bit mode. With appropriate LCD pins defined.

    Code:
    LCDOUT $FE,$2E 'enable graphic mode
    LCDOUT $FE,$80 'set Y position to zero (Top)
    LCDOUT $FE,$80  set X position to zero (Left)
    LCDOUT 255 'draw a line consisting of 8 pixels in top left row
    Note: X counter increases after each write by itself, but Y counter - not, so you have to do it manually.

    And this simple code fills up entire screen with white:

    Code:
    LCDOUT $FE,$2E
    for Z=0 to 32
    LCDOUT $FE,$80+z
    LCDOUT $FE,$80
    FOR x=1 TO 18
    LCDOUT 255
    NEXT
    next

  6. #6
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    How to send $FE with LCDOUT ?
    X=$FE
    LCDOUT X

    It sends statements instead of byte data Found this accidentally - one of my custom font letters contained $FE pixels, and when using that char, it blowed up all my code. Took me several days to figure the reason (I was thinking about faulty EEPROM, display controller, SRAM on PIC and so on)

  7. #7
    Join Date
    Feb 2013
    Posts
    1,153


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Any ideas?
    This is very annoying and trashes whole idea of using LCDOUT statement...

Similar Threads

  1. DS3231 works in one config, but does not works with other IC.
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd December 2019, 19:52
  2. Alternate If-Then Statement Help
    By pdegior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th August 2007, 00:07
  3. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  4. 8bit LCDout vs 4bit LCDout
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th May 2006, 12:16
  5. A simple IF Statement!!!!
    By mslaney in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 17th February 2005, 20:58

Members who have read this thread : 0

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