Nokia lcd include , small footprint to suit pic16's


Closed Thread
Results 1 to 40 of 111

Hybrid View

  1. #1
    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

    now it makes sense why i was getting some messy chr on the screen like that.

  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

    i've tried the following but didnt work.

    Code:
    rbuf  var byte
    wbuf var word

    Code:
    checkt: 
    arraywrite RBUF,[DEC2 speed1/100,DEC2 speed2//100,0] ; for example speed1 = 56 and speed2 is 85
    LCDSTR 0,2, RBUF ; ----------> this gives 0085
    wbuf = rbuf                                 
    if wBUF > 5685 then 
    gosub limit
    return
    then i tried:

    Code:
    checkt: 
    arraywrite RBUF,[DEC speed1,DEC2 speed2//100,0] ; for example speed1 = 56 and speed2 is 85
    LCDSTR 0,2, RBUF ; ----------> this gives 5685 which is what i want....BUT!!!! when i try to check if wbuf > than 5685, it doesnt work
    wbuf = rbuf                                 
    if wBUF > 5685 then   ' IF THE TEMPC IS GREATER THAN 37 C THEN LIGHT UP THE BLUE LED
    high lata.0
    ELSE
    low lata.0
    endif
    return
    how is it possible to combine those two speed1 and speed2 vars in one var? and check then the result as an integer number?

  3. #3
    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

  4. #4
    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.

  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

    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.

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


    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

  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

    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.

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