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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Ultimate RoadTest
  • Challenges & Projects
  • Design Challenges
  • Ultimate RoadTest
  • More
  • Cancel
Ultimate RoadTest
Blog The Nice Asgard Project Part 4 - Displays
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: cookieglitch
  • Date Created: 6 May 2012 1:11 PM Date Created
  • Views 531 views
  • Likes 2 likes
  • Comments 1 comment
  • wifi
  • i2c
  • cc3000
  • lcd_display
  • spi
  • lcd_controller
  • home_automation
  • motor_control
  • msp430
  • eagle_pcb
  • sp:texas_instruments
  • ultimate_roadtest
Related
Recommended

The Nice Asgard Project Part 4 - Displays

cookieglitch
cookieglitch
6 May 2012

While working on the PCB, I realised one thing. I haven't found a display yet! (Pretty useful!) There is a challenge here, the MSP430FR5739 being used does not have a built in LCD module, so any solution will have to be in software or using a different interface. The best option for me here will be to use the I2C interface for a couple of reasons. The first being SPI, I have rarely used this interface, and while MSP430ware does provide some nice functions for it, if possible I'd like to keep the SPI connection dedicated to the WiFi for simplicity when it comes to debugging. Second is the number of GPIO used for it. At last count, this was slowly running out, while this count be changed by adding something like a 595 IC to handle the LEDs in the system and cut down the GPIO being used, it is not entirely necessary right now. Thirdly, I'm going by the Stick to what you know method for these parts and as it happens I have used I2C before. With the addition of the MSP430ware API, there shouldn't be too many problems. This should remove the need to find or write/port a library to handle a HD4470 compatible LCD controller.

 

With this in mind, time to go have a look through the element14/Farnell store for possible options. A quick search brings up options such as MIDAS - MCCOG21605C6W-BNMLWI - LCD, COG 2X16, NEG STN, W B/L, I2CMIDAS - MCCOG21605C6W-BNMLWI - LCD, COG 2X16, NEG STN, W B/L, I2C This particular LCD comes with a very good datasheet (Something some products lack). At present however, all I have is BATRON - BTHQ21605V-COG-FSRE-I2C - LCD MODULE, ALPHANUMERIC, 2X16BATRON - BTHQ21605V-COG-FSRE-I2C - LCD MODULE, ALPHANUMERIC, 2X16, so lets see how that goes. On a side note, the Batron LCD has two possible addresses, 0111 010 and 0111 011. (First time I used it, this one stumped me. The address certainly isn't listed in the Batron datasheet which is really quite frustrating!

 

Getting the LCD to display things shouldn't be too hard, the MSP430ware API document has a good example to get you going.

#define SLAVE_ADDRESS 0111010

//Initialize Master
 eI2C_masterInit(__MSP430_BASEADDRESS_EUSCI_B0__,
                              eI2C_CLOCKSOURCE_SMCLK,
                              //UCS_getSMCLK(__MSP430_BASEADDRESS_UCS__),
                              1000000,
                              eI2C_SET_DATA_RATE_400KBPS,
                              1,
                              eI2C_NO_AUTO_STOP );

//Slave address
eI2C_setSlaveAddress(__MSP430_BASEADDRESS_EUSCI_B0__,
                                   SLAVE_ADDRESS );

//Set in transmit mode
 eI2C_setMode(__MSP430_BASEADDRESS_EUSCI_B0__,
                         eI2C_TRANSMIT_MODE );

//Enable I2C Module to start operations
eI2C_enable(__MSP430_BASEADDRESS_EUSCI_B0__);

//Send single byte data.
eI2C_masterSendSingleByte(__MSP430_BASEADDRESS_EUSCI_B0__,
                                             transmitData );
//Delay until transmission completes
 while (eI2C_isBusBusy(__MSP430_BASEADDRESS_EUSCI_B0__)) ;

 

I do find one thing annoying about MSP430ware however. The API user guide is a little...sparse when it comes to function descriptions. In order to get the arguments for a function you need to refer to the API header files. They are simply not listed in the PDF. While not a huge problem, it can be a little frustrating to have to switch between more documents than necessary in order to understand an example.

 

Should this LCD not work (Rather likely if a previous project is anything to do by), something different will have to be dreamed up. LED digit display with a cunning bit of paper describing the meaning may work until something else comes up. Time to research implementing a 595 I think! Also on the cards this week is finalising the  shopping list for motor control and LED drivers. If you have any suggestions for these, please leave a comment!

  • Sign in to reply
  • DAB
    DAB over 13 years ago

    Good update.

     

    The contest has inspired me to get my 5739 out and finish building my atmospheric vibration sensor.  Its prime thunderstorm season and I am missing a good oportunity to collect data.

     

    I also look forward to seeing how your LCD works out.

     

    Thanks

    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