I'm creating a digital dice using 2 7 segment displays so it can show either numbers 1-6 or 2-12. To simulate the program I've put the displays on the 2D panel.
All was working okay, saving the program as I went along. Got it all to work in the end.
Re-opened the program the next day and the display doesn't work.
If I delete the displays, add them in again and reconnect it it does. Saving is okay. But if I close Flowcode and the reload it, again the display doesn't work.
When I simulate the program it warns me that not all the pins are connect to the display. Tried connecting them to unused pins on the microcontroller and I still get the same issue.
Also tried putting the displays on the 3D panel instead. Same issue.
I've attached the file. The button 'shakes' the dice and the switch changes between 1 or 2 dice.
I'm not using the component macros for the display, as I going the get students to code it and not get reliant on using micros, but understand the basic of turning outputs on/off.
Thanks
Dave
7 segment display component not simulating
-
- Posts: 4
- http://meble-kuchenne.info.pl
- Joined: Mon Jul 31, 2023 11:07 am
7 segment display component not simulating
- Attachments
-
- 7 Segment_Dice2.fcfx
- (34.67 KiB) Downloaded 217 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: 7 segment display component not simulating
Hi
I'm using FC 10.0.4.33 with full database updates and yourfile simulates OK for me, and compiles to Hex too.
Are you running latest versions?
Regards
I'm using FC 10.0.4.33 with full database updates and yourfile simulates OK for me, and compiles to Hex too.
Are you running latest versions?
Regards
-
- Posts: 4
- Joined: Mon Jul 31, 2023 11:07 am
Re: 7 segment display component not simulating
Hi chipfryer.
Thanks for trying it. It looks like it might be something to do with my version of FC then.
I work at a University, (50 user educational license), so checked with our IT people what version we are on and about updates.
I'm on Educational V9. They have just updated it and I still can't get the simulation to run.
As before, If I delete the displays and build them back in, it simulates okay. If FC is closed and reopened and the file loaded then it doesn't.
Thanks
Thanks for trying it. It looks like it might be something to do with my version of FC then.
I work at a University, (50 user educational license), so checked with our IT people what version we are on and about updates.
I'm on Educational V9. They have just updated it and I still can't get the simulation to run.
As before, If I delete the displays and build them back in, it simulates okay. If FC is closed and reopened and the file loaded then it doesn't.
Thanks
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: 7 segment display component not simulating
Hello,
Please can you try this and see how you get on. It looks like the Arduino style pin references $d0 on FC9 are havign problems after a reload.
I have changed the 7-seg component connections to the $port references and this now seems to be behaiving again.
Please can you try this and see how you get on. It looks like the Arduino style pin references $d0 on FC9 are havign problems after a reload.
I have changed the 7-seg component connections to the $port references and this now seems to be behaiving again.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 4
- Joined: Mon Jul 31, 2023 11:07 am
Re: 7 segment display component not simulating
Hi Ben
Thanks for looking at it and sending my your program. When I changed the ports so the program works a s a dice, it didn't work.
I think I've found the actual problem. It's not to do with the Arduino style pin reference, but weather the common pin is connected or not. I think what was confusing my understanding of what needs to be connected, is, changes only seam to apply when the file is saved and then reloaded.
The common pin on the display must be connected to a chip pin even if the common pin is not selected.
See the attached file. Neither have a common pin selected. The LH one does have its common pin connected so works, while the RH one isn't connected so doesn't work.
If I select there to be a common pin on the RH one and connect it ($D11). It still won't work. But if I save the program and then relaod it, it will.
What do I do if the circuit hasn't a spare pin on the chip tom connect to the common pin, and so is connected to 0V.
Dave
Thanks for looking at it and sending my your program. When I changed the ports so the program works a s a dice, it didn't work.
I think I've found the actual problem. It's not to do with the Arduino style pin reference, but weather the common pin is connected or not. I think what was confusing my understanding of what needs to be connected, is, changes only seam to apply when the file is saved and then reloaded.
The common pin on the display must be connected to a chip pin even if the common pin is not selected.
See the attached file. Neither have a common pin selected. The LH one does have its common pin connected so works, while the RH one isn't connected so doesn't work.
If I select there to be a common pin on the RH one and connect it ($D11). It still won't work. But if I save the program and then relaod it, it will.
What do I do if the circuit hasn't a spare pin on the chip tom connect to the common pin, and so is connected to 0V.
Dave
-
- Posts: 4
- Joined: Mon Jul 31, 2023 11:07 am