LCD Help needed, 16x2s are boring - Page 5 - Netduino 2 (and Netduino 1) - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

LCD Help needed, 16x2s are boring


  • Please log in to reply
100 replies to this topic

#81 mikepo

mikepo

    Member

  • Members
  • PipPip
  • 29 posts

Posted 19 May 2011 - 01:07 PM

the display is 84x84 pixels, so each character needs to be defined by a bitmap telling which bits are on and off for a given character. Here is a little background if you are interested: http://www.instructa...g-a-custom-font

If you look at the first page of this thread, on the 7th post or so at the bottom it says:
"Notes: "NokiaCharacters.ASCII" is a public static class that contains the "public static byte[] ASCII = new byte[] {....};" thing. "

Basically take the byte array called ASCII from the 5th post on the first page and put it in its own class called NokiaCharacters.
Alternatively you could put the byte array right into your code.

Hope that helps,
Mike

#82 K0demonkey

K0demonkey

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationRochester, NY

Posted 19 May 2011 - 05:14 PM

the display is 84x84 pixels, so each character needs to be defined by a bitmap telling which bits are on and off for a given character. Here is a little background if you are interested: http://www.instructa...g-a-custom-font

If you look at the first page of this thread, on the 7th post or so at the bottom it says:
"Notes: "NokiaCharacters.ASCII" is a public static class that contains the "public static byte[] ASCII = new byte[] {....};" thing. "

Basically take the byte array called ASCII from the 5th post on the first page and put it in its own class called NokiaCharacters.
Alternatively you could put the byte array right into your code.

Hope that helps,
Mike


Mike & All ...

Thanks so much for the help. Everything works!

Posted Image

Now on to get to email working. :D

#83 geduxaz

geduxaz

    New Member

  • Members
  • Pip
  • 4 posts

Posted 19 May 2011 - 07:03 PM

Mike & All ...

Thanks so much for the help. Everything works!

Posted Image

Now on to get to email working. :D


try lowering your contrast. it will look nicer

#84 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 12 July 2011 - 09:57 PM

Hello, I do not understand electronics and I’m starting with the development for netduino, I would like to know if you could tell me how to connect the LCD Nokia 5110 on the netduino with this breadboard.
O coração tem razões que a própria razão desconhece.

#85 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 13 July 2011 - 08:29 AM

Hello, I do not understand electronics and I’m starting with the development for netduino, I would like to know if you could tell me how to connect the LCD Nokia 5110 on the netduino with this breadboard.

I have exactly the same LCD, if you're patient, I shall try it later this week and post a breadboard-view on the wiki and PM you when it's done.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#86 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 13 July 2011 - 12:58 PM

Hello Stefan, thanks again for the help, I'll wait then.
O coração tem razões que a própria razão desconhece.

#87 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 14 July 2011 - 08:50 PM

Hello Stefan, thanks again for the help, I'll wait then.

I'm going to make a wiki about it, but I used:
- NETMF Code (and help) from Omar
- Help from Steven (bitmap part on PC)

Posted Image

I can convert JPEG's, GIF's, etc. to a format that can be displayed on the display. Also, Omar's text-functions work superb.
When the wiki page is completed, I shall post again. (won't be today, needs some rest)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#88 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 14 July 2011 - 10:07 PM

Stefan you were much faster than I could wish, :o
O coração tem razões que a própria razão desconhece.

#89 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 15 July 2011 - 04:11 PM

Stefan you were much faster than I could wish, :o

http://wiki.netduino...hx?NoRedirect=1
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#90 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 16 July 2011 - 05:26 PM

http://wiki.netduino...hx?NoRedirect=1


Thanks again, and sorry for the quality of the image. ;)

Posted Image
O coração tem razões que a própria razão desconhece.

#91 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 16 July 2011 - 05:48 PM

Thanks again, and sorry for the quality of the image. ;)

The image gives a 404 here? :P
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#92 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 18 July 2011 - 11:44 AM

The image gives a 404 here? :P


My fault, now is ok. B)
O coração tem razões que a própria razão desconhece.

#93 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 18 July 2011 - 11:55 AM

My fault, now is ok. B)

woah! that backlight is bright! :D
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#94 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 18 July 2011 - 12:09 PM

*** OFF TOPIC *** Eduardo, what it means your signature?...I understand only "The heart..." Sound interesting! Cheers
Biggest fault of Netduino? It runs by electricity.

#95 Eduardo

Eduardo

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationSão Paulo, Brasil

Posted 18 July 2011 - 12:59 PM

