Connect with us

GENIE PIC Microcontroller Flowchart Help

Discussion in 'Microcontrollers, Programming and IoT' started by mrmancrazycircuit, Feb 3, 2018.

Scroll to continue with content
  1. mrmancrazycircuit

    mrmancrazycircuit

    1
    0
    Feb 2, 2018
    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
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,490
    2,831
    Jan 21, 2010
    Think about a state-transition model.

    It's relatively trivial to run multiple in parallel leading to very efficient multitasking.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-