Nokia lcd include , small footprint to suit pic16's


Closed Thread
Results 1 to 40 of 111

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    You have only declared "rbuf var byte" It is being used as a pointer as far as I can see. It will be NO LARGER than 255.
    Dave Purola,
    N8NTA
    EN82fn

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    Hi dave,

    i solved it.

    i used the rbuf as var word

    Then i didnt add the commands for

    Code:
    arraywrite rbuf,[dec speed1,dec2 speed2,0]
    i used the above command only to combine it with the following and present the number to the lcd.

    So the solutions for me is:

    Code:
    checkt:
    RBUF = (SPEED1*100) + SPEED2
    IF RBUF > 5682 THEN ; THIS IS JUST AN EXAMPLE
    GOSUB LIMIT
    RETURN
    Thanks a lot for the help all of you.
    Last edited by astanapane; - 4th September 2020 at 18:23.

  3. #3
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    additional missing line from the previous message


    Code:
    arraywrite rbuf,[dec speed1,dec2 speed2,0]
    i used the above command only to combine it with the following and present the number to the lcd.
    Code:
    LCDSTR x,y, rbuf
    in any case the solution is to use the rbuf as word, multiply by 100 the speed1 and add speed2.

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,642


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    i solved it.


    i used the rbuf as var word

    has not solved it at all , you cannot safely use arraywrite rbuf,[dec speed1,dec2 speed2,0] with a word var as the destination
    the destination for the text chrs generated by arraywrite m
    ust be an existing chr array big enough to contain the text generated plus a null terminator
    not doing so will lead to enormous problems

    secondy to expect the result of arraywrite to be usable as a number is absurd , its a textual chr string
    Warning I'm not a teacher

  5. #5
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    there is a missandestanding. my fault because i consfused you by using the same name for the variable SBUF and RBUF in the previous posts.

    vars.....

    SBUF var byte
    RBUF var word

    Program in the main loop includes the command:

    Code:
    arraywrite SBUF, [dec speed1, dec2 speed2,0] ;
    then there is a checkSpeed LABEL

    checkSpeed:

    Code:
    RBUF = (speed1*100) + speed2
    if RBUF > 5687 then; just an example
    gosub limit
    endif
    return
    And that is what it works for me. It is under testing for a day now, and havent seen any strange behaviour.

    thanks.

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,642


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    SBUF var byte

    sadly still woefully incorrect.
    that reserves 1 byte , you need at least 5 bytes
    Warning I'm not a teacher

  7. #7
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Nokia lcd include , small footprint to suit pic16's

    Quote Originally Posted by richard View Post
    sadly still woefully incorrect.
    that reserves 1 byte , you need at least 5 bytes
    Do you mean something like that?

    Code:
    SBUF var BYTE[6]
    it is already configured.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. 16F946 pcb footprint (64 tqfp)
    By nomad in forum Schematics
    Replies: 2
    Last Post: - 8th September 2009, 11:14
  3. small 2X16 LCD
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 26th October 2007, 20:37
  4. Nokia 3310 LCD
    By barkerben in forum General
    Replies: 3
    Last Post: - 10th December 2005, 19:08
  5. Small LCD module,character
    By Ron Marcus in forum Off Topic
    Replies: 6
    Last Post: - 27th November 2005, 18:13

Members who have read this thread : 3

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