Jump to content


Photo
- - - - -

Multiple LCDs


  • Please log in to reply
7 replies to this topic

#1 Geerinckx

Geerinckx

    MIDIbox Newbie

  • Programmer
  • Pip
  • 31 posts

Posted 08 April 2012 - 19:46

Hi All

After reading reading reading I've started a new midiBox project.
I already own a midiBox128 and a midiBox64 project for controlling lighting software.

But now I've started a LPC17 project to replace the old 1 with 8+ LCD's.
Everything is running, code for Din & Dout is ready.
For now I'm testing with 1 LCD but the plan is to have 8 or more LCD running under Mios32.

I can't find where i can modify the lcd_device_set code

I would like to have it like this:
LCD_1 E-pin ---> I take from J15A
LCD_2 E-pin ---> I take from J15B
LCD_3 E-pin ---> I would like to have on J10.D0
LCD_4 E-pin ---> I would like to have on J10.D1
and so on....
Where do i modify this? I should think in Mios32_Board? But I can't find it.

Can someone point me in de right direction?


Ps Big thx again to TK and his team for this wonderful new project.

Greetings

Gert
Don't dream your life but live your dreams!

#2 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,445 posts
  • LocationGermany

Posted 09 April 2012 - 00:23

Hi Gert,

I will update the "universal" lcd driver under modules/app_lcd/universal soon to simplify such changes, currently they are not obvious (basically you would have to change each line where MIOS32_BOARD_J15_E_Set() is called, it makes sense to add an additional SW layer to overwrite the default function)

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#3 Geerinckx

Geerinckx

    MIDIbox Newbie

  • Programmer
  • Pip
  • 31 posts

Posted 10 April 2012 - 04:25

Ah,

Okeey TK, for now i wil just put all J10 outputs in open drain mode, and use external pull-up to 5v.
I think all E lines are anabled at start up, so all displays wil get the same correct initialisation. Correct?
and after init, i just set/reset the correct J10 pin before any Lcd_print command

I'm still a bit confused with the following tutorial:

u8 pin = (midi_package.note - MIDI_STARTNOTE) & 0x7f;
// turn on LED
MIOS32_DOUT_PinSet(pin, 1);


What does the "& 0x7f" ???

Maybe silly question...

But Isn't it, if I set: MIOS32_DOUT_PinSet( 0 , 1 );
Thad the first LED will light up?


Greetings

Gert

ps: TK do you mind giving me access to the programmer lounge. maybe i can do there some good idea's.
Don't dream your life but live your dreams!

#4 nILS

nILS

    MIDIbox Hero

  • Administrators
  • 4,250 posts
  • LocationStuttgart, Doucheland

Posted 10 April 2012 - 08:10

& 0x7f (bitwise AND) clips the pin to to 0..127.

Yes, MIOS32_DOUT_PinSet(0, 1) will light up the first LED.
Check out the unofficial MIDIbox Quote database

Posted Image Buy nILS a Beer Disclaimer: buying nILS a beer gets you absolutely nothing in return likesuchas real-time chat support, gm5x5x5 pcbs, MIDIbox troubleshooting assistance or a less grumpy german.

#5 TK.

TK.

    MIDIbox Guru

  • Administrators
  • 12,445 posts
  • LocationGermany

Posted 10 April 2012 - 20:28

ps: TK do you mind giving me access to the programmer lounge. maybe i can do there some good idea's.


access granted.

Best Regards, Thorsten.
Posted Image Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.

#6 Geerinckx

Geerinckx

    MIDIbox Newbie

  • Programmer
  • Pip
  • 31 posts

Posted 12 April 2012 - 03:42

Thx nILS

Thx TK........ :wink:
Don't dream your life but live your dreams!

#7 Geerinckx

Geerinckx

    MIDIbox Newbie

  • Programmer
  • Pip
  • 31 posts

Posted 18 April 2012 - 15:28

Still got a problem,

The first LCD works perfect, but whene i connect the Enable line to 1 of the J10 pins. the LCD does nothing...
Does not init at startup.

At initialisation off te application, I set all J10 pint as output open drain.
Even whene i don't connect the E line to annything (pull up connected) the LCD won't init at start up. (E line should be high)

Am I missing something?

At de datasheet for the LCD, the E line is a puls train. Right now i dano't have a scope with me to check what the E line off J15A/J15B does.
But i thought, whenever you wonna write to a LCD, the E pin off thad LCD was just high(+5V) the entire time.

Can someone point me in the right direction?


Greetings

Gert
Don't dream your life but live your dreams!

#8 Geerinckx

Geerinckx

    MIDIbox Newbie

  • Programmer
  • Pip
  • 31 posts

Posted 19 April 2012 - 04:18

Found my point to the right direction....


Enable line is a select line and a kind of a clock line.

So, clamping it to ground or vss wouldn't do the trick.

A multiplexer is answer to my question i guess.


To-morrow i will test it with a 1 to 8 multiplexer.



Greetings

Gert
Don't dream your life but live your dreams!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users