• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » RIT128x96x4StringDraw Problem
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Forums

RIT128x96x4StringDraw Problem

This question is answered
MartinPotts
Posted by MartinPotts
on May 08 2012 16:50 PM
Expert1190 points

I am trying to display the character chosen from the array

char CW_char;

.

char message[] = "aaaaa bbbbb ccccc ddddd eeeee ";  Note the underline is not present in code. It is mispelled.

This line works.

RIT128x96x4StringDraw("CW Generation Running", 18, 24, 15);

.

for(i=0;i<=30;i++)

  {

CW_char = message[i];

switch (CW_char)

{

.

This is the problem line

RIT128x96x4StringDraw(CW_char, 18, 40, 15);

________________________________________________________________

Description Resource Path Location Type

argument of type "char" is incompatible with parameter of type "const char *" main.c /CW_LM_2 line 400 C/C++ Problem

How do I fix it. It ia already a pointer since it is an array.

LM3s6569 Stellarware
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Andy Neil
    Posted by Andy Neil
    on May 08 2012 18:20 PM
    Guru32055 points

    MartinPotts
    It ia already a pointer since it is an array.

    No, it isn't!

    Look again:

    char CW_char;

    That's just a plain 'char' - not an array!

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MartinPotts
    Posted by MartinPotts
    on May 08 2012 19:50 PM
    Expert1190 points

    But number{1} gets tyhe same result

    CW_char = message[i];

    RIT128x96x4StringDraw(message[i], 18, 40, 15);

    Description Resource Path Location Type argument of type "char" is incompatible with parameter of type "const char *" main.c /CW_LM_2 line 711 C/C++ Problem

    RIT128x96x4StringDraw(*CW_char, 18, 40, 15);

    Description Resource Path Location Type operand of "*" must be a pointer main.c /CW_LM_2 line 711 C/C++ Problem

    So what do I put here to put the selected character here.

    RIT128x96x4StringDraw(  ?????  , 18, 40, 15);

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy Neil
    Posted by Andy Neil
    on May 09 2012 00:26 AM
    Verified Answer
    Verified by MartinPotts
    Guru32055 points

    MartinPotts
    But number{1} gets tyhe same result

    Of course it does!  Because you are still providing a single char, when the function prototype requires a pointer to a char!

    MartinPotts
    RIT128x96x4StringDraw(message[i], 18, 40, 15);

    Again, message[i] is a single element - a char - from the array.

    MartinPotts
    So what do I put here to put the selected character here.

    You can't!

    As the name suggests, RIT128x96x4StringDraw prints a string - not  a char!

    To get it to print a single character, you will have to build a 1-character string.

    Note that this is all basic 'C' stuff - nothing specifically to do with TI or Stellaris.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MartinPotts
    Posted by MartinPotts
    on May 09 2012 09:36 AM
    Expert1190 points

    Sorry. But it fortifies my observations. TI software it for software techies and not for engineers who want to develope processes.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • cb1_mobile
    Posted by cb1_mobile
    on May 09 2012 10:00 AM
    Guru23720 points

    Feel your pain...  Suspect that somewhere a "software techie" likewise proclaims, "TI MCUs are for engineers - not for software techies who want to develop processes..."

    I would doubt that any of your process manuals are as broadly based - and as well described & detailed - as StellarisWare.  Perfect - no - but you're surely smart/resourceful enough to resolve the display issue presented...  And you did get repeated, instant response - for free - from dreaded software techie!

    Thus TI cannot win.... and mkt guy/gal slowly raises pistol to head...  (and process vendor - who ignored display - escapes unscathed... (except for here)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy Neil
    Posted by Andy Neil
    on May 12 2012 05:45 AM
    Guru32055 points

    MartinPotts
    TI software it for software techies and not for engineers who want to develope processes.

    Again, this is all basic 'C' stuff - nothing specifically to do with TI or Stellaris.

    Obviously, to develop "processes" with any software content, you need to have or acquire suitable software competences.

    Exactly the same way that, to develop "processes" with any electronics content, you need to have or acquire suitable electronics competences;

    Or, to develop "processes" with any mechanical content, you need to have or acquire suitable mechanical competences;

    etc, etc, etc,...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steve D.
    Posted by Steve D.
    on May 12 2012 07:41 AM
    Prodigy200 points

    MartinPotts wrote the following post at 9 May 2012 9:36 AM:

    Sorry. But it fortifies my observations. TI software it for software techies and not for engineers who want to develope processes.

    Maybe you meant to say that TI software is for another topic... because you're talking about C instead - a (largely hardware agnostic) language which has been around since the early 70's and is extensively used in micro's right across the range of manufacturers - and the mere fact that TI provides a C compiler and all these handy API's (like the RIT128x96x4.c one you're referring to here) is a godsend, because without it you'd be writing all that code in assembly - and if you don't understand C then you'll never understand assembly. 

    You might want to clarify the word 'engineer' tho - are you a civil engineer?  Because I wouldn't expect you to know C in that case... but if you're an electrical / electronics engineer and you're serious about using micros then you should be able to pick up C well enough to use it... just don't blame the micro or its manufacturer for the shortcomings in your understanding - especially after people here have helped you solve the problem.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy Neil
    Posted by Andy Neil
    on May 12 2012 08:38 AM
    Guru32055 points

    Steve D.
    if you're ... serious about using micros ...

    The whole point of microcontrollers is precisely that they allow you to do stuff in software without having to design specific, custom hardware for the particular task at hand.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy Neil
    Posted by Andy Neil
    on May 16 2012 14:18 PM
    Guru32055 points

    cb1_mobile
    Suspect that somewhere a "software techie" likewise proclaims, "TI MCUs are for engineers - not for software techies who want to develop processes..."

    I seem to recall just such a post on another forum years ago: a  "software techie" whingeing about how hard it was to use a 555 timer - with all those resistors, capacitors, and complicated (sic) formulae to deal with...

    Never Had It So Good
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • cb1_mobile
    Posted by cb1_mobile
    on May 16 2012 15:25 PM
    Guru23720 points

    Mine was a (hoped for) play on words (via reversal) - to further illustrate the emptiness of complainant's position.  Credited you with multiple, instant responses.

    Mind was made up - simple facts had little impact...   As past proclaimed, "StellarisWare RULES - Long live StellarisWare!"   

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • MartinPotts
    Posted by MartinPotts
    on May 29 2012 14:37 PM
    Verified Answer
    Verified by MartinPotts
    Expert1190 points

    yes I solved the problem with a simple statement.

    sprintf(buf, "%c  " , message[i]) ;     RIT128x96x4StringDraw(buf , 18, 80, 15);

    I know that the solution is not recommended by true professional C++ programmers but it works fine.

    Why did someone not suggest that solution? Would have save a lot of band bits.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy Neil
    Posted by Andy Neil
    on May 29 2012 17:16 PM
    Guru32055 points

    MartinPotts
    Why did someone not suggest that solution?

    I did:

    Andy Neil
    To get it to print a single character, you will have to build a 1-character string.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use