Home ] Up ] Introduction ] Instruction set ] Starter Example ] Tools ] [ Example 1 ] Example 2 (BASYS) ] Example 2 (NEXYS) ] Examples ]
Example 1

Up ] Program example (old) ] PicoBlaze State Machine ] StopWatch1 (html) ] Stopwatch1.psm ]

bullet

 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)
 

bullet

 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:
 
bullet

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

bullet

  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

bullet

  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

bullet

  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

bullet

  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