Propellor Clock POV Style Display Example Code
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Do you maybe need some delays in there? Otherwise your program looks fine. Are you getting compile errors still or is nothing happening on the chip? Could it be a config issue?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
pov test.c(166): error: failure
It is not compiling in any way. I put rom char* in supplementary code. void printChar(char letter) in function imiplementation. It did not compile. I also tried to put all code on c block and void printChar(char letter) in main c code block, but compiler does not compile. Sir, if you get a bit time free, plz put it in your program and compile to see if it is working or problem with demo flowcode v5.
There should be lession or tuturial on c block work eg; how to use c code block if someone tries to convert a mickro C program to flowcode, what changes should be make and what to consider.
It is not compiling in any way. I put rom char* in supplementary code. void printChar(char letter) in function imiplementation. It did not compile. I also tried to put all code on c block and void printChar(char letter) in main c code block, but compiler does not compile. Sir, if you get a bit time free, plz put it in your program and compile to see if it is working or problem with demo flowcode v5.
There should be lession or tuturial on c block work eg; how to use c code block if someone tries to convert a mickro C program to flowcode, what changes should be make and what to consider.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
The problem with a tutorial etc is that every compiler is different and they seem to change the way of doing things too so that it may work in one version but not in the next.
Glad you got it working though.
The problem with a tutorial etc is that every compiler is different and they seem to change the way of doing things too so that it may work in one version but not in the next.
Glad you got it working though.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
Great to know that you are keeping eye on my progress and helping me out!! thanks.
I did make complete LUT table from c file of glcd as:
ROMARRAY_S gLCD_1_ASCII7 ROMARRAY_E = {.....} etc
ROMARRAY_S gLCD_1_ASCII8 ROMARRAY_E = {.....} etc
etc
When compiled it showed
RAM available:368 bytes, used:43 bytes (11.7%), free:325 bytes (88.3%),
when the same table was made with rom char* it was error of insufficient ram.
What is ROMARRAY_S and ROMARRAY_E. Is is custom boostc command for flowcode and if so how to use it as when i made LUT with ROMARRAY_S AAAAA = {.....}; etc.. full LUT talbe as in glcd. It compiled with less RAM use.
Plz explain ROMARRAY_S and ROMARRAY_E as it is not in tutorial or forum, as it is great to make large LUT with less RAM usage and why not we should use it instead of rom char*?
I hope this query will help a lot in forum.
Thanks in Advance !!!!!
I did make complete LUT table from c file of glcd as:
ROMARRAY_S gLCD_1_ASCII7 ROMARRAY_E = {.....} etc
ROMARRAY_S gLCD_1_ASCII8 ROMARRAY_E = {.....} etc
etc
When compiled it showed
RAM available:368 bytes, used:43 bytes (11.7%), free:325 bytes (88.3%),
when the same table was made with rom char* it was error of insufficient ram.
What is ROMARRAY_S and ROMARRAY_E. Is is custom boostc command for flowcode and if so how to use it as when i made LUT with ROMARRAY_S AAAAA = {.....}; etc.. full LUT talbe as in glcd. It compiled with less RAM use.
Plz explain ROMARRAY_S and ROMARRAY_E as it is not in tutorial or forum, as it is great to make large LUT with less RAM usage and why not we should use it instead of rom char*?
I hope this query will help a lot in forum.
Thanks in Advance !!!!!
Last edited by mtqc76 on Fri Sep 14, 2012 2:59 pm, edited 1 time in total.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
If your using BoostC (the deafult Flowcode PIC compiler) and creating your ROM arrays like this.
rom char * data = {0x00,0x00,0x00,0x00};
Then the variable should be being stored into ROM and not RAM.
Are you using other variables in your program that could be eating up all your RAM e.g. a screen buffer array or anything like this?
If you attach your Flowcode or C file to your next post then hopefully I will be able to help you a bit better.
If your using BoostC (the deafult Flowcode PIC compiler) and creating your ROM arrays like this.
rom char * data = {0x00,0x00,0x00,0x00};
Then the variable should be being stored into ROM and not RAM.
Are you using other variables in your program that could be eating up all your RAM e.g. a screen buffer array or anything like this?
If you attach your Flowcode or C file to your next post then hopefully I will be able to help you a bit better.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
sir i got the solution, i edited the last post and it is working fine in proteus, project is not complete yet but i will ask you if i get stuck. anyhow thanks for great help.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
For BoostC the definitions look like this.
For HiTech they are like this.
For BoostC the definitions look like this.
Code: Select all
#define MX_STRING unsigned char*
#define ROMARRAY_S rom MX_STRING
#define ROMARRAY_E
Code: Select all
typedef unsigned char MX_UINT8;
#define ROMARRAY_S const MX_UINT8
#define ROMARRAY_E []
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
Plz in little detail specific to:
1. Difference between rom char* and ROMARRAY_S and ROMARRY_E and significance.
2. Cannot we use ROMARRAY_S and ROMARRY_E instead of rom char* to free RAM.
Sir, I have managed to make a clock and for dummy first to display second. i am currently using 628a portb for it. i want to know what i have to do ie configure so that all pins of porta be available as ouput pin and use internal oscillator. I tweak the oscillator configuration for internal oscillator, seems working, but how to enable all i/o pin of porta.
Thanks in advance.
1. Difference between rom char* and ROMARRAY_S and ROMARRY_E and significance.
2. Cannot we use ROMARRAY_S and ROMARRY_E instead of rom char* to free RAM.
Sir, I have managed to make a clock and for dummy first to display second. i am currently using 628a portb for it. i want to know what i have to do ie configure so that all pins of porta be available as ouput pin and use internal oscillator. I tweak the oscillator configuration for internal oscillator, seems working, but how to enable all i/o pin of porta.
Thanks in advance.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
I was trying to show you that "rom char*" and "ROMARRAY_S" are the same things, so you can use either.
You should be able to use a output icon to control the port a pins.
I was trying to show you that "rom char*" and "ROMARRAY_S" are the same things, so you can use either.
You should be able to use a output icon to control the port a pins.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
sir need one query more:
i want to make a routine to print icon in c block.
char SMILE: (why need to char SMILE? without it does not compile and compiler tells that it may be used without initializtion)
printIcon(SMILE);
in defination and function declaration:
ROMARRAY_S SMILE ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
in function implementation:
void printIcon(char icon)
{
int n;
for(n=0;n<18;n++){
if(icon == SMILE) portb = SMILE[n];
} }
problem is that it compiled, but in sumulation on proteus it does not work. It is not getting SMILE table.
It is working if I make it this way printIcon('S'); and if(icon == 'S') portb = SMILE[n];
What is wrong, how should it i use first method?
i want to make a routine to print icon in c block.
char SMILE: (why need to char SMILE? without it does not compile and compiler tells that it may be used without initializtion)
printIcon(SMILE);
in defination and function declaration:
ROMARRAY_S SMILE ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
in function implementation:
void printIcon(char icon)
{
int n;
for(n=0;n<18;n++){
if(icon == SMILE) portb = SMILE[n];
} }
problem is that it compiled, but in sumulation on proteus it does not work. It is not getting SMILE table.
It is working if I make it this way printIcon('S'); and if(icon == 'S') portb = SMILE[n];
What is wrong, how should it i use first method?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
The problem is that this will not work "if(icon == SMILE)" because smile is a byte array and you are comparing with a char variable. The name of the variable is inconsequential to the compiler so it is looking for a type char variable with the name SMILE.
I would maybe do it like this.
This way you can add more icons and index them from 0 to the max number of icons - 1.
eg.
The problem is that this will not work "if(icon == SMILE)" because smile is a byte array and you are comparing with a char variable. The name of the variable is inconsequential to the compiler so it is looking for a type char variable with the name SMILE.
I would maybe do it like this.
Code: Select all
#define MAX_ICONS 1
ROMARRAY_S ICON0 ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
#define ICON0_SIZE 18
void printIcon(char icon)
{
int n;
if (icon >= MAX_ICONS)
return;
for(n=0;n<ICON0_SIZE;n++)
{
if(icon == 0) portb = ICON0[n];
}
}
eg.
Code: Select all
#define MAX_ICONS 3
ROMARRAY_S ICON0 ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
#define ICON0_SIZE 18
ROMARRAY_S ICON1 ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
#define ICON1_SIZE 18
ROMARRAY_S ICON2 ROMARRAY_E= {0,0,126,129,129,137,133,165,133,133,133,165,133,137,129,129,126,0};
#define ICON2_SIZE 18
void printIcon(char icon)
{
int n;
if (icon >= MAX_ICONS)
return;
if(icon == 0)
{
for(n=0;n<ICON0_SIZE;n++)
{
portb = ICON0[n];
}
}
if(icon == 1)
{
for(n=0;n<ICON1_SIZE;n++)
{
portb = ICON1[n];
}
}
if(icon == 2)
{
for(n=0;n<ICON2_SIZE;n++)
{
portb = ICON2[n];
}
}
}
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
great sir; its working......
printicon(0);printicon(1); etc.......
what if i want to make readable command like
printicon(smily);
printicon(funny); for know what i am printing on POV for ease. I think there should be way to do it.....Your last post really did increase knowledge and i am feeling comfortable now in grasping project and its theory how pov works.....thanks you..
Is there a directory or pdf which contain information of boostc/hi-tech compiler definations, syntax etc for reference and its example to know how to use it with reference to flowcode?
printicon(0);printicon(1); etc.......
what if i want to make readable command like
printicon(smily);
printicon(funny); for know what i am printing on POV for ease. I think there should be way to do it.....Your last post really did increase knowledge and i am feeling comfortable now in grasping project and its theory how pov works.....thanks you..
Is there a directory or pdf which contain information of boostc/hi-tech compiler definations, syntax etc for reference and its example to know how to use it with reference to flowcode?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
Here is a v5 example using defines.
The v5 BoostC folder is located here.
C:\Program Files (x86)\Flowcode\v5\Tools\boostc
The v4 folder here.
C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\boostc
I don't think there is a way of doing this without using a lot of variables (not recommended due to RAM usage) or defines. You could create variables or definitions (v5 onwards) called the various names and then pass the names when calling the function.what if i want to make readable command like printicon(smily);
Here is a v5 example using defines.
In the main BoostC folder is a file called boostc.pdf which is a manual for the compiler.Is there a directory or pdf which contain information of boostc/hi-tech compiler definations, syntax etc for reference and its example to know how to use it with reference to flowcode?
The v5 BoostC folder is located here.
C:\Program Files (x86)\Flowcode\v5\Tools\boostc
The v4 folder here.
C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\boostc
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
Good Project , my Project like it ,i used pic 16f877a with wireless power ,and remote control to change the style ....
not finished yet
[/youtube]
[/youtube]
not finished yet
[/youtube]
[/youtube]
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Wow, well done that looks really fantastic! Many pats on the back deserved for that one I think
Can I ask what you used as your motor and wireless power provider? I think the main issue with mine is the motor, though cheap, has to be heavily engineered and then has a fairly low life expectancy due to the current running through it.

Can I ask what you used as your motor and wireless power provider? I think the main issue with mine is the motor, though cheap, has to be heavily engineered and then has a fairly low life expectancy due to the current running through it.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Propellor Clock POV Style Display Example Code
i used motor for old big printer ,this is motor picture :

and In Shaa Allah , the wireless power in the next time will explain how to build it . 
-
- Posts: 3
- Joined: Mon Oct 27, 2014 11:21 am
- Has thanked: 1 time
Re: Propellor Clock POV Style Display Example Code
I couldn't seem to find much information on the IR you used to send wireless signals to the clock? I would like to know the IR device you used and how it was set up on the PCB? Also how did you send the data to it?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Propellor Clock POV Style Display Example Code
Hello,
I used the same IR receiver circuit as on the EB060 IR Board. If you refer to the datasheet for the EB060 then it should contain a circuit diagram on how to wire up the receiver.
The code is then done via the RC5 Flowcode component. Any off the shelf RC5 based transmitter should then work with the receiver. Or you could use the RC5 component in transmit mode to create your transmitter.
I used the same IR receiver circuit as on the EB060 IR Board. If you refer to the datasheet for the EB060 then it should contain a circuit diagram on how to wire up the receiver.
The code is then done via the RC5 Flowcode component. Any off the shelf RC5 based transmitter should then work with the receiver. Or you could use the RC5 component in transmit mode to create your transmitter.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel