element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or 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
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 1
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 23 May 2018 9:44 PM Date Created
  • Views 745 views
  • Likes 11 likes
  • Comments 6 comments
  • hercules rm46
  • educational_boosterpack
  • lcd
  • launchpad
Related
Recommended

Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 1

Jan Cumps
Jan Cumps
23 May 2018

This blog series explains how to use the Educational BoosterPack LCD with a Hercules LaunchPad.

The Educational BoosterPak MKII is a hot item. It has many sensors on board. and a joystick, a buzzer, a 3-colored LED, buttons and a microphone.
And also a very nice color LCD screen.

I've made a Hercules library for the LCD. It has low-level functions to send commands and data. But also a high-level API to clear the screen, write text and draw objects.
There's also an example that shows how to load a bitmap drawing.

 

image

 

What do you need to get started?

You can try this straight away. You need a Hercules LaunchPad (any), the Educational BoosterPack MKII and the example project archive that's available on this page.

  • mount the Educational BoosterPack on the Hercules RM46 LaunchPad
  • move J5 (above the joystick) to its lower position, from pin 1-2 to pin 2-3
  • plug the LaunchPad into your pc
  • download the project archive attached to this post
  • import it in Code Composer Studio via menu Project -> Import CCS Project -> Select archive File. Select the archive you just downloaded.
  • press the debug button
  • step through the code to see the lines, circle, triangles, text and logo appear on the LCD

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I have tested this on a  LAUNCHXL2-RM46LAUNCHXL2-RM46 LaunchPad

The attached project is for that one.

But if you follow the blog series, you should be able to use this on any other LaunchPad.

You may need to build an adapter (or use a small breadboard as patch deck) if the pins don't perfectly match those of the BoosterPack.

 

 

image

Credit where Credit is Due

This library isn't my own invention. I ported the Energia code for the HX8353E LCD, and the bitmap demo is blatantly ripped from the Energia LCD_screen_Logos example.
All the hard work is done by Rei VILO, who created those libraries and examples for Energia.
I'm waiving any license claims for my work. The original licensing conditions from Olivier apply - nothing added, nothing taken away. See the source code for the details.

The Educational Part

The BoosterPack is targeted for educational use. When you follow this blog, you'll learn some easy to difficult toppics.

  • GIO: easy - you'll learn how to drive the reset and data/command signals to the LCD screen high and low with the generic I/O module.
  • PWM: medium - you'll use pulse width modulation to set the brightness of the display backlight
  • SPI - difficult - at the end of the series you are able to send commands and data to the LCD using the SPI protocol.

 

The next blog post will review the pins and modules I'm using. And I'll start with the first configuration discussions.

 

Blog Series
Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 1
Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 2: GIO configuration
Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 3: PWM for the backlight
Educational BoosterPack MKII and Hercules LaunchPad - LCD Driver part 4: Draw, Write and show Bitmaps

 

Attachments:
RM46_BOOSTXL-EDUMKII-LCD.zip
  • Sign in to reply

Top Comments

  • fmilburn
    fmilburn over 5 years ago +3
    Neat! I have used the Educational BoosterPack MkII with the MSP430F5529 - never thought I would see it with the Hercules . I will have to follow and see how much modification was required. Also, Rei Vilo…
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to fmilburn +3
    The main change was to flatten the library from a C++ object to a set of C functions - it always breaks my OO loving heart when I have to do such an exercise but no-one would reuse this in automotive designs…
  • jomoenginer
    jomoenginer over 5 years ago +3
    I too have only used the Educational BoosterPak MKII with either a MSP Launchpad or a TM4C123 based board. The MKII is an awesome all in one senor packed board that is nicely shaped like a game controller…
Parents
  • fmilburn
    fmilburn over 5 years ago

    Neat!  I have used the Educational BoosterPack MkII with the MSP430F5529 - never thought I would see it with the Hercules image.  I will have to follow and see how much modification was required.  Also, Rei Vilo does good work....

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to fmilburn

    The main change was to flatten the library from a C++ object to a set of C functions - it always breaks my OO loving heart when I have to do such an exercise but no-one would reuse this in automotive designs (the microcontroller is intended for automotive and industrial safety relevant use) if it were written in C++.

    All that was needed after that was moving from the Arduino SPI API to the Hercules buffered mibSPI driver.

     

     

    I typically do this by commenting out all driver specific code and keeping on porting from C++ to C until it compiles.

    Then I migrate each of the SPI blocks, one by one (I select which parts I do based on the call order in a real world situation so that I can test early) - and keep on compiling to see if I'm heading in the right direction.

    Once I have enough code ported to test on hardware, I do that.

     

     

    From that moment on I port all functionality (drawing lines, squares, circles, screen cleaning, colour switching, typing text, selecting fonts, bitmap support, ...) based on what I need in the project that I have at hand.

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to fmilburn

    The main change was to flatten the library from a C++ object to a set of C functions - it always breaks my OO loving heart when I have to do such an exercise but no-one would reuse this in automotive designs (the microcontroller is intended for automotive and industrial safety relevant use) if it were written in C++.

    All that was needed after that was moving from the Arduino SPI API to the Hercules buffered mibSPI driver.

     

     

    I typically do this by commenting out all driver specific code and keeping on porting from C++ to C until it compiles.

    Then I migrate each of the SPI blocks, one by one (I select which parts I do based on the call order in a real world situation so that I can test early) - and keep on compiling to see if I'm heading in the right direction.

    Once I have enough code ported to test on hardware, I do that.

     

     

    From that moment on I port all functionality (drawing lines, squares, circles, screen cleaning, colour switching, typing text, selecting fonts, bitmap support, ...) based on what I need in the project that I have at hand.

    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • 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 © 2023 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