How exactly LCDOUT statement works?


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Quote Originally Posted by mpgmike View Post
    ... In fact, I don't even use ADCIN anymore after it failed on one of the PICs I worked with several years ago (forget which one)...
    Well in contrast when I fail to use an ADC, I turn to ADCin and works first time! Taking more code space I guess and time...

    Quote Originally Posted by CuriousOne View Post
    Well it's about knowledge.
    For me it would be great if there were commands which directly work with WS2812, DHT22 and a huge list of other hardware, which is not supported right now....
    Then it would be Arduino and not PBP...

    Ioannis

  2. #2
    Join Date
    Feb 2013
    Posts
    1,126


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    lol ok, let's remove LCDOUT, OWIN, ADCIN, SEROUT and others too?
    Instead of adding something useful like NEOPIXEL $ADDR,$BRIGHTNESS,$R,$G,$B

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    adding something useful like NEOPIXEL $ADDR,$BRIGHTNESS,$R,$G,$B
    all of my posted examples can do that easily, except for brightness as its a function of r g b so would be a totally useless input

    http://www.picbasic.co.uk/forum/showthread.php?t=23399
    http://www.picbasic.co.uk/forum/showthread.php?t=20973

    a neopixel usercommand could be added with a few more lines of code to make the process more explicit
    but its trivially easy as is.
    very few have shown any interest in this code , very few have even asked a question.

    large arrays of neopixels can be resource hungry and will need a midrange chip. a general purpose version is and will
    remain a fantasy, the hardware must match the job
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Quote Originally Posted by richard View Post
    large arrays of neopixels can be resource hungry and will need a midrange chip
    tell me about it... That is why I prefer APA101.

    So every job needs its tool. Cannot one size fit all.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    But arduino does neopixel with ancient chip with ease?
    and also supports brightness? (it is also supported with RGB, you know?)

    The libraries and our own addons are of course great, but I'm speaking about centralized support - you just type in, it just works. No forum searching and guesswork.

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    As far as I know (correct me if I'm wrong) Arduinos support for NeoPixels is not part of the Arduino language itself. It's an add-in library that you have to download, install and include into your code in order to use it. It's not written or maintained by "Arduino the company" but by some third party (user, company, community) and I'm pretty sure there's more than ONE version of that library to choose from as well. Which can be confusing.

    The same thing goes for a lot of other stuff that "Arduino has" - it's libraries written by users and rest assured that the quality of them varies. Pretty much the same thing as "our" stuff.

    The big advantage is the encapsulation that proper function calls with parameter passing, local variables and return values provides. This provides the means to "hide away" even more stuff from the user than with PBP that doesn't support function calls and/or local variables. It's not magic though.

    A month or so ago I posted code for driving SK6812 RGBW LEDs. Using that particular code your example
    Code:
    NEOPIXEL $ADDR,$BRIGHTNESS,$R,$G,$B
    Would look like:
    Code:
    Red[ADDR]=R : Green[ADDR]=G : Blue[ADDR]=B : GOSUB UpdateDisplay
    And if you wanted you could rename the UpdateDisplay subroutine to NEOPIXEL and it would be
    Code:
    Red[ADDR]=R : Green[ADDR]=G : Blue[ADDR]=B : GOSUB NEOPIXEL
    Not THAT much different now, is it? Granted, the "library" IS hardcoded to run at 64MHz so you won't run a 16x16pixel array on a 12F508 - for multiple reasons.

    You still need to include the code and set up some variables and aliases, but you don't get away from that with Arduino either.

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


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Regarding this particular library, it is supported and maintained by adafruit - major arduino contributor.
    To use it in your project, you just go to library manager, type in neopixel there, click download & install and that's all.
    all "define"s for it are here:

    #define LED_PIN 14
    #define NR_OF_PIXELS 12
    void setup() {
    strip.begin();
    strip.show(); // Initialize all pixels to 'off'
    }

    And to use it:

    strip.setBrightness(255);
    strip.setPixelColor(1,10,30,40);

    no "hard coding" no "tied to 64mhz oscillator" - it just runs.
    I understand that from approach of older guys like myself
    this might appear to be not serious, but it allows you to get
    to the end result faster - you need neopixel led, you got it
    no need to care about osc clocks, tight timing and which
    chip can do it, and which - can't.

    Of course, arduino has it's own limitations - huge board with external osc
    you can't run it off tiny SOIC-8 chip, as you can do with PBP
    and that dreadful programming language, not meant to be understood by normal human beings

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Quote Originally Posted by CuriousOne View Post
    But arduino does neopixel with ancient chip with ease?
    How does these chips compare to the many flavors of PIC's?

    You can't have it all. Too many chips, too many specs, and all do the same thing. Not possible. You have to compromise and select a powerful chip, stick on this no matter how much it costs and do your light or heavy job. Close to what a powerful ATMEL chip does on Arduino. From flashing a LED to NEOPIXEL or more.

    Ioannis

  9. #9
    Join Date
    Feb 2013
    Posts
    1,126


    Did you find this post helpful? Yes | No

    Default Re: How exactly LCDOUT statement works?

    Yeah but LCDOUT and other "specific" statements like OWIN do work on both low end beauties and high end PICs too?

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 : 1

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