Page 1 of 1

Seven segment common cathode

Posted: Wed May 01, 2013 2:41 am
by oookey
Hi :D

i'm trying to make a clock display using one unit 4pcs of seven segment, 2 digits for hours the rest for minutes, and using decimal point as second. Program on a 16F628A chip.
I got a problem that the FC component macro is for common anode only, but i have in hand is a common cathode :? , is there a way to change the component macro to suit common cathode :?:

Thanks for advice.

oookey

Re: Seven segment common cathode

Posted: Wed May 01, 2013 7:17 am
by medelec35
Hi oookey,
If you're still using Flowcode V3, then I Don't believe this is possible by using either 7Seg1or 7Seg4 LED components. If that was the case you can download free version of Flowcode V5 from here:
http://www.matrixmultimedia.com/lc_index.php?p=25
16F628A is included as a chip built in to the free version.
Here are the restrictions in the free version of Flowcode:

Code: Select all

Nag Screen                         : Always (5 seconds, startup and close down)
Icon count per macro               : 16
Macros per project                 : 4
C code lines per C icon            : 4
C code lines for suplementary code : 4
Vnet                               : Disabled
ICD                                : Disabled
Customise component code           : Disabled
Components                         : LEDarray, LED, LED7Seg1, LED7Seg4, LCD, Switch, Switchbank, ADC, Keypad, PWM, FormulaFlowcode, MIAC
Allowed chips (PIC_8)              : 16F84A, 16F628A, 16F690, 16F88, 16F877A, 16F887, 16F1937, 18F4431, 18F2220, Formula Flowcode Buggy, ECIO-40, ECIO-28, MIAC, Locktronics PIC
However If your using Flowcode V4 or V5 then changing from common anode to common cathode is only available with 7se1and not 7Seg4 component.
To do that just drag each component onto the panel, right click Ext Properties then choose common anode or common cathode. (Default is common anode).

Martin

Re: Seven segment common cathode

Posted: Wed May 08, 2013 7:56 am
by oookey
Hi :) ,

I’m trying to use FC to control the common cathode seven segment (7seg4), prior hopping into the clock program.
Please take a look the V3 FC and advice. I tried to display 0 thru 9 by each of the 7seg4, using supplementary code and C, but fail to compile, error (57). :x

Thanks

oookey

Re: Seven segment common cathode

Posted: Wed May 08, 2013 9:07 am
by medelec35
Hi oookey,

Within suplementry code you have got:

Code: Select all

char num[] = {
63, 6, 91, 79, 102, 109, 124, 7, 127, 103}; //
0,  1,  2,  3,  4,  5,   6,   7, 8,   9,     
I believe you wanted to comment out:

Code: Select all

 0,  1,  2,  3,  4,  5,   6,   7, 8, 9 
if you want the commented numbers on the next line down then the two forward slashes have to be placed first:

Code: Select all

char num[] = {
63, 6, 91, 79, 102, 109, 124, 7, 127, 103}; 
// 0,  1,  2,  3,  4,  5,   6,   7, 8, 9  

Or

Code: Select all

rom char* num = {
63, 6, 91, 79, 102, 109, 124, 7, 127, 103}; 
// 0,  1,  2,  3,  4,  5,   6,   7, 8, 9     


Or same line:

Code: Select all

rom char* num = {
63, 6, 91, 79, 102, 109, 124, 7, 127, 103}; // 0,  1,  2,  3,  4,  5,   6,   7, 8, 9     



Martin

Re: Seven segment common cathode

Posted: Wed Sep 04, 2013 6:07 am
by oookey
Hi everyone, :)

I got stuck using C code to display 7-segment. :(

It worked for display 7-segment when used none C code to program.
The pdf shows the images of the 7-segment display of both C code and none C code programs.

Please any advice?
oookey