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#062 – Ready…Set…GO! PSoC Stopwatch
  • 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 9 replies
  • Subscribers 27 subscribers
  • Views 1584 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#062 – Ready…Set…GO! PSoC Stopwatch

cy.wbz
cy.wbz over 12 years ago

Hello!

 

In this example we are looking to expand on our earlier graphical displays by creating a stop watch. Our various LCD and GLCD examples try to cover a wide range of display options available to users. In this example we use an I2C based character LCD modules. For this project we will use the I2C Character LCD component, which allows the customer to control the Character LCD with 2 pins instead of the typical 7 required by our Parallel Character LCD component. For this example we use a Serial LCD 16x2 Blue and White LCD for Arduino kits.

 

image

 

Forum Post Attachments:

 

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

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

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

  • I2C (Master mode)
  • TCPWM
  • CyClock
  • I2C Character LCD
  • Debouncer
  • ISR
  • CyPins

 

Firmware Description:

 

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

 

The example projects uses the SCL/SDA pins on the Kit to control the LCD (via the breadboard as the shield doesn’t have a connection to SCL/SDA) and the SW2 on the Kit to control the stopwatch.

 

Any I2C Character LCD should be possible given the flexibility of the provided component in the catalog.

To setup your LCD, you will need the datasheet to be able to enter the I2C address for the LCD on the General tab of the I2C LCD component.  Unless you are able to locate a NXP PCF2119x LCD, the Command format entry on the customizer should be configured for Custom format, which will enable the fields on the Custom Commands tab.  In that tab, again from the datasheet, you will need to modify the commands to match the byte sequences defined for the device.  You can also specify additional commands (in this example we added the SetContrast and SetBrightness APIs) to control any extra functionality your I2C LCD may have that you wish to utilize.

 

The setup of the firmware will update the display every other millisecond and move the bouncing dot at the top of the display approximately every 33ms.  Pushing SW2 on the kit will clear and start the timer, pushing it again will stop the timer and the animation at the top of the display.

 

Hardware Connections:

 

Please connect a simple Breadboarding shield to the Pioneer kit. Then connect the LCD display to the Breadboard. In this example we use the SainSmart prototyping shield.

 

image

 

image

 

Test Your Project:

 

Connect your I2C display and program the Pioneer kit with the example. The setup of the firmware will update the display every other millisecond and move the bouncing dot at the top of the display approximately every 33ms.  Pushing SW2 on the kit will clear and start the timer, pushing it again will stop the timer and the animation at the top of the display.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
I2C_LCD_Example.cywrk.Archive01.zip
2262.Project Images.zip
  • Sign in to reply
  • Cancel
Parents
  • yes_its_garen
    yes_its_garen over 5 years ago

    Hi Hope you're doing well.

     

    I want to do the same project but instead of displaying the time on a I2C LCD, i just want it to print on UART.

    Basically I am working on a project that requires me to read the x, y, z axis accelerometer values and print the time (in minutes/second/milliseconds) that it has been registered, that is for each reading. Since I am willing to read more than 84000 readings as fast as possible.

     

    I did the accelerometer part, I am stuck now on the time part, since there are no ready made implementations on Psoc 6 for this kind of project.

     

    I would greatly appreciate if you gave me some remarks or answers regarding the above.

     

    Best regards,

    Garen A.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • yes_its_garen
    yes_its_garen over 5 years ago

    Hi Hope you're doing well.

     

    I want to do the same project but instead of displaying the time on a I2C LCD, i just want it to print on UART.

    Basically I am working on a project that requires me to read the x, y, z axis accelerometer values and print the time (in minutes/second/milliseconds) that it has been registered, that is for each reading. Since I am willing to read more than 84000 readings as fast as possible.

     

    I did the accelerometer part, I am stuck now on the time part, since there are no ready made implementations on Psoc 6 for this kind of project.

     

    I would greatly appreciate if you gave me some remarks or answers regarding the above.

     

    Best regards,

    Garen A.

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