Connect with us

COUNTER

Discussion in 'Electronic Design' started by Prasunp, Feb 3, 2004.

Scroll to continue with content
  1. Prasunp

    Prasunp Guest

    Hi
    i am trying to create a MOD-5 counter with a GAL16V8. Here is my
    code. It is to run through the following cycle 0 - 1 - 7 - 4 - 5.
    Here is the code i used. It doesn't work to well. Is there a way to
    make it work. Am i missing something


    GAL16V8;
    CLK NC NC NC NC NC NC NC NC GND
    OE QA QB QC NC NC NC NC NC VCC
    QA:=/QA*/QB*QC+QA*/QB*/QC+QA*QB+QC
    QB:=/QA*/QB*QC
    QC:=/QA*/QB*/QC+/QA*/QB*QC+QA*/QB*/QC
     
  2. Close, but... ok, not even close.

    QA := /QB*/QC ;0->1, 1->7
    + /QA*/QB*QC ;4->5

    QB := QA*/QB*/QC ;1->7

    QC := QA*/QB*/QC ;1->7
    + QA*QB*QC ;7->4
    + /QA*/QB*QC ;4->5

    It amy be possible to simplify further, but the gates are already in the
    GAL, so what's the point?

    And you may need a reset to start things up right, but I don't know what you
    have available. For instance, an active low NRES input could be coded with
    ....*NRES on each term, such as

    QB := QA*/QB*/QC*NRES ;1->7

    so NRES low will force the 0 state.
     
  3. There's an error or typo in your first equation.

    petrus
     
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

-