Problem with OLED

[em]Reposting from this thread because I think it was getting overlooked…
http://www.tinyclr.com/forum/topic?id=7982&page=11
[/em]

I just started playing with the OLED module tonight for the first time and I’m having no luck getting anything to show on the display. I’m doing the most basic of tests. I created a new 4.2 project, attached the OLED module to socket #3 and run the following on a Hydra with the 7/23 firmware & driver:

void ProgramStarted()
        {
            Debug.Print("Program Started");
            oledDisplay.SimpleGraphics.BackgroundColor = GT.Color.Red;
        }

I never get “Program Started” printed. I can run programs just fine as long as they don’t use the OLED module. Has anyone else tested OLED on a Hydra with this release? This is the first time I’ve used this module so I don’t rule out issues related to the module itself either.

I quickly hooked up an OLED module and wrote a short program to see how the module would work on the Spider.

I get what appears to be the same problem as you.

There is a null exception when accessing the OLED.

I tried putting a Thread.Sleep() after the Debug.Print, and I did see the message in the output window.’

I also tried doing a Clear of the OLED in the ProgramStarted method, but I still got a null exception.

I also tried adding a button and doing the display in the interrupt handler, but all that did was delay
the null exception until I pressed the button and did the display.

The OLED screen looks just like yours.

I think there might be an issue introduced when converting from 4.1 to 4.2.

What is so magical about this display that we fix in one place then it stops working in another!!

This week is dedicated to testing everything.

Nothing magical. Obviously not made by GHI though… :wink:

There must be something silly in the module code bc I use this OLED on 4.2 no problem. I basically use the same code as the module but without the bitmap support or socket interface.

anyone tested it outside ProgramStarted()? throw it in a timer to toggle colour and see?

I did. I wrote to it in a button event handler.

blush. Yes, yes you did, sorry, totally missed that :frowning: Ignore me !

What happens while your waiting for ‘Program Started’ to show up if you hit the reset button on the motherboard? Does it blow up your system? 4.2 or perhaps more specifically the USB drivers in 4.2 have some problems which might be causing this. As pretty much every 4.2 project I do, is more miss then hit when it comes to running it as the USB connection basically goes stupid.

not sure how your question relates to original thread, but this is a known issue which will be fixed with MF 4.3.

[quote=“Mike”]not sure how your question relates to original thread, but this is a known issue which will be fixed with MF 4.3.
[/quote]
True Mike and MF 4.3 can’t get here fast enough, as sometimes its hard to pin a problem on a module when you have this stuff going on as I sometimes see this behavior when I’m not using a OLED display and its the USB issue that caused the problem. So perhaps a better question would we how know know that this isn’t a manifestation of the USB problem?

Ive had this lots and lots of times. The only way around it that i have found is as soon as it goes slow, stop the debuger wait then hit the reset on the board. If you hit reset while its still trying to attach to the debug then “Hello Mr BSOD, if you would care to wait while I memory dump…”