Jay Dee wrote:Is this the intended and most efficient way in FC to write multiple digit values to the led7seg display components?
Cheers, J.
My answer would be no. I believe the best way would be use the method from my post here:
http://www.matrixmultimedia.com/mmforum ... =23&t=7737
It is better to use the interrupt with LED7seg4 component macro within the timer interrupt for couple of reasons.
1) If you extend your flowchart to use keypad routines, wait for switch presses, delays etc. Then without using timer interrupt the refresh rate will be dramatically affected, and the persistence of vision effect will be lost. LED dispalys will end up flashing like emergency services lights!
However if LED7seg4 are placed in the timer interrupt, then no matter what delays etc you have, the refresh rate will always stay the same i.e. at timer interrupt frequency.
2) if you use LED7seg4 then when show digit is selected all the other digits are automatically cleared, so you don't need to clear the bit that's connected to the digit that's displayed, or don't need use ClearDigit function, as there is not one!
But if you use LED7seg4 instead of single LED7seg, on your Flowchart you will need to connect all unused anodes to either a spare port, or the same port as one of the used LED7seg4 connections... See below

- Unused connections.jpg (81.56 KiB) Viewed 7269 times
Ignore the same pin warning message.
Because the simulation of timer interrupt component can be slow, whilst developing your flowchart ,replace a timer interrupt component macro with a call macro, instead of relying on flowcode to simulate timer interrupt. When you have finished and want to test on real hardware, replace call timer macro with the timer interrupt component macro.
Important: When using a timer interrupt, do no place any delays, or component macros that have delays longer then interrupt time. If you do then corruption will occur.
Jay Dee wrote:But this macro does not toggle the common anode pin A1.
Whilst that is true for simulation, It should toggle A1 on real hardware. So its just a simulation issue which I have reported.