element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#084 – State Machines in PSoC 4
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 3 replies
  • Subscribers 25 subscribers
  • Views 775 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#084 – State Machines in PSoC 4

cy.wbz
cy.wbz over 12 years ago

Hello!

 

In today’s example we want to dive into some deeper firmware design ideas. With today's post we are going to provide you four separate examples on how to implement state machines using the PSoC 4. You can implement these examples using the Pioneer kit.

 

These examples were not written specifically for the Pioneer board so please adjust your pin selections in the DWR window to target the Pioneer kit.

 

State machines are commonly used to implement decision making algorithms where distinguishable states exist. As part of this project I’ve included our State Machine application note which walks the user through State Machines descriptions and functionality. The four examples posted here are from this application note.

 

image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Project Images

 

Components Used: 

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • PWM
  • UDBClkEn
  • LUT
  • CyClock
  • ISR
  • CyPins
  • CyClock

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

In this example we are linking four example projects that users can use to generate State Machine designs for their PSoC 4 applications. These four example projects are part of the Cypress PSoC application note “Implementing State Machines with PSoC 3, PSoC 4, and PSoC 5LP”. Please take some time to review the application note before diving into the example projects provided below.

 

Hardware Connections:

 

There are no specific hardware connections for these example projects. All of the connections are made in hardware and outputs are brought out to the Arduino headers.

 

Test Your Project:

 

Build and program the example project into the Pioneer board.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
imageAN62510_001-62510.pdf
AN62510(PSoC_Creator2.2SP1).zip
  • Sign in to reply
  • Cancel
  • DAB
    DAB over 12 years ago

    Hi Matt,

     

    State Machines can also be used to support so called "Fuzzy" logic states.

    The use of different states enable the developer to create soft transitions between states, especially during noisy and dynamic conditions.

     

    The Fuzzy transition is basically what engineers call "Hysteresis", where after you transition from one state to another, a different set of data inputs are used to determine when you would return to the initial state or if you should go to the next state.

     

    State machines are also very useful in guiding the user through a complex set of set up or operational states.

    You use the state levels to control the information that the user sees and you limit his choices to just those variables that are relevant to the current state.

     

    If you have not used a state machine before, I suggest you do some internet searches and get familiar with them.  

    They are a very powerful tool when building applications that require more control over the device in critical situations.

     

    Enjoy,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to DAB

    Hello DAB.

    Great post, thanks for share your knowledge with the community.

     

    Regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    Hello Matt.

    Thanks for this post, i studied state machines  when i took the course of digital design with the text Digital Design Principles and Practices by John F. Wakerly, now with psoc 4 i will try to implement my notes.

     

    regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube