[Home] [Starter Example] [Example 1] [Example 2 (BASYS)] [Example 2 (NEXYS)]
Example 1
Up ] Program example (old) ] StopWatch1 (html) ] StopWatch1.psm ] PicoBlaze State Machine ]

  •  Download a zippet project with the design below (based at XiLinx ISE 9.2i)
    PicoBlaze_Demo2_minus_KCPSM3.zip
    Note! You must download and add the Kcpsm3.vhd from Xilinx and the IDE from MediaTronix (both free)
     

  •  Download this bit-file to you BASYS kit to test the functionality: 
    picoblaze_system2.bit  or Picoblaze_system2_NEXYS.bit


    <Btn0> will act as Start / Stop for the Stopwatch
    <
    Btn1> will act as Lap / Reset for the Stopwatch

    <
    Sw0> will change the display:  <Sw0>=0 => ss:1/100s   <Sw0>=1 => mm:ss

    <
    Led2:0> displays the state of the Stopwatch:
     

    •   001 = IDLE                   => <Btn0> will start the watch and change state to RUNNING

    •   010 = RUNNING          => <Btn0> will stop the watch and change state to STOPPED
                                                  <
      Btn1> will freeze the display with a Lap time and change state to RUNNING_LAP

    •   110 = RUNNING_LAP => <Btn0> will stop the watch and change state to STOPPED_LAP
                                                  <
      Btn1> will the display the running watch again and change state to RUNNING

    •   100 = STOPPED_LAP => <Btn0> will stop the watch and change state to STOPPED
                                                  <
      Btn1> will freeze the display with a Lap time and change state to RUNNING_LAP

    •   000 = STOPPED          => <Btn0> will start the watch and change state to RUNNING
                                                   <
      Btn1> will zero the watch counter and change state to IDLE

 

 
   
 

 

 

IO_Module1

 

 

 

 

 

Extract from the corresponding psm file.

   

Timer