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#01 - Blinking LED
  • 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 22 replies
  • Subscribers 27 subscribers
  • Views 3353 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#01 - Blinking LED

cy.gul
cy.gul over 12 years ago

To kick-start our 100 Projects in 100 Days community effort around the PSoC 4 Pioneer Kit, today I'm posting a simple "Blinking LED" project.

 

This is a very simple project that will help you get started with your first design for the PSoC 4 Pioneer Kit.

 

Project Schematic:


                    Actual screenshot from PSoC Creator schematic (TopDesign.cysch)image

 

 

In this design, a PWM Component drives the Pin Component which is connected to the Blue LED on the Pioneer Kit. The PWM modulates to make the blue LED blink at regular intervals

 

Hardware connections on the Kit:

  • Blue LED - P0[3] (this is internally wired, no extra connections required)

 

Software Setup:

  • See steps #1 - #6 from the main post here

 

Project Files:

  • Blinking LED.cywrk.Archive01.zip

     

Attachments:
Blinking LED.cywrk.Archive01.zip
  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 12 years ago in reply to shabaz +2
    The IDE installed fine, and I was able to compile a demo program. Just in case anyone tries it with Windows 7 64-bit: For me, when I tried to compile, it said a license had expired (although I've not installed…
  • shabaz
    shabaz over 12 years ago in reply to Former Member +1
    I see! It sounds straightforward and not so scary any more :-)
Parents
  • shabaz
    shabaz over 12 years ago

    Hi,

    The 'Software Setup' steps 1-6 link is broken. I looked at the zip file, but the main.c just contains essentially this:

    #include <device.h>

    void main()

    {

        Clock_Start();

        PWM_Start();


        for(;;)

        {


        }

    }

     

    Where would you have  defined what connects to the count, start and clock pins on your schematic that you've shown? (I don't have a PSoC board, I'm just curious). The other files in the zip didn't seem text-readable, but I may have missed it, or is it done on the IDE somewhere?

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

    Hi,

    The 'Software Setup' steps 1-6 link is broken. I looked at the zip file, but the main.c just contains essentially this:

    #include <device.h>

    void main()

    {

        Clock_Start();

        PWM_Start();


        for(;;)

        {


        }

    }

     

    Where would you have  defined what connects to the count, start and clock pins on your schematic that you've shown? (I don't have a PSoC board, I'm just curious). The other files in the zip didn't seem text-readable, but I may have missed it, or is it done on the IDE somewhere?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 12 years ago in reply to shabaz

    The pic that Gagan put up is from the creator IDE.  The connections are made through the schematic entry shown in that picture.  That schematic and the main code are all that is needed.  : )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • cy.gul
    cy.gul over 12 years ago in reply to shabaz

    Hi Shabaz,

    Good question!

     

    The main.c contains only the 2 lines needed to 'start' the 2 Components - PWM and Clock, that are placed, wired, and configured on the project schematic ("TopDesign.cysch").

    That's all the CPU needs to do! The rest of the design runs entirely in hardware with no CPU intervention required.

    To see how the 2 Components are setup, simply double-click them to open the Component configuration window.

     

    You can setup your global chip resources like Clocks, Pins-outs, Interrupts, DMA,etc. in their respective tabs. Here is a quick tutorial video that shows the workflow with the Pin Component as an example. http://video.cypress.com/video-library/video/PSoC-Software_PSoC-Creator/PSoC-Creator-Tutorial-Working-with-Pins/1768525420001

     

    To get started, you will need to install the free IDE - PSoC Creator.

     

    EDIT - thanks for noting the broken link, fixed now!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    Hi Chris, thanks for the information. I couldn't see from the main code nor the schematic, where the PWM depth is set. Has it defaulted to (say) 100% and requires a function call in main.c to change it?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to cy.gul

    Hi Gagan, Thanks for the information! It sounds great. I'll try out the free IDE to experiment, downloading it now.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to shabaz

    Hey Shabaz, you would double click on the PWM component (the green and grey PWM block shown in the schematic above) in Creator and it opens a configuration dialog called a customizer for you to set parameters like Period and Compare values.  Then you can change those values in code later with API calls like PWM_SetPeriod() and PWM_SetCompare() among many other things.

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    I see! It sounds straightforward and not so scary any more :-)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to shabaz

    The IDE installed fine, and I was able to compile a demo program.

    Just in case anyone tries it with Windows 7 64-bit: For me, when I tried to compile, it said a license had expired (although I've not installed this before), and it looks like an issue with ARM's Keil software. Followed the Help->Register->Keil process to get a license code, but the code didn't work. There was some forum where basically these steps had to be followed:

    1. Go to C:\Program Files (x86)\Cypress\PSoC Creator\2.2\PSoC Creator\import\keil\pk51\9.03

    2. Copy the _TOOLS.INI file to TOOLS.INI

    3. go into the UV4 folder

    4. Right-click and 'Run as administrator' on UV4.exe

    5. Go to File->License Management, and enter the key there

    6. Close the UV4.exe program, go back into the IDE, and re-do Help->Register->Keil, and the license was already there (I re-entered it there to make sure).

    7. Now the compile will work!

    • Cancel
    • Vote Up +2 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