Page 2 of 2
Re: Propellor Clock POV Style Display Example Code
Posted: Thu Sep 06, 2012 6:23 pm
by mtqc76
Sir nothing happened.
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 07, 2012 9:38 am
by Benj
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?
Re: Propellor Clock POV Style Display Example Code
Posted: Sun Sep 09, 2012 2:17 pm
by mtqc76
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Thu Sep 13, 2012 2:43 pm
by mtqc76
Got it, i compiled it.
Sorry to disturb u.
Re: Propellor Clock POV Style Display Example Code
Posted: Thu Sep 13, 2012 4:12 pm
by Benj
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 14, 2012 1:14 pm
by mtqc76
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 !!!!!
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 14, 2012 2:57 pm
by Benj
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 14, 2012 3:01 pm
by mtqc76
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 14, 2012 4:03 pm
by Benj
Hello,
For BoostC the definitions look like this.
Code: Select all
#define MX_STRING unsigned char*
#define ROMARRAY_S rom MX_STRING
#define ROMARRAY_E
For HiTech they are like this.
Code: Select all
typedef unsigned char MX_UINT8;
#define ROMARRAY_S const MX_UINT8
#define ROMARRAY_E []
Re: Propellor Clock POV Style Display Example Code
Posted: Sat Sep 15, 2012 6:53 am
by mtqc76
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Tue Sep 18, 2012 10:53 am
by Benj
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 21, 2012 1:28 pm
by mtqc76
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?
Re: Propellor Clock POV Style Display Example Code
Posted: Fri Sep 21, 2012 1:45 pm
by Benj
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.
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];
}
}
This way you can add more icons and index them from 0 to the max number of icons - 1.
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];
}
}
}
Re: Propellor Clock POV Style Display Example Code
Posted: Sat Sep 22, 2012 12:30 pm
by mtqc76
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?
Re: Propellor Clock POV Style Display Example Code
Posted: Mon Sep 24, 2012 5:06 pm
by Benj
Hello,
what if i want to make readable command like printicon(smily);
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.
Here is a v5 example using defines.

- ss1.jpg (24.15 KiB) Viewed 25800 times

- ss2.jpg (43.28 KiB) Viewed 25800 times
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?
In the main BoostC folder is a file called boostc.pdf which is a manual for the compiler.
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
Re: Propellor Clock POV Style Display Example Code
Posted: Wed Aug 28, 2013 10:48 pm
by mhatab
Re: Propellor Clock POV Style Display Example Code
Posted: Wed Aug 28, 2013 11:04 pm
by Benj
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.
Re: Propellor Clock POV Style Display Example Code
Posted: Sat Sep 14, 2013 8:17 pm
by mhatab
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 .

Re: Propellor Clock POV Style Display Example Code
Posted: Mon Oct 27, 2014 12:07 pm
by thetallstumpyone
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?
Re: Propellor Clock POV Style Display Example Code
Posted: Wed Oct 29, 2014 2:09 pm
by Benj
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.