Page 1 of 1

Nokia 5110 gLCD

Posted: Fri Dec 28, 2012 11:48 pm
by opieflus
Probably a easier way to do this, but I only have the home edition of Flowcode and I like a challenge. I have ported a .asm program I found to do a "Hello world!" message and small graphic to Flowcode. If anybody is interested in continuing on with my work, here is the .fcf file. The processor used is a PIC 16F1937. I do not know of an easy way to split up the bits from a byte so I sent the byte to port d and read each bit into a variable in order to get and set individual bytes. As far as I know the communication uses SPI. As I have stated on my other posts, I am an amateur when it comes to Flowcode, .asm, and C. Any constructive criticism, suggestions and comments are welcome.

EDITED - old file deleted. New version available. See other post.

Nokia 5110 gLCD finally ported for Flowcode!

Posted: Mon Dec 31, 2012 9:04 am
by opieflus
I have just finished porting a Nokia 5110 gLCD to work with Flowcode. All normal characters are available. No graphics yet. This program is a very custom job because Flowcode does not support this gLCD as of yet that I am aware of.

The functions are used via normal macro routines instead of Flowcodes built-in macro routines. As long as you do not go messing around with the macros, it should work just fine for you.

I have put on a small demo with a few timers and "Hello world!" message.

Have fun! And happy new year!

File edited/updated - Notations now included at top of file.

Re: Nokia 5110 gLCD

Posted: Fri Jan 11, 2013 3:36 am
by opieflus
New update! Graphics are now included. Bitmap array, vertical and horizontal lines, and a scale are included. I no longer use the hacked led macro to get the defines and rom array in. All defines and rom array settings are in supplementary code section.

Re: Nokia 5110 gLCD

Posted: Wed Nov 25, 2015 8:54 pm
by fernandosartorelli
Hello!
I have nokia 5110 screen and wanted to test your file.
When I try to compile I get many errors :x . Flowcode V5.
What will be my problem of not being able to compile?
Thank you!!

Re: Nokia 5110 gLCD

Posted: Wed Nov 25, 2015 9:22 pm
by medelec35
Hi fernandosartorelli,
What version of Flwocode V5 have you got?
I have V5.5.2.1 (30.01.2013) and compiles for me with no errors.
Can you attach

Code: Select all

Nokia 5110 with graphics.msg.txt
file so someone can spot whats gong on.

Martin

Re: Nokia 5110 gLCD

Posted: Thu Nov 26, 2015 3:49 pm
by fernandosartorelli
Hello Martin!
Thanks for answering!
FC version is 5.1
Try to change case but nothing.
Thank you
Nokia 5110 with graphics.msg.txt
(8.07 KiB) Downloaded 624 times

Code: Select all

File name:     E:\Alarmas\cosas\Nokia 5110\Nokia 5110 with graphics.c
         
Description:   
Generated by:  Flowcode v5.1.0.0
Date:          Thursday, November 26, 2015 11:37:41

Iniciando el compilador…
C:\Program Files\Flowcode\v5\Tools\boostc\boostc_pic16_flowcode.exe -v -t PIC16F1937 "Nokia 5110 with graphics.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday

Nokia 5110 with graphics.c
Starting preprocessor: C:\PROGRA~1\Flowcode\v5\Tools\boostc\pp.exe "Nokia 5110 with graphics.c" -i C:\PROGRA~1\Flowcode\v5\Tools\boostc\include -d _PIC16F1937 -la -c2 -o "Nokia 5110 with graphics.pp" -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX 


.......

Nokia 5110 with graphics.c(1085:6): error: unknown identifier 'FCL_COMMAND'
Nokia 5110 with graphics.c(1085:6): error: invalid operand 'FCL_COMMAND'
Nokia 5110 with graphics.c(1085:18): error: failed to generate expression
Nokia 5110 with graphics.c(1092:6): error: unknown identifier 'FCL_LCDOUT'
Nokia 5110 with graphics.c(1092:6): error: invalid operand 'FCL_LCDOUT'
Nokia 5110 with graphics.c(1092:17): error: failed to generate expression
Nokia 5110 with graphics.c(1104:2): error: unknown identifier 'FCL_LCDOUT'
Nokia 5110 with graphics.c(1104:2): error: invalid operand 'FCL_LCDOUT'
Nokia 5110 with graphics.c(1104:13): error: failed to generate expression
Nokia 5110 with graphics.c(1143:24): error: unknown identifier 'FCL_X_POSITION_0TO83'
Nokia 5110 with graphics.c(1143:24): error: invalid operand 'FCL_X_POSITION_0TO83'
Nokia 5110 with graphics.c(1143:22): error: failed to generate expression
Nokia 5110 with graphics.c(1143:14): error: arguments of 'FCM_SendByte' don't match the parameters of call
Nokia 5110 with graphics.c(1143:2): error: failed to generate expression
Nokia 5110 with graphics.c(1144:24): error: unknown identifier 'FCL_Y_POSITION_0TO5'
Nokia 5110 with graphics.c(1144:24): error: invalid operand 'FCL_Y_POSITION_0TO5'
Nokia 5110 with graphics.c(1144:22): error: failed to generate expression
Nokia 5110 with graphics.c(1144:14): error: arguments of 'FCM_SendByte' don't match the parameters of call
Nokia 5110 with graphics.c(1144:2): error: failed to generate expression
Nokia 5110 with graphics.c(1155:11): error: unknown identifier 'PFCL_STRING'
Nokia 5110 with graphics.c(1155:9): error: arguments of 2 overloads of 'strlen8' don't match the parameters of call
Nokia 5110 with graphics.c(1155:2): error: failed to generate expression
Nokia 5110 with graphics.c(1155:2): error: invalid operand 'strlen8( PFCL_STRING )
# 1155
'
Nokia 5110 with graphics.c(1155:13): error: failed to generate expression
Nokia 5110 with graphics.c(1160:13): warning: local variable 'length_Str' may be used uninitialized
Nokia 5110 with graphics.c(1163:14): error: unknown identifier 'PFCL_STRING'
Nokia 5110 with graphics.c(1163:14): error: invalid operand 'PFCL_STRING'
Nokia 5110 with graphics.c(1163:26): error: failed to generate expression
Nokia 5110 with graphics.c(1163:12): error: invalid operand '*(PFCL_STRING + i) '
Nokia 5110 with graphics.c(1163:31): error: failed to generate expression
Nokia 5110 with graphics.c(1163:31): error: invalid operand '- '
Nokia 5110 with graphics.c(1163:10): error: failed to generate expression
Nokia 5110 with graphics.c(1167:6): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1169:14): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1172:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1174:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1177:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1179:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1182:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1184:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1187:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1189:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1192:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1194:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1197:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1199:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1202:11): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1204:15): warning: local variable 'pos_Str' may be used uninitialized
Nokia 5110 with graphics.c(1221:25): error: unknown identifier 'FCL_X_POSITION'
Nokia 5110 with graphics.c(1221:25): error: invalid operand 'FCL_X_POSITION'
Nokia 5110 with graphics.c(1221:23): error: failed to generate expression
Nokia 5110 with graphics.c(1221:14): error: arguments of 'FCM_SendByte' don't match the parameters of call
Nokia 5110 with graphics.c(1221:2): error: failed to generate expression
Nokia 5110 with graphics.c(1222:25): error: unknown identifier 'FCL_Y_POSITION'
Nokia 5110 with graphics.c(1222:25): error: invalid operand 'FCL_Y_POSITION'
Nokia 5110 with graphics.c(1222:23): error: failed to generate expression
Nokia 5110 with graphics.c(1222:14): error: arguments of 'FCM_SendByte' don't match the parameters of call
Nokia 5110 with graphics.c(1222:2): error: failed to generate expression
Nokia 5110 with graphics.c(1240:6): error: unknown identifier 'FCL_BITMAP_NUMBER'
Nokia 5110 with graphics.c(1240:6): error: invalid operand 'FCL_BITMAP_NUMBER'
Nokia 5110 with graphics.c(1240:24): error: failed to generate expression
Nokia 5110 with graphics.c(1256:6): error: unknown identifier 'FCL_BITMAP_NUMBER'
Nokia 5110 with graphics.c(1256:6): error: invalid operand 'FCL_BITMAP_NUMBER'
Nokia 5110 with graphics.c(1256:24): error: failed to generate expression
Nokia 5110 with graphics.c(1293:6): error: unknown identifier 'PFCL_X_OR_Y_LINE'
Nokia 5110 with graphics.c(1293:6): error: invalid operand 'PFCL_X_OR_Y_LINE'
Nokia 5110 with graphics.c(1293:23): error: failed to generate expression
Nokia 5110 with graphics.c(1302:6): error: unknown identifier 'PFCL_X_OR_Y_LINE'
Nokia 5110 with graphics.c(1302:6): error: invalid operand 'PFCL_X_OR_Y_LINE'
Nokia 5110 with graphics.c(1302:23): error: failed to generate expression
Nokia 5110 with graphics.c(1323:14): error: unknown identifier 'FCL_X_START'
Nokia 5110 with graphics.c(1323:13): error: arguments of 'FCM_Goto_XY' don't match the parameters of call
Nokia 5110 with graphics.c(1323:2): error: failed to generate expression
Nokia 5110 with graphics.c(1325:6): error: unknown identifier 'FCL_SCALE_INPUT'
Nokia 5110 with graphics.c(1325:6): error: invalid operand 'FCL_SCALE_INPUT'
Nokia 5110 with graphics.c(1325:22): error: failed to generate expression
Nokia 5110 with graphics.c(1328:11): error: unknown identifier 'FCL_X_START'
Nokia 5110 with graphics.c(1328:11): error: invalid operand 'FCL_X_START'
Nokia 5110 with graphics.c(1328:9): error: failed to generate expression
Nokia 5110 with graphics.c(1328:9): internal error: failed to generate 'for' expression
Nokia 5110 with graphics.c(1328:2): error: error in 'for' loop statement
Nokia 5110 with graphics.c(1331:11): error: unknown identifier 'FCL_SCALE_INPUT'
Nokia 5110 with graphics.c(1331:11): error: invalid operand 'FCL_SCALE_INPUT'
Nokia 5110 with graphics.c(1331:9): error: failed to generate expression
Nokia 5110 with graphics.c(1331:9): internal error: failed to generate 'for' expression
Nokia 5110 with graphics.c(1331:2): error: error in 'for' loop statement
Nokia 5110 with graphics.c success

failure
Código de retorno = 1
Flowcode no pudo compilar el código C del diagrama de flujo por los siguientes errores:


Si su diagrama de flujo contiene código C, revíselo cuidadosamente.  Si su diagrama de flujo no contiene código C o si ya ha revisado el código C, contactese con Soporte Técnico.


FINALIZADO

Re: Nokia 5110 gLCD

Posted: Thu Nov 26, 2015 6:31 pm
by kersing
fernandosartorelli wrote:FC version is 5.1
That is a very old version. I would suggest you update to V5.5.2.1.

Re: Nokia 5110 gLCD

Posted: Mon May 23, 2016 8:17 pm
by mikn
Will this library work with FC 6?
Where should I put the file?

Re: Nokia 5110 gLCD

Posted: Mon May 23, 2016 10:17 pm
by kersing
This is not a library, Flowcode 5 does not support libraries. It is a flowchart you should be able to open (make sure to select Flowcode for PIC files in the bottom right corner of the open window).