element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
Blog Two LEDs flashing using only hardware components of the PSoC
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 26 Jul 2013 1:05 PM Date Created
  • Views 598 views
  • Likes 1 like
  • Comments 2 comments
  • blinking_led
  • pioneer_kit
  • psoc_creator
Related
Recommended

Two LEDs flashing using only hardware components of the PSoC

Former Member
Former Member
26 Jul 2013

Hello everybody,

 

It took me some hours of fun making this simple project. It turned out  - after understanding the PSoC - that both the PSoC Creator the Pioneer board are easy to use and offer great flexibility - as they claim.

 

The project is an exercise - and should be treated as such - on the schematic editor of the PSoC Creator.

 

Two LEDs are flashing on 8Hz in an alternating manner, resembling a police car's emergency lights:

      - 3 flashes RED

      - 3 flashes BLUE

      - repeat

 

The LEDs are configured on standard outputs:

   P1.6 RED

   P0.3 BLUE

 

   All the rest is done by the hardware, no software needed.

image

 

   The flashing hardware is a state machine with 12 states, sinthesized previously on paper by hand.

   The LED's final states are decoded by the last two NAND gates.

 

   The big deal was to synthesize the D inputs of each FF. The result:

 

   D0 = NOT Q0

 

   D1 = Q1 XOR Q0

 

   D2 = ((NOT Q3) AND (Q2 XOR (Q1 AND Q0))) OR (Q2 AND (NOT Q1) AND (NOT Q0)) OR (Q3 AND Q1 AND Q0)

 

   D3 = (Q3 AND (NOT Q2)) OR (Q2 AND (Q3 AND (NOT Q1) AND (NOT Q0)) OR ((NOT Q3) AND Q1 AND Q0))

 

And finally the two LEDs:

 

   R_LED = Q0 NAND Q3

 

   B_LED = Q0 NAND (NOT Q3)

 

   Building the project yields to the following hardware usage:

   Flash used: 1200 of 32768 bytes (3.7 %).

   SRAM used: 228 of 4096 bytes (5.6 %).

 

Regards,

Attachments:
RED_BLUE_flashing_LEDs_images.zip
RED_BLUE_flashing_LEDs.cywrk.Archive01.zip
  • Sign in to reply
  • Former Member
    Former Member over 11 years ago in reply to DAB

    Thank you for your opinion.

    My thought is that a full description of each block can be found in specific datasheets: basic logic gates, D-type Flip-Flops, output pins.

    For those, who are just digging into the digital world, a good starting point: http://www.allaboutcircuits.com/vol_4/index.html

     

    I'm working on a more detailed description of the project - just in case ;-)

     

    Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago

    I have been waiting to see how you use the integrated programable hardware blocks.

     

    It's a good simple design, but you might want to go into a little more detail on the hardware pieces.  I suspect that some people have not yet been taught about logic circuit gates and how they function.

     

    Just a thought,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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