Using Nokia LCD


Closed Thread
Results 1 to 40 of 301

Thread: Using Nokia LCD

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    This is what MicroCode Studio say :
    Attached Images Attached Images  

  2. #2
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by fratello View Post
    This is what MicroCode Studio say :
    Your code compiles OK (2932 words used). I don't understand what can be wrong with your setup? If you close and restart the MicroCode Studio, would that help? At least sometime that has helped me.

    To get rid of "code crosses boundary" goto tool bar:
    View -> Editor Options...
    In General sheet, select "Disable 'code crosses boundary' ASM warning.

    BR,
    -Gusse-
    Last edited by Gusse; - 5th May 2009 at 14:59.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    The first one is about your config fuse. intrc_osc should be replaced by
    Code:
    INTRC_OSC_NOCLKOUT
    This one use the same config fuses as 16F628A & 16F627A. The complete list is in M16F62XA.inc file in pbp\inc folder.

    The second one is just a warning,
    http://picbasic.co.uk/forum/showthread.php?t=555&

    Can be bypass within MicroCode Studio.
    http://www.picbasic.co.uk/forum/show...66&postcount=2

    EDIT: Gusse, that's what happen when few people think the same thing at the same time
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Code is OK. May be you need a restart.

    Steve, the define is OK. It exists this too!

    Ioannis

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    OK ! Thanks ! I just wait for the 16F648A...

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    I have the 648A. The code works just fine !
    ...but : I try to define anothers characters for display the temperature that I set ; the message is like in picture. How can I define anothers characters ?
    Thanks in advance !
    Attached Images Attached Images  
    Attached Files Attached Files

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    I found that I could add up to 6 more characters (30 more bytes) to your code without getting the same error. I don't know exactly why you are getting the stack overflow errors, but the eeprom space is very limited. Since you have so much more space with the 648a, you might think about storing all the character data in program memory. You would need to modify your code a little bit though. You can edit out the characters that you don't need to save a little space.

    Code:
    FC var byte [5]
    Lcd_data var byte ' example Lcd_data = "I", gosub Lcd_SendChar , this will print the character "I"
    
    Lcd_SendChar:
        lookdown Lcd_data,[" !\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"],CharNum'[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],CharNum
        Lcd_data = CharNum +32   
        sELECT CASE lcd_data
        Case 32                   
        	FC(0)=$00:FC(1)=$00:FC(2)=$00:FC(3)=$00:FC(4)=$00 ' // sp
        Case 33                   
        	FC(0)=$00:FC(1)=$00:FC(2)=$2f:FC(3)=$00:FC(4)=$00 ' // !
        Case 34                   
        	FC(0)=$00:FC(1)=$07:FC(2)=$00:FC(3)=$07:FC(4)=$00 ' // " (use \)
        Case 35                   
        	FC(0)=$14:FC(1)=$7f:FC(2)=$14:FC(3)=$7f:FC(4)=$14 ' // #
        Case 36                   
        	FC(0)=$24:FC(1)=$2a:FC(2)=$7f:FC(3)=$2a:FC(4)=$12 ' // $
        Case 37                   
        	FC(0)=$c4:FC(1)=$c8:FC(2)=$10:FC(3)=$26:FC(4)=$46 ' // %
        Case 38                   
        	FC(0)=$36:FC(1)=$49:FC(2)=$55:FC(3)=$22:FC(4)=$50 ' // &
        Case 39                   
        	FC(0)=$00:FC(1)=$05:FC(2)=$03:FC(3)=$00:FC(4)=$00 ' // '
        Case 40                   
        	FC(0)=$00:FC(1)=$1c:FC(2)=$22:FC(3)=$41:FC(4)=$00 ' // (
        Case 41                   
        	FC(0)=$00:FC(1)=$41:FC(2)=$22:FC(3)=$1c:FC(4)=$00 ' // )
        Case 42                   
        	FC(0)=$14:FC(1)=$08:FC(2)=$3E:FC(3)=$08:FC(4)=$14 ' // *
        Case 43                   
        	FC(0)=$08:FC(1)=$08:FC(2)=$3E:FC(3)=$08:FC(4)=$08 ' // +
        Case 44                   
        	FC(0)=$00:FC(1)=$00:FC(2)=$50:FC(3)=$30:FC(4)=$00 ' // 
        Case 45                   
        	FC(0)=$10:FC(1)=$10:FC(2)=$10:FC(3)=$10:FC(4)=$10 ' // -
        Case 46                   
        	FC(0)=$00:FC(1)=$60:FC(2)=$60:FC(3)=$00:FC(4)=$00 ' // .
        Case 47                   
        	FC(0)=$20:FC(1)=$10:FC(2)=$08:FC(3)=$04:FC(4)=$02 ' // /
        Case 48                   
        	FC(0)=$3E:FC(1)=$51:FC(2)=$49:FC(3)=$45:FC(4)=$3E ' // 0
        Case 49                   
        	FC(0)=$00:FC(1)=$42:FC(2)=$7F:FC(3)=$40:FC(4)=$00 ' // 1
        Case 50                   
        	FC(0)=$42:FC(1)=$61:FC(2)=$51:FC(3)=$49:FC(4)=$46 ' // 2
        Case 51                   
        	FC(0)=$21:FC(1)=$41:FC(2)=$45:FC(3)=$4B:FC(4)=$31 ' // 3
        Case 52                   
        	FC(0)=$18:FC(1)=$14:FC(2)=$12:FC(3)=$7F:FC(4)=$10 ' // 4
        Case 53                   
        	FC(0)=$27:FC(1)=$45:FC(2)=$45:FC(3)=$45:FC(4)=$39 ' // 5
        Case 54                   
        	FC(0)=$3C:FC(1)=$4A:FC(2)=$49:FC(3)=$49:FC(4)=$30 ' // 6
        Case 55                   
        	FC(0)=$01:FC(1)=$71:FC(2)=$09:FC(3)=$05:FC(4)=$03 ' // 7
        Case 56                   
        	FC(0)=$36:FC(1)=$49:FC(2)=$49:FC(3)=$49:FC(4)=$36 ' // 8
        Case 57                   
        	FC(0)=$06:FC(1)=$49:FC(2)=$49:FC(3)=$29:FC(4)=$1E ' // 9
        Case 58                   
        	FC(0)=$00:FC(1)=$36:FC(2)=$36:FC(3)=$00:FC(4)=$00 ' // :
        Case 59                   
        	FC(0)=$00:FC(1)=$56:FC(2)=$36:FC(3)=$00:FC(4)=$00 ' // ";"
        Case 60                   
        	FC(0)=$08:FC(1)=$14:FC(2)=$22:FC(3)=$41:FC(4)=$00 ' // <
        Case 61                   
        	FC(0)=$14:FC(1)=$14:FC(2)=$14:FC(3)=$14:FC(4)=$14 ' // =
        Case 62                   
        	FC(0)=$00:FC(1)=$41:FC(2)=$22:FC(3)=$14:FC(4)=$08 ' // >
        Case 63                   
        	FC(0)=$02:FC(1)=$01:FC(2)=$51:FC(3)=$09:FC(4)=$06 ' // ?
        Case 64                   
        	FC(0)=$32:FC(1)=$49:FC(2)=$59:FC(3)=$51:FC(4)=$3E ' // @
        Case 65                   
        	FC(0)=$7E:FC(1)=$11:FC(2)=$11:FC(3)=$11:FC(4)=$7E ' // A
        Case 66                   
        	FC(0)=$7F:FC(1)=$49:FC(2)=$49:FC(3)=$49:FC(4)=$36 ' // B
        Case 67                   
        	FC(0)=$3E:FC(1)=$41:FC(2)=$41:FC(3)=$41:FC(4)=$22 ' // C
        Case 68                   
        	FC(0)=$7F:FC(1)=$41:FC(2)=$41:FC(3)=$22:FC(4)=$1C ' // D
        Case 69                   
        	FC(0)=$7F:FC(1)=$49:FC(2)=$49:FC(3)=$49:FC(4)=$41 ' // E
        Case 70                   
        	FC(0)=$7F:FC(1)=$09:FC(2)=$09:FC(3)=$09:FC(4)=$01 ' // F
        Case 71                   
        	FC(0)=$3E:FC(1)=$41:FC(2)=$49:FC(3)=$49:FC(4)=$7A ' // G
        Case 72                   
        	FC(0)=$7F:FC(1)=$08:FC(2)=$08:FC(3)=$08:FC(4)=$7F ' // H
        Case 73                   
        	FC(0)=$00:FC(1)=$41:FC(2)=$7F:FC(3)=$41:FC(4)=$00 ' // I
        Case 74                   
        	FC(0)=$20:FC(1)=$40:FC(2)=$41:FC(3)=$3F:FC(4)=$01 ' // J
        Case 75                   
        	FC(0)=$7F:FC(1)=$08:FC(2)=$14:FC(3)=$22:FC(4)=$41 ' // K
        Case 76                   
        	FC(0)=$7F:FC(1)=$40:FC(2)=$40:FC(3)=$40:FC(4)=$40 ' // L
        Case 77                   
        	FC(0)=$7F:FC(1)=$02:FC(2)=$0C:FC(3)=$02:FC(4)=$7F ' // M
        Case 78                   
        	FC(0)=$7F:FC(1)=$04:FC(2)=$08:FC(3)=$10:FC(4)=$7F ' // N
        Case 79                   
        	FC(0)=$3E:FC(1)=$41:FC(2)=$41:FC(3)=$41:FC(4)=$3E ' // O
        Case 80                   
        	FC(0)=$7F:FC(1)=$09:FC(2)=$09:FC(3)=$09:FC(4)=$06 ' // P
        Case 81                   
        	FC(0)=$3E:FC(1)=$41:FC(2)=$51:FC(3)=$21:FC(4)=$5E ' // Q
        Case 82                   
        	FC(0)=$7F:FC(1)=$09:FC(2)=$19:FC(3)=$29:FC(4)=$46 ' // R
        Case 83                   
        	FC(0)=$46:FC(1)=$49:FC(2)=$49:FC(3)=$49:FC(4)=$31 ' // S
        Case 84                   
        	FC(0)=$01:FC(1)=$01:FC(2)=$7F:FC(3)=$01:FC(4)=$01 ' // T
        Case 85                   
        	FC(0)=$3F:FC(1)=$40:FC(2)=$40:FC(3)=$40:FC(4)=$3F ' // U
        Case 86                   
        	FC(0)=$1F:FC(1)=$20:FC(2)=$40:FC(3)=$20:FC(4)=$1F ' // V
        Case 87                   
        	FC(0)=$3F:FC(1)=$40:FC(2)=$38:FC(3)=$40:FC(4)=$3F ' // W
        Case 88                   
        	FC(0)=$63:FC(1)=$14:FC(2)=$08:FC(3)=$14:FC(4)=$63 ' // X
        Case 89                   
        	FC(0)=$07:FC(1)=$08:FC(2)=$70:FC(3)=$08:FC(4)=$07 ' // Y
        Case 90                   
        	FC(0)=$61:FC(1)=$51:FC(2)=$49:FC(3)=$45:FC(4)=$43 ' // Z
    '    Case 91                   
    '    	FC(0)=$00:FC(1)=$7F:FC(2)=$41:FC(3)=$41:FC(4)=$00 ' // [
    '    Case 92                   
    '        FC(0)=$02:FC(1)=$04:FC(2)=$08:FC(3)=$10:FC(4)=$20 ' // \  (we are using this for " above)
    '    Case 93                   
    '    	FC(0)=$00:FC(1)=$41:FC(2)=$41:FC(3)=$7F:FC(4)=$00 ' // ]
    '    Case 94                   
    '    	FC(0)=$04:FC(1)=$02:FC(2)=$01:FC(3)=$02:FC(4)=$04 ' // ^
    '    Case 95                   
    '    	FC(0)=$40:FC(1)=$40:FC(2)=$40:FC(3)=$40:FC(4)=$40 ' // _
    '    Case 96                   
    '    	FC(0)=$00:FC(1)=$01:FC(2)=$02:FC(3)=$04:FC(4)=$00 ' // '
    '    Case 97                   
    '    	FC(0)=$20:FC(1)=$54:FC(2)=$54:FC(3)=$54:FC(4)=$78 ' // a
    '    Case 98                   
    '    	FC(0)=$7F:FC(1)=$48:FC(2)=$44:FC(3)=$44:FC(4)=$38 ' // b
    '    Case 99                   
    '    	FC(0)=$38:FC(1)=$44:FC(2)=$44:FC(3)=$44:FC(4)=$20 ' // c
    '    Case 100                   
    '    	FC(0)=$38:FC(1)=$44:FC(2)=$44:FC(3)=$48:FC(4)=$7F ' // d
    '    Case 101                   
    '    	FC(0)=$38:FC(1)=$54:FC(2)=$54:FC(3)=$54:FC(4)=$18 ' // e
    '    Case 102                   
    '    	FC(0)=$08:FC(1)=$7E:FC(2)=$09:FC(3)=$01:FC(4)=$02 ' // f
    '    Case 103                   
    '    	FC(0)=$0C:FC(1)=$52:FC(2)=$52:FC(3)=$52:FC(4)=$3E ' // g
    '    Case 104                   
    '    	FC(0)=$7F:FC(1)=$08:FC(2)=$04:FC(3)=$04:FC(4)=$78 ' // h
    '    Case 105                   
    '    	FC(0)=$00:FC(1)=$44:FC(2)=$7D:FC(3)=$40:FC(4)=$00 ' // i
    '    Case 106                   
    '    	FC(0)=$20:FC(1)=$40:FC(2)=$44:FC(3)=$3D:FC(4)=$00 ' // j
    '    Case 107                   
    '    	FC(0)=$7F:FC(1)=$10:FC(2)=$28:FC(3)=$44:FC(4)=$00 ' // k
    '    Case 108                   
    '    	FC(0)=$00:FC(1)=$41:FC(2)=$7F:FC(3)=$40:FC(4)=$00 ' // l
    '    Case 109                   
    '    	FC(0)=$7C:FC(1)=$04:FC(2)=$18:FC(3)=$04:FC(4)=$78 ' // m
    '    Case 110                   
    '    	FC(0)=$7C:FC(1)=$08:FC(2)=$04:FC(3)=$04:FC(4)=$78 ' // n
    '    Case 111                   
    '    	FC(0)=$38:FC(1)=$44:FC(2)=$44:FC(3)=$44:FC(4)=$38 ' // o
    '    Case 112                   
    '    	FC(0)=$7C:FC(1)=$14:FC(2)=$14:FC(3)=$14:FC(4)=$08 ' // p
    '    Case 113                   
    '    	FC(0)=$08:FC(1)=$14:FC(2)=$14:FC(3)=$18:FC(4)=$7C ' // q
    '    Case 114                   
    '    	FC(0)=$7C:FC(1)=$08:FC(2)=$04:FC(3)=$04:FC(4)=$08 ' // r
    '    Case 115                   
    '    	FC(0)=$48:FC(1)=$54:FC(2)=$54:FC(3)=$54:FC(4)=$20 ' // s
    '    Case 116                   
    '    	FC(0)=$04:FC(1)=$3F:FC(2)=$44:FC(3)=$40:FC(4)=$20 ' // t
    '    Case 117                   
    '    	FC(0)=$3C:FC(1)=$40:FC(2)=$40:FC(3)=$20:FC(4)=$7C ' // u
    '    Case 118                   
    '    	FC(0)=$1C:FC(1)=$20:FC(2)=$40:FC(3)=$20:FC(4)=$1C ' // v
    '    Case 119                   
    '    	FC(0)=$3C:FC(1)=$40:FC(2)=$30:FC(3)=$40:FC(4)=$3C ' // w
    '    Case 120                    
    '    	FC(0)=$44:FC(1)=$28:FC(2)=$10:FC(3)=$28:FC(4)=$44 ' // x 
    '    Case 121                    
    '    	FC(0)=$0C:FC(1)=$50:FC(2)=$50:FC(3)=$50:FC(4)=$3C ' // y 
    '    Case 122                    
    '    	FC(0)=$44:FC(1)=$64:FC(2)=$54:FC(3)=$4C:FC(4)=$44 ' // z 
    '    case 123
    '        FC(0)=$00:FC(1)=$08:FC(2)=$36:FC(3)=$41:FC(4)=$00'  // {
    '    case 124
    '        FC(0)=$00:FC(1)=$00:FC(2)=$7F:FC(3)=$00:FC(4)=$00 ' // |
    '    case 125
    '        FC(0)=$00:FC(1)=$41:FC(2)=$36:FC(3)=$08:FC(4)=$00'  // }    
    '    case 126
    '        FC(0)=$10:FC(1)=$08:FC(2)=$08:FC(3)=$10:FC(4)=$08'  // ~
        end SELECT
    Write_LCD:
        High Lcd_DC
        SHiftOUT Lcd_SDO , Lcd_CLK , MSBFIRST, [ FC(0),FC(1),FC(2),FC(3),FC(4),$00 ]
        Low Lcd_DC
        Return
    For the whole include file, you can look at: http://www.picbasic.co.uk/forum/showpost.php?p=73728
    Last edited by ScaleRobotics; - 22nd May 2009 at 15:45.
    http://www.scalerobotics.com

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Ok, for some reason it works if you say DATA @10,some data here, then when you have gotten about half way through the eeprom, stop writting, then start writing again where you left off with DATA 128(or where ever you left off at),rest of your data here.

    Don't know why you can't do it like you originally tried, but PBP does not seem to like it.
    Last edited by ScaleRobotics; - 23rd May 2009 at 15:25.
    http://www.scalerobotics.com

  9. #9
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Thanks Bill.

    I double checked the code I posted here: http://www.picbasic.co.uk/forum/cont...Nokia-3310-LCD, and it is working for me. I am using this hardware: http://www.picbasic.co.uk/forum/showthread.php?t=10820 running at 48mhz.

    You are using the right syntax, so I can't really find the problem.

    The PrintVar is how I am printing the word variables in this example: http://www.picbasic.co.uk/forum/cont...-axis-g-sensor

    You want to post your code, and I will see if if runs on my hardware? I don't have an easy way to change my hardware for the display.
    Last edited by ScaleRobotics; - 4th July 2010 at 17:11.

  10. #10
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default

    Hi Walter,

    Attached code for the 18F252 also an edited copy of your Include file - only a few small font changes but it's what I'm using so here it is.

    I tried using Variable in place of j but same result. I'm sure it is something simple but I can't see it...

    Thanks for your help,
    Bill
    Attached Files Attached Files

  11. #11
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default $2.95 glcd

    The Nokia 3310 display just became available at Sparkfun for $2.95 each. Pretty good price for what it can do! You can check it out here http://www.sparkfun.com/commerce/pro...oducts_id=9924. Here is the wiki page about interfacing it, based on posts in this thread: http://www.picbasic.co.uk/forum/cont...Nokia-3310-LCD
    Last edited by ScaleRobotics; - 5th June 2010 at 06:52.

  12. #12
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default @ PrintVar x,y, _anyvariable - example? Having problems...

    Hi Walter,

    Great job on your macro for the Nokia 3310 LCD, so much so that I think I'll move across to using these instead of the 16x2 I've been using everywhere so far. Thank you.

    I'm not having much luck getting the @ PrintVar x,y, _anyvariable to work though. I declare a word variable in my main program (j var word), give it a value to test (j=12345) then
    @ PrintVar 0,4, _j
    but only random values print and only 2 or 3 characters. Weird.

    Can you perhaps show me a working section of how to do it please? I'm using PbP 2.60, 18F252.

    Thanks and regards,
    Bill

Similar Threads

  1. Nokia COLOR LCD PicBasicPro 2.50a example code
    By skimask in forum Code Examples
    Replies: 49
    Last Post: - 28th September 2011, 01:43
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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