Jump to content
43oh

Time & Temperature on Nokia 7110


Recommended Posts

I sincerely apologise for the previous publication.

 

I scrapped the whole project, even I've duly mentioned the work from Messiers SugarAddict, oPossum and MikroElektronika on the ReadMe.txt file.

 

From now on, I'll submit my code for review to the project manager energia, before it is released.

 

By doing so, I hope to fully abide all

Link to post
Share on other sites

Sorry about the confusion over the license. Anything I post here is for others to learn from and use in any way they want. I don't really care much if I get credit for it. Any exceptions to this would be clearly noted. I have not put a copyright and GPLv3 notice in most of the code I have posted here because the presence of a copyright can give the impression that the code may not be copied and used by others. I certainly don't want to give that impression. Any code I have posted here without specific license is GPLv3 - Copyright 201x Kevin Timmerman

Link to post
Share on other sites
  • 1 year later...

Did anyone tried to port this to a Nokia 5110 LCD?

I'm trying to do that but i'm with problems with the library on the functions I've ported: "fill", "print" and "pd12".

 

 

With pd12 and fill I get this:

template <volatile unsigned char &_SP, unsigned char _CLK, unsigned char _DATA, volatile unsigned char &_CP, unsigned char _DC, volatile unsigned char &_EP, unsigned char _CE, unsigned _RST>
void Nokia5110<_SP, _CLK, _DATA, _CP, _DC, _EP, _CE, _RST>::pd12(unsigned n, unsigned x, unsigned y)
{
    pos(x, y);   write(num11x16[n], 11, lcd_data);
    pos(x, ++y); write(num11x16[n] + 11, 11, lcd_data);
}

And this is the error:

#136 class template "nokia5110::Nokia5110<_SP, _CLK, _DATA, _CP, _DC, _EP, _CE, _RST>" has no member "pd12"

With print:

template <volatile unsigned char &_SP, unsigned char _CLK, unsigned char _DATA, volatile unsigned char &_CP, unsigned char _DC, volatile unsigned char &_EP, unsigned char _CE, unsigned _RST>
void Nokia5110<_SP, _CLK, _DATA, _CP, _DC, _EP, _CE, _RST>::print(const char *s, unsigned char m)
{
    unsigned char c;
    while(*s) {
        c = font[*s - 32][0] ^ m; write(&c, 1);
        c = font[*s - 32][1] ^ m; write(&c, 1);
        c = font[*s - 32][2] ^ m; write(&c, 1);
        c = font[*s - 32][3] ^ m; write(&c, 1);
        c = font[*s - 32][4] ^ m; write(&c, 1);
        write(&m, 1);
        ++s;
    }
}

This is the error:

#495 no instance of overloaded function "nokia5110::Nokia5110<_SP, _CLK, _DATA, _CP, _DC, _EP, _CE, _RST>::print" matches the specified type

I don't know what's happening, since I paste all the functions according to the "model" on the others already written...

 

 

 

EDIT:

I found what the problem was (I needed to call the functions on the struct and I forgot about that...) but know I'm getting a problem in function show_time:

 

In this function:

lcd.print((unsigned char)x, (unsigned char)4, s);

I get this:

#306 no instance of overloaded function "nokia5110::Nokia5110<_SP, _CLK, _DATA, _CP, _DC, _EP, _CE, _RST>::print [with _SP=P1OUT, _CLK=(unsigned char)' ', _DATA=(unsigned char)'\200', _CP=P1OUT, _DC=(unsigned char)'\001', _EP=P1OUT, 
 _CE=(unsigned char)'\020', _RST=10000U]" matches the argument list

Does anyone knows what's happening? :-(

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...