dp in 7 segment display

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
bluejetsthree
Flowcode v5 User
Posts: 17
Joined: Mon Sep 16, 2013 3:04 am
Been thanked: 1 time

dp in 7 segment display

Post by bluejetsthree »

If not using the dp in a seven segment display one has to "connect" it but then turn it off if it is not required in the macro.
So, if one wants to use this pin for another purpose, how does one go about it.??

bluejetsthree
Flowcode v5 User
Posts: 17
Joined: Mon Sep 16, 2013 3:04 am
Been thanked: 1 time

Re: dp in 7 segment display

Post by bluejetsthree »

No answers here.......perhaps technical could advise.

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: dp in 7 segment display

Post by Benj »

Hello,

The 7seg component requires a pin to drive the decimal point and assumes that this is what you will be using it for. I think there will likely be a compile error if you do not assign a connection to the pin but what about if you use a pin which is already assigned to one of the anode or cathode pins? This may not work perfectly but may give you a workable solution leaving your other pins free to do what you like with.

Here is the v5 C code you could override to switch off the DP pin.

ShowDigit function

Code: Select all

		//if (cSegmentValue & 0x80)
		//{
		//	FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
		//}
		//else
		//{
		//	FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
		//}

 		......

		//if (cSegmentValue & 0x80)
		//{
		//	FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
		//}
		//else
		//{
		//	FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
		//}

bluejetsthree
Flowcode v5 User
Posts: 17
Joined: Mon Sep 16, 2013 3:04 am
Been thanked: 1 time

Re: dp in 7 segment display

Post by bluejetsthree »

It does not get as far as a compile error.
I do not see the need to do a c code.
It simply will not accept that the dp pin is left disconnected in the "connections".
It will however allow turning it on or off in the macro as i explained earlier but it appears cannot be used other than that.
Ok..thanks.

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: dp in 7 segment display

Post by Benj »

Hello,

If you attach your Flowcode program then I will do some minor edits to remove the DP functionality by customising the C code embedded in the 7-seg component in your project.

Post Reply