Skip to content
Ghiordy edited this page Apr 2, 2019 · 1 revision

Welcome to the Curso-SE wiki!

Authors and contribuitors list

  • Ghiordy F. Contreras C.
  • Richard S. Hernandez M.

Description

canicasFSMmealy

This is a code for a game using marbles, where was designed a mealy finite states machine to emulate a funcionality where are two inputs (A,B), 3 levers (x1,x2,x3) and 2 ouptuts (C,D):

image

If a marble pass once through a lever, that lever toogle its state between left or right. So, for it we've used gray decofication with all pssible states generated by levers.

x1 x2 x3 State
0 0 0 S0
0 0 1 S1
0 1 1 S2
0 1 0 S3
1 1 0 S4
1 1 1 S5
1 0 1 S6
1 0 0 S7

And states draw is presented below giving a description of transitions with its inputs and output dependency:

image

In code, you must be find at bottom the next instruction

# funcion     -entradas-palancas-       -estados--------salidas-
canicasFSMmealy([2,3],[17,27,22],1,14,[0,1,2,3,4,5,6,7],[23,24])

This was defined for GPIO using BCM setup mode and should be changed in order to adapt to your purpose. The value 1 to avoid rebound in push button, as well as is used as clock and value 14 is reset pin, this must be always in HIGH other way stop executing of code.

OnOffFsmMoore

Simple machine with one pulser and one led, connected. This machine have two states that gives output for led and its current state changes just pulser is pressed, turning on or turninig off the led.

image

detector101moore and detector101mealy

Use two pulsers, when every pulser have its unique input, in this case only are: 0 and 1. Recognition has been made when number sequence generated by inputs is equal to 101.

For this exercise exists moore and mealy architectures, where mealy has one state minus in comparison with moore.

contador0a99

Using two seven segments displays may you count sequentially since 0 to 99, this code do just with you enter contador0a99() function defined previously in the same code. As well as there are functions for counter 0 to 9 using one seven segments display (contador0a9() function).

holamundo

Print a "hello world" message and blink a Led 10 times.

instrucciones_carga_git

Presents instructions to check status, commit code, pull from web, push on web, and cloning repository through terminal with Git bash previously installed.

Theory

Finite States Machines

image