Jump to content

8 LCDs on 1 CORE :D


MTE

Recommended Posts

2552769373_15eee22235_o.jpg

This morning I soldered this bunch of 8 LCDs to 1 Core....totally awesome :)

The testapp is simple written in C within the "void DISPLAY_Init" section, but what I need is to check if they dont suck too many processor performance etc....

maybe I should write some coundtdown`s or something  for each display, but I dunno how to do this....stryyyyyd, I need you at the chat  ;D  ;D

The next days Ill try if I can connect 16 Displays to the Core, but 1st I wanna check if the 8 works stable...

brb.... :)

Link to comment
Share on other sites

Writing to any one of the LCDs doesn't take any longer than any other LCD... but if you have 4x as much screen and you writet to all of it, it'll take 4x as long.... (plus a little bit of overhead)

I think MTE noticed TK's hint in the function reference and is running with it... it's fun :)

Link to comment
Share on other sites

...but are you actually going to use that many? or is this more a test to see how far you can push the core unit? w

Yes, for now I only want to test if its possible and working without big problems, but I see in future mega midirouters / monitors with a big bunch of LCDs to overview all parameters  etc without shortened names/values  :)

wouldn't that chew up a whole bucketload of power?

Ive connected them to my LC-Core and this is powered with an 23A PC-PSU ;)  ;D

Writing to any one of the LCDs doesn't take any longer than any other LCD... but if you have 4x as much screen and you writet to all of it, it'll take 4x as long.

Totally right, that I figured out the last hours, because when u need to communicate to the 3rd and above LCD u need to reinitialize every display  before you can write something to it.

Link to comment
Share on other sites

Yayyy thank you Thorsten :)

Are you already using the new app_lcd/clcd_multi driver I gave doc

Hehe, no, I got a empty C-skeleton and started with coding....

void Init(void)

MIOS_LCD_YAddressSet(0x00, 0x40, 0x80, 0xc0);
  
  void DISPLAY_Init(void)

// LCDs-Initialisation
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x37, 0x80 | 0x25);
  MIOS_LCD_Init();
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x24, 0x80 | 0x23);
  MIOS_LCD_Init(); 
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x20, 0x80 | 0x21);
  MIOS_LCD_Init();
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x22, 0x80 | 0x34);
  MIOS_LCD_Init(); 

//Writing on LCD 1 & 2
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x37, 0x80 | 0x25);
  MIOS_LCD_CursorSet(0x00);
  MIOS_LCD_PrintCString("LCD 1 on   >RD7<");
  MIOS_LCD_CursorSet(0x80);
  MIOS_LCD_PrintCString("LCD 2 on   >RC5<");

//Writing on LCD 3 & 4
  MIOS_LCD_TypeSet(MIOS_LCD_TYPE_CLCD, 0x80 | 0x24, 0x80 | 0x23);
  MIOS_LCD_CursorSet(0x00);
  MIOS_LCD_PrintCString("LCD 3 on   >RC4<");
  MIOS_LCD_CursorSet(0x80);
  MIOS_LCD_PrintCString("LCD 4 on   >RC3<");

and so on......

::) maybe not the elegantest way to code, Im not a pro but willing to learn  ;D

Link to comment
Share on other sites

Yeh, I have been trying to convince MTE to use the new structure... he's having a bit of an attack of "fear of the unknown" but I think we'll give it a shot this weekend and I'm sure he'll be pleasantly surprised by how much easier it is!

While I'm talking with MTE, we'll make an 8*LCD version of the driver, and he can learn how to upload to SVN too :)

Link to comment
Share on other sites

While I'm talking with MTE, we'll make an 8*LCD version of the driver, and he can learn how to upload to SVN too

hehehehe, Ive done many things the last hour, installed Tortoise and got access to the server, but 1 thing is totally nerving....when I want to connect to a folder I must write everytime my passphrase for 2 times  ??? >:(

...so I only connect in Read-mode for now via webbrowser...

Ok, than I putted all new files into my C-Skel...but when I try to compile I got only this error 

error: missing definition for symbol "_USER_LCD_Select", required by "_output\main.o"

Link to comment
Share on other sites

....when I want to connect to a folder I must write everytime my passphrase for 2 times  ??? >:(

Follow my instructions on the wiki - install pageant and that will go away :)

when I try to compile I got only this error 

error: missing definition for symbol "_USER_LCD_Select", required by "_output\main.o"

Will be in the chat in about 30 seconds ;)

Link to comment
Share on other sites

Who on earth picked that music, it has nothing to do with the dance... hmm.

Yeh gay music for a gay-dance...  ;D

Sorry for the following writing in german language, but its necessary for correct explanation...

Hallo Thorsten,

Stryd und ich haben jetzt 3 Tage mit dem neuen Treiber rumprobiert, aber stoßen immer wieder auf unerklärliche Bugs...

Pinbelegung der 8 LCDs :

E1=RD7  0x37

E2=RC5  0x25

E3=RC4  0x24

E4=RC3  0x23

E5=RC0  0x20

E6=RC1  0x21

E7=RC2  0x22

E8=RD4  0x34

OK, zuallererst hat Stryd LCD 4 bis 7 (von 0 gezählt natürlich ;) ) in den Treiber adaptiert, dann schrieb er eine kleine Applikation die wie folgt ablaufen soll :

Poweron -> Hello World x - Messages auf allen Displays -> dann ein langsames scrollen einer Zeichenfolge, daß von LCD 0 startend durch alle LCDs wandert......

Soweit sogut, die Initialmessages (Hello Wolrd x) funktionieren und werden auf allen Displays korrekt dargestellt, die Scrollroutine beginnt und läuft durch LCD 0-4, bleibt dann aber an LCD 5 hängen...LCD 6 wird komplett ignoriert (sprich das Initial-Hello World ist wie eingefroren) und an LCD 7 läuft die Routine weiter durch und beginnt wieder ab LCD0.

Das seltsame nun daran ist, daß sich dieser Ablauf  nach mehrmaligen Powerons/offs immer wieder and den letzten 3 LCDs geändert hat, sprich manchmal durchlief es auch gar nicht mehr die letzten 3 LCDs, manchmal lief es auch perfekt durch alle....

Gut, was wir dann zuerst vermuteten ist, das es ein meiner LC-PSU liegt (meine erste Testumgebung war die LC mit dem PC-Netzteil), gut ich switche heute das ganze mal auf den Traktorizer (PSU mit Entrauschung, anderes Core), aber da waren die Bugs genau dieselben...

Natürlich habe ich auch die letzten 3 Displays getauscht (hab ja 16 Stück hier rumliegen :) ) und die Verkabelung mehr wie 10mal gecheckt, ich kann also auf jedenfall mal einen Hardwarefehler ausschliessen und vermute, das der Bug eher am Treiber (definierung der Enable-Pins etc) oder der Applikation liegt, oder auch an beiden...

Auf jedenfall sind wir mal mit unserem Latein am Ende und bitten Dich, doch kurz mal einen Blick die Applikation (Attachment) zu werfen.

Grüße

MTE & Stryd

app_8clcds.zip

app_8clcds.zip

Link to comment
Share on other sites

LCDs should never be concurrently handled by the main task (DISPLAY_Init/Tick) and an ISR (Timer())

In fact, I would never control the LCD from an ISR, because if a LCD is busy for more than 640 uS, this could result into MIDI data loss at the input side.

Best Regards, Thorsten.

Link to comment
Share on other sites

small finger? Must be a German joke... actually, I probably don't "get it" because I'm stupid :D

So can someone tell me why this is bad:

void Timer(void) __wparam
{
count_l++;
}
......
void DISPLAY_Tick(void) __wparam
{

if (count_l>=animspeed) {
count_l = 0;
++count_h;
}


if (count_h) {
	count_h = 0;

	MIOS_LCD_CursorSet(0x00+animhere); //1st line
	MIOS_LCD_PrintCString("X");

....etc

I must be missing something cause that looks OK to me?

Link to comment
Share on other sites

IRQ handling seems to be ok, so I would propose to swap the enable pins in order to check, if it is really a SW issue. If the same LCDs are failing to work, you know where you don't need to search for errors before doing speculations into the wrong direction.

Best Regards, Thorsten.

Link to comment
Share on other sites

Heh, this is where it starts to get more complex... When we swapped the wires to the enable pins, the problem followed the enable line, which hinted that the problem was there... But it also caused other LCDs to start to fail, which made me think that maybe those LCDs are a bit 'funny':

E2 : LCD2

E6 : LCD6

LCD6 does not animate, and sometimes LCD5, but sometimes they all work OK. The behaviour does not change while the box is on, only after it has been power cycled (turned off and then on again)

E2 : LCD6

E6 : LCD2

LCD2 does not animate, and neither do LCD7 or LCD1. Again, this behaviour is constant, until the box is power cycled, and then sometimes they will work and sometimes they will not...

I should also mention that there were some interesting bugs noticed with these screens with the inbuilt MIOS CLCD driver, like if we send a certain string, it caused LCD 0 2 and 4 to fail thereafter. Sending a different string in it's place, everything was OK.

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...
×
×
  • Create New...