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

    Thanks for reply !
    The display show like in picture from post #116. But pushing the buttons '+' , '-' or 'Mode' has no effect.

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


    Did you find this post helpful? Yes | No

    Default

    Hello Fratello,

    I have been looking over your code for a while now. I have not found anything obvious to me, although there may be something obvious to others.

    One thing I did notice, is that your MainLoop will cycle through modes 0, 1, and 2, even without any buttons being pressed. This is fine, but one thing you are doing in mode 2, and after mode 2, is writing to the eeprom. At 4 mhz, you will reach that 1,000,000 write cycles quicker than you think (have not calculated it, but if this is really going to be a thermostat, I assume it is going to be running for a while). A better way to do it would be to only write the targettemp, etc to the eeprom when targettemp is different than the eeprom value for targettemp (ie, it has been adjusted).

    Seems like the next step is to see if the 16f628a even knows if the buttons have been pressed. Why not make a simple light an LED line inside some of your if then statements to verify the chip knows a button has been pressed? This could help point to the source of the problem.

    Walter

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


    Did you find this post helpful? Yes | No

    Default

    The code works PERFECT with LCD 2x16...I just try to insert the parts for Nokia display...(and removing, of course, the parts for other display). I think the problems are generated by wrong 'substitution'. Thanks anyway for reply !

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


    Did you find this post helpful? Yes | No

    Default

    That's great! If it is working perfectly with the 2 x 16 lcd, you should be seeing the new changed values in your eeprom. This should be an indication that only your LCD_3310 code is bad, and that the thermostat functions are working!

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi fratello, Do you have pullup resistors on those switches ? You do not have WPU enabled, so you need them, or change the Option_Reg, to enable them.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    Me again !
    I found the mistake ; after MainLoop the code must be :
    If PortB.3=0 then ; this is the missing line
    If PortB.3=0 then MainLoop
    ...
    ...
    Endif
    Endif

    Work correct on pushing MODE button , but...
    Now I have another problem... I attach the code for display the temperature in both cases (LCD 2X16 ; N3310).
    How do I convert this line :
    LcdOut $FE, $C0, "OUT ", Sign, DEC (Temperature2 / 100), ".", DEC2 Temperature2, " ",223,"C "
    for correct results on Nokia display ?
    DEC (Temperature2 /100) it's what char ?
    DEC2 Temperature2 it's what char ?
    I try many codes but on display appears numbers and strange characters....
    Thanks !
    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

    Quote Originally Posted by fratello View Post
    How do I convert this line :
    LcdOut $FE, $C0, "OUT ", Sign, DEC (Temperature2 / 100), ".", DEC2 Temperature2, " ",223,"C "
    for correct results on Nokia display ?
    DEC (Temperature2 /100) it's what char ?
    DEC2 Temperature2 it's what char ?
    Here I am assuming that at 25.1 degrees c , Temperature2 = 2510
    On yours, it looks like it would be:
    Code:
    char = (Temperature2 dig 3) + 2      'get digit 3 ("2"510) and add 2 so it matches eeprom  
           move x y to right location and print it   'do whatever you do to print to lcd
    char = (Temperature2 dig 2) + 2      'get digit 2 (2"5"10) and add 2
           move x y to right location and print it   
    char = 14                            'in you eeprom this is a "."
           move x y to right location and print it   
    char = (Temperature2 dig 1) + 2      'get digit 1 (25"1"0) and add 2
           move x y to right location and print it
    But I thought from your picture in post #116 that you were printing temperature already?

    Now I am confused again...

    I now see that your change to MainLoop fixes the write to eeprom every cycle problem too. Very nice.
    Last edited by ScaleRobotics; - 26th April 2009 at 22:06.

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


    Did you find this post helpful? Yes | No

    Default

    THANK YOU ! And THANK YOU ALL !
    It's work ! Yes !!!!!! I'm -once again, thanks to you, all- happy !
    This is the 1.0 version of code for dual zone & thermostat with Nokia 3310 display ! All the best to all !
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Version 2. Some minors but necessary modifications. Tested - function of thermostat work fine. Not tested for negative temperatures...
    Attached Images Attached Images  
    Attached Files Attached Files

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