Jump to content

Printing to LCD issues


s_wolfe
 Share

Recommended Posts

I'm sure this has been solved in the past but after sorting through a load of threads, I decided to just start one here....

So, I wanted to print something to the screen using PrintCString.  Random characters.  I thought possibly I needed to set my lcd... nothing.

I also tried PrintChar and that works perfectly.  Theoretically, I COULD just use that command over and over again to print out HELLO WORLD but that would just be stupid.  Has anyone had this problem before?  Thanks a lot in advance.

Just to elaborate, I'm using a 4x20 lcd.  I can print all 4 lines from MIOS studio clearly and can print my random nonsense to selected lines.  Weird stuff.

Link to comment
Share on other sites

Hi and welcome to the forums.

As you provide no code, it's hard to say what you're doing wrong, but I hope some of the past topics will help, eg:

http://www.midibox.org/forum/index.php/topic,10854.0.html

and in general:

http://www.midibox.org/forum/index.php?action=search2;advanced;search=PrintCString

Best,

Michael

Link to comment
Share on other sites

Well, I thought I was being pretty straightforward..... so here's code:

THIS works:

	MIOS_LCD_CursorSet(0x00);
	MIOS_LCD_PrintChar( 'M' );
	MIOS_LCD_CursorSet(0x01);
	MIOS_LCD_PrintChar( 'I' );
	MIOS_LCD_CursorSet(0x02);
	MIOS_LCD_PrintChar( 'O' );
	MIOS_LCD_CursorSet(0x03);
	MIOS_LCD_PrintChar( 'S' );
	MIOS_LCD_CursorSet(0x40);
This does not:
	MIOS_LCD_PrintCString("MIOS");
	MIOS_LCD_CursorSet(0x80);
or even:
	MIOS_LCD_PrintCString(strings[0]);

Call me crazy, but it doesn't work.  What it looks like are random characters but always the same depending on what I'm trying to output.  The reason for no code previously was that the code was so simple that I didn't think it was required.  Anyway, there you go.

Link to comment
Share on other sites

I'm sorry for assuming you're a noob, but have you tried setting the cursor first?

=>

MIOS_LCD_CursorSet(0x00);
MIOS_LCD_PrintCString("MIOS");

there's of course the tiny possibility that there's something wrong in the new wrapper, but before I go and check it by myself, it would be cool to roule out all other possibilities in advance...

best,

Michael

Edit:

and btw: what version of the wrapper (skeleton) are you using?

Link to comment
Share on other sites

The build date on the wrapper that I'm using is from 1/31/08.  I downloaded the new skeleton but it seems to want to shuffle up the set up I have working now.  I might nix the whole thing and see what I can do.  The latest skeleton is set up for codeblocks but I never seem to get that stuff working right.  I'll keep playing with it for now.  It just doesn't make sense how it could work with printchar and not printstring.  Weird.

Link to comment
Share on other sites

MIOS_LCD_PrintCString was buggy in older skeleton versions

You will find the new code at the bottom of this file:

http://svnmios.midibox.org/filedetails.php?repname=svn.mios&path=%2Ftrunk%2Fmodules%2Fmios_wrapper%2Fmios_wrapper.asm

However, I strongly recomment you to update your environment, so that you can develop applications based on the new platform. Otherwise it's really time consuming (for you and for us) if you run into trouble again.

Best Regards, Thorsten.

Link to comment
Share on other sites

hehe  ;D

yes, I was searching too for a veeeery long time and gave up twice,

but after I discovered this marvellous Quicksilver websearch function (Quicksilver is a keyboard-only quick-launcher for Mac OS), I adamantly wanted to have it for midibox.org as well... then I looked again at the advanced search URL and just guessed and tried it with action=search2... and voilà: there it was - that wonderful shiny brand-new URL ready to be served for all our beloved first-post-noobsis ;D

(you're all welcome btw, we all had our first post some day)

quicksilvereyecandybl2.png

Cheers,

Michael

btw:

Mac-Users who want this for qs, the plugin is called "web search module" and the pages can be customized at Catalog -> Custom -> Web Search List -> "i" -> URL: http://www.midibox.org/forum/index.php?action=search2;advanced;search=***

Link to comment
Share on other sites

Careful, you'll get so many hits with that search that your browser might crash. Not because of the extra load, but just because your CPU is not designed to handle so much useless info ;D

I managed to get firefox's search engines to recognise SMF on midibox.org, and found the search2 action, but didn't have your skill to finish the job. Thanks dude!

Slightly OT, there's a tool for linux called gnome-do that is a ripoff of quicksilver:

gnome-do-blue.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...