PIC1684F - Counter reset(SOLVED)
Posted: Sat Nov 09, 2013 7:38 pm
----------------------------
Old forums - please visit https://www.flowcode.co.uk/forums
https://www.flowcode.co.uk/mmforums/
This will only work once. As soon as a digit has been used that value will stay visible. So once three digits have been used to display 100 you can not erase the second and third digit. This means the display will show 100, 200, 300, 400 etc when it should show 1, 2, 3, 4...Carl_Smith93 wrote: Not exactly , as the way I need do is like so :
If the number is less then 9.
Output : 0,1,2,3,4,5,6,7,8,9 in a single segment of display-- nothing else can be displayed in the others hence why I used decision/if.(3) = segment
If the number is less then 19 but more then 9.
Output:10(3,2) 11(3,2)12(3,2)13(3,2) and so on until the number is 19 which would need a additional if statement for 21,22,23 etc.
So, at this point :: For 1 - 9 their will be 1 segment in use at the time.
When you gets 10 - 99 their will be 2 segments being used at one time(so to speak).
When you get to 100 their will be 3 segments being used at one time.
To show 000 to 100:Carl_Smith93 wrote: But, when what you have done, is their any of doin the process but making it show up 100 rather then 99? (Edit) -- Additional: Possible to get to count upto 100& reset to 000?
Count is read from the position of the switch (Input icon A4->Count). Reset would mean changing the position of the switch lever. This can be done in simulation, but not in hardware (without mechanical components).Carl_Smith93 wrote: I would like is possible to reset the counter on the file uploaded? If, so how?
Ok I understand I'll try that now.balles wrote:Dear Carl,
i taked a fast look on your flowchart and as i see, it's working as you're expecting. It counts till 100 and then reset the counter. It just does not reset the display after reach 100.
It's not counting till 199, that number 1 you see in front the 99 is the 1 showed when count = 100. You just need to clean the display, so the 1 of 100 will disaper an it will look as you wish.
Cheers!
Yes, I changed what you did to meet what I needed and like another person said cleared the screen. Now the program is doing exactly what I wanted.kersing wrote:This will only work once. As soon as a digit has been used that value will stay visible. So once three digits have been used to display 100 you can not erase the second and third digit. This means the display will show 100, 200, 300, 400 etc when it should show 1, 2, 3, 4...Carl_Smith93 wrote: Not exactly , as the way I need do is like so :
If the number is less then 9.
Output : 0,1,2,3,4,5,6,7,8,9 in a single segment of display-- nothing else can be displayed in the others hence why I used decision/if.(3) = segment
If the number is less then 19 but more then 9.
Output:10(3,2) 11(3,2)12(3,2)13(3,2) and so on until the number is 19 which would need a additional if statement for 21,22,23 etc.
So, at this point :: For 1 - 9 their will be 1 segment in use at the time.
When you gets 10 - 99 their will be 2 segments being used at one time(so to speak).
When you get to 100 their will be 3 segments being used at one time.
To show 000 to 100:Carl_Smith93 wrote: But, when what you have done, is their any of doin the process but making it show up 100 rather then 99? (Edit) -- Additional: Possible to get to count upto 100& reset to 000?
Add another led_7seg_quad1::ShowDigit1 macro with arguments 0, Number/100, 0.
Change Decision to: Number > 100
Count is read from the position of the switch (Input icon A4->Count). Reset would mean changing the position of the switch lever. This can be done in simulation, but not in hardware (without mechanical components).Carl_Smith93 wrote: I would like is possible to reset the counter on the file uploaded? If, so how?
What do you want to achieve?