Maybe FlowCode maybe not FlowCode

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm
Contact:

Maybe FlowCode maybe not FlowCode

Post by ksor »

I'm trying the DEMO version of FLOWCODE and STILL I miss the COMMON CATHODE of 7-segment LED (both 1 and 4 digits) !!!!

Does no common cathode exist in version 4 ?

Does the DP STILL HAVE to be connected to a port ? (How can it be turned OFF if I don't want to use it ?)

Is a NEWER DEMO-version than that from 2001 awayable ? (I want to see how the version 4 is working)
Best regards
KSor, Denmark

User avatar
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: Maybe FlowCode maybe not FlowCode

Post by Benj »

Hello

In the latest version of Flowcode (v4.2) if you right click the 7-segment component and then click Ext Properties then you will have an option to make the display into common anode or common cathode. You should also be able to leave the DP disconnected or use the code customization feature of v4 to disable its output.

The Demo version of v4 can be downloaded by visiting this page and inputting your email address.
http://www.matrixmultimedia.com/Flowcode3a-X.php

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by ksor »

Benj wrote:Hello

In the latest version of Flowcode (v4.2) if you right click the 7-segment component and then click Ext Properties then you will have an option to make the display into common anode or common cathode. You should also be able to leave the DP disconnected or use the code customization feature of v4 to disable its output.

The Demo version of v4 can be downloaded by visiting this page and inputting your email address.
http://www.matrixmultimedia.com/Flowcode3a-X.php
Yes you can choose between common anode and cathode in the LED7Seg(0) but you can NOT in the LED7Seg4(0) - it will NOT change color too - it seems like it's NOT working right -correct ?

You say I "SHOULD" be able to leave the DP disconnected - please show me how !

The DEMO-version can only support a some few PICs - how about the "real" version - how many PICs can it support ?
Best regards
KSor, Denmark

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by Steve »

The supported chips is listed near the last page of the marketing datasheet of Flowcode v4. This can be found on the main Flowcode page on our website.

We have no plans to make the 7seg4 component available in common-cathode mode. If you need this functionality, you can simply use 4 individual 7seg1 components.

And the one I have checked here does change colour correctly. I'm not sure why yours does not.

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by ksor »

Hi Steve

What about the DP - how can this com "not connected" - please show me how to do it as Ben wrote:
"You should also be able to leave the DP disconnected or use the code customization feature of v4 to disable its output."
Best regards
KSor, Denmark

User avatar
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: Maybe FlowCode maybe not FlowCode

Post by Benj »

Hello

If the connections are set to default then the DP pin is bit 7 of the segment port.

To disable this output simply change the following line inthe component either using the code customization or by editing the component C file directly.

MX_7SEG1_SEGMENT_TRIS = MX_7SEG1_SEGMENT_TRIS & %p;
change to
MX_7SEG1_SEGMENT_TRIS = MX_7SEG1_SEGMENT_TRIS & (%p | 0x80);

and this line
MX_7SEG1_SEGMENT_PORT = (MX_7SEG1_SEGMENT_PORT & %p) | cSegmentValue;
change to
MX_7SEG1_SEGMENT_PORT = (MX_7SEG1_SEGMENT_PORT & (%p | 0x80)) | (cSegmentValue & 0x7F);

and finally this line
MX_7SEG1_SEGMENT_PORT = (MX_7SEG1_SEGMENT_PORT & %p) | ~cSegmentValue;
change to
MX_7SEG1_SEGMENT_PORT = (MX_7SEG1_SEGMENT_PORT & (%p | 0x80)) | (~cSegmentValue & 0x7F);

Garrygb
Posts: 1
Joined: Tue Jul 27, 2010 7:43 am
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by Garrygb »

Hi,

after spending many hours learning and understanding the dev board and Flowcode, I finally got my 7 segment by 4 component going.

The flow code 7seg4 does not allow you to set the common_cathode as does the 7 Segment by 1

The parameter %q is passed in as 1 from the flowcode to the c code. The external properties display does not provide an option to set common anode or common cathode.

I got around this by commenting out the section of code that sets the common anode leaving the alternate which is common cathode.

Comment out this area

//display the digit
#ifdef MX_7SEG_COM_ANODE_1
//common anode
MX_7SEG4_SEGMENT_PORT = cSegmentValue;
MX_7SEG4_COMMON_PORT = (MX_7SEG4_COMMON_PORT & %o) | cCommonArray[Digit];
#else
//common cathode
MX_7SEG4_SEGMENT_PORT = (MX_7SEG4_SEGMENT_PORT | ~%p) & ~cSegmentValue;
MX_7SEG4_COMMON_PORT = (MX_7SEG4_COMMON_PORT | ~%o) & ~cCommonArray[Digit];

#endif

like so
//display the digit
/*
#ifdef MX_7SEG_COM_ANODE_1
//common anode
MX_7SEG4_SEGMENT_PORT = cSegmentValue;
MX_7SEG4_COMMON_PORT = (MX_7SEG4_COMMON_PORT & %o) | cCommonArray[Digit];
#else
//common cathode

MX_7SEG4_SEGMENT_PORT = (MX_7SEG4_SEGMENT_PORT | ~%p) & ~cSegmentValue;
MX_7SEG4_COMMON_PORT = (MX_7SEG4_COMMON_PORT | ~%o) & ~cCommonArray[Digit];

#endif
*/

Copy the lines in red to here
MX_7SEG4_SEGMENT_PORT = (MX_7SEG4_SEGMENT_PORT | ~%p) & ~cSegmentValue;
MX_7SEG4_COMMON_PORT = (MX_7SEG4_COMMON_PORT | ~%o) & ~cCommonArray[Digit];

}

hope this helps

btw is it possible to edit the ocx components that hold the graphical representation of the component

Garry

Dompelpompje
Posts: 8
Joined: Thu Mar 13, 2008 10:57 am
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by Dompelpompje »

Hallo Sean

Do we have a file
Pic_7seg4.c
for comcatthode ?
I looked at de forum and did try out a few things
but my comcathode wil not work until now

Many regards

Meeuwes Kuijer

a flowcode4 user

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Maybe FlowCode maybe not FlowCode

Post by Sean »

Hello,

The 7Seg4 component (along with LED array and Switch bank) is becomming a legacy component. New properties, including polarity, are being added to the single versions of the components (7Seg1, LED, Switch).

A common cathode 7seg4 module can be made from 4 x 7seg1 components. Each component should have the same 'data' connections, but individual 'common' connections. Each component can be individually selected for common cathode/anode operation.

This technique is considered to be more flexible for future development.

A present drawback of this approach is that the common output for each digit must be manually disabled when switching to another digit in a multiplexed display.

An example program is attached. It is in common-anode mode so that it could be tested on HP488 board, but it demonstrates the idea.
Multi7Seg1.fcf
(9 KiB) Downloaded 457 times

Post Reply