Maker Pro
Maker Pro

GENIE PIC Microcontroller Flowchart Help

For a school project I'm using a GENIE 14 chip to control a basketball scoreboard, for one team and shot clock counting down from 24 to 0
Inputs - D0, D1, D2 add one two and three pulses respectively
D3 Reset shot clock
Outputs - Q1 to seven seg display
Q5 Green LED to show that there is time left on shot clock
Q4 red LED to show that shot clock is out.

I need the genie to have a function to send either one two or three pulses to a 7 seg display showing the score for the team. this part has been completed and is working.
my issue arises when programming the program. ideally the shot clock would reset back to the start of the 24 second count down when either a point is scored and I/p d0,1 or 2 are pressed but due to the need for the 24 second delay on the green led for it to stay on it will not pass through the flowchart as it is stuck on a wait. this wait means that during the time in which the green light is on nothing else can be triggered as the flowchart is essentially frozen.
my question is if there is a better alternative to the wait function that will keep the green led on for 24 seconds but will not freeze the flowchart as this means no points can be added or the shot clock cant be reset for 24s
Thanks for any help in advance
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Think about a state-transition model.

It's relatively trivial to run multiple in parallel leading to very efficient multitasking.
 
Top