*** OFF TOPIC ***
Eduardo, what it means your signature?...I understand only "The heart..."
Sound interesting!
Cheers


Hello Mario,

It is one of the most famous quotes by Blaise Pascal (Pensées book), I think in English would be something like
"The heart has reasons that reason cannot know."
O coração tem razões que a própria razão desconhece.

#96 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 18 July 2011 - 01:26 PM

"The heart has reasons that reason cannot know."

Very beautiful, and so very true ;)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#97 fileark

fileark

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationNM

Posted 19 July 2011 - 04:24 AM

Stefan, I downloaded the project from the wiki page Nokia 3310 LCD

After trying to open the project it insinuated that I needed to upgrade to the 4.2 beta SDK and firmware, after upgrading I get the below output saying I need 4.1 again, I assume I can edit some files to fix? I am trying to find it now, not sure what I am doing, thanks for the help.




Resolving.

Link failure: some assembly references cannot be resolved!!


Assembly: SecretLabs.NETMF.Hardware.NetduinoPlus (4.1.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)

Assembly: SecretLabs.NETMF.Hardware.NetduinoPlus (4.1.0.0) needs assembly 'mscorlib' (4.1.2821.0)

Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) needs assembly 'mscorlib' (4.1.2821.0)

Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)

Assembly: Nokia 5100 LCD (1.0.0.0) needs assembly 'SecretLabs.NETMF.Hardware' (4.1.0.0)

Assembly: Nokia 5100 LCD (1.0.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)

Error: a3000000

Waiting for debug commands...

The program '[1] Micro Framework application: Managed' has exited with code 0 (0x0).


#98 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 19 July 2011 - 06:38 AM

Stefan, I downloaded the project from the wiki page Nokia 3310 LCD

After trying to open the project it insinuated that I needed to upgrade to the 4.2 beta SDK and firmware, after upgrading I get the below output saying I need 4.1 again, I assume I can edit some files to fix? I am trying to find it now, not sure what I am doing, thanks for the help.

Hi :)

I just seen that the code for the LCD indeed has 4.2 as Target Framework Version. The version needs to be correct at 3 points:
- Visual Studio (can be changed, so you actually don't need to change firmware); go to the project's properties and modify the target framework.
- Software Development Kit (If you install the 4.2 SDK, it will also install the 4.1 SDK)
- Netduino Firmware (see http://wiki.netduino...ep-by-step.ashx for guidelines)

Updating the netduino to 4.2 doesn't need to be done. Which firmware do you currently have in your Netduino? You can find that out by starting MFDeploy.exe (at default installed at "C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Tools"), select USB->Netduino and click Target->Device Capabilities. This is an example of the firmware version:
SolutionReleaseInfo.solutionVendorInfo: Netduino (v4.2.0.0 b1) by Secret Labs LLC
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#99 fileark

fileark

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationNM

Posted 20 July 2011 - 03:46 AM

...-go to the project's properties and modify the target framework.
...- Netduino Firmware (see http://wiki.netduino...ep-by-step.ashx for guidelines)


Well, after setting the target framework in the .csproj to 4.1 and spending about three hours trying to revert my bricked Netduino+ firmware back to 4.1.1.0 after my botched attempt to upgrade it to 4.2, finally got it to work, thanks!

I love these little GLCD screens, will post if I make anything interesting.

#100 Eugene B

Eugene B

    New Member

  • Members
  • Pip
  • 2 posts

Posted 20 August 2011 - 05:16 AM

Hi guys,

I've played a little with the code and found that we can't use text functions together with graphics - the text goes directly to the LCD than the graphic gets into the buffer first and than whole buffer transferred to display.
So I added functions DrawString and DrawChar that draw string into buffer first, so it can be combined with graphics and shown by calling Lcd.Refresh() function:

public void DrawString(int x, int line, string str, bool mode)
        {
            foreach (char c in str)
            {
                DrawCharacter(x, line, c,mode);

                x += 5; // 6 pixels wide

                if (x + 5 >= 84)
                {
                    x = 0;    // ran out of this line
                    line++;
                }

                if (line >= 48 / 8)
                {
                    return;        // ran out of space :(
                }
            }
        }

        protected void DrawCharacter(int x, int line, char c, bool mode)
        {
            for (int i = 0; i < 5; i++)
            {
                if (mode)
                    ByteMap[x + (line * 84)+ i] |= NokiaCharacters.ASCII[c - 0x20][i];
                else
                    ByteMap[x + (line * 84) + i] |=(byte) ~NokiaCharacters.ASCII[c - 0x20][i];
                //x++;
            }
        }

Regards,
Eugene




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.