I’ve searched the forum and cannot seem to find the answer, but I just received my Cobra with a 4.3" LCD and I cannot get it to use the full screen. The boot screen indicates that the unit has a 320x240 display, but it should state 480x272. How do I configure the unit to the correct display size?
Run the config code as shown on this page:
http://www.ghielectronics.com/downloads/FEZ/Cobra/LCD_Example_4_3_Inch.cs
You will have to add a few assemblies to get it to work. The added assemblies that you will need are:
GHIElectronics.NETMF.Hardware
Microsoft.SPOT.Graphics
Microsoft.SPOT.Hardware
Microsoft.SPOT.TinyCore
Microsoft.SPOT.Touch
Make sure you name your project the same as the namespace in the example for the resource file.
Aron,
Thanks a ton! I don’t know that I would have found that code to fix my problem. It is using the full display!
One more question: The GHI bitmap on the boot screen is now offset to the 320x240, how can I get that back to the center?
No problem and welcome to the community.
One more question: The GHI bitmap on the boot screen is now offset to the 320x240, how can I get that back to the center?
You can set the image and its location. See GHI libs
Sorry, I’m sure I’m missing something obvious, but is the method to do this to execute the code posted above, and the LCD will be automatically be resized and there is nothing else to do. I have updated my FEZ cobra with this code with no problems, however nothing has happened. I have used another example after delpoying the LCD code, but the full screen is not being utilised. Am i missing a step?
What have you done to determine that the full screen is not being utilized?
Can you post your code?
using Microsoft.SPOT;
using GHIElectronics.NETMF.Glide;
using GHIElectronics.NETMF.Glide.Display;
using GHIElectronics.NETMF.Glide.UI;
namespace Test
{
public class Program
{
// This will hold the main window.
private static Window window;
public static void Main()
{
// Load the window
string xml;
xml = "<Glide Version=\"" + Glide.Version + "\">";
xml += "<Window Name=\"window\" Width=\"480\" Height=\"272\" BackColor=\"dce3e7\">";
xml += "<Button Name=\"btn\" X=\"20\" Y=\"104\" Width=\"180\" Height=\"32\" Alpha=\"255\" Text=\"PUSH BUTTON\" Font=\"4\" FontColor=\"000000\" DisabledFontColor=\"808080\" TintColor=\"000000\" TintAmount=\"0\"/>";
xml += "</Window>";
xml += "</Glide>";
// Resize any loaded Window to the LCD's size.
Glide.FitToScreen = true;
// Load the Window XML string.
window = GlideLoader.LoadWindow(xml);
// Activate touch
GlideTouch.Initialize();
// Initialize the window.
InitWin();
// Assigning a window to MainWindow flushes it to the screen.
// This also starts event handling on the window.
Glide.MainWindow = window;
Thread.Sleep(-1);
}
static void InitWin()
{
// Get the Button
Button btn = (Button)window.GetChildByName("btn");
// Listen for tap events
btn.TapEvent += new OnTap(btn_TapEvent);
}
// Handle tap events
static void btn_TapEvent(object sender)
{
Debug.Print("I GOT CLICKED");
}
}
}
Sorry, resolution shows 320 x 240. Im using a 4"3 screen.
Can you edit your post and select your code, hit the 101010 button in the TOP row, so that the formatting works?
Can you also confirm if you have a 3.5" or the 4.3" display? And what does the display show at boot up about resolution?
I’ve tried compiling with several programs but the display is still only using 320 x 240. i’ve recomplied LCD_Example_4_3_Inch code, but when the device reboots the display still shows LCD : 320 x 240.
Then you haven’t been successful in setting the display to 480x272. That is what we need to resolve. Can you link to where that code is?
http://www.ghielectronics.com/downloads/FEZ/Cobra/Broch_FEZ_4_3inTFTDisplayKit.pdf.
This is what I am compiling.
ok great.
First question, did you create a new project? What type of project did you create?
Second, what firmware version do you have installed on your device? Does it match the SDK version you’ve got installed? Have you made sure you’ve selected that framework version in your project? What, if any, errors are shown when you deploy that?
Yep I created a New Windows Application. The Firmware on my device is 4.2.4.0. For my project I select the target Framework as ‘.NET Micro framwork 4.2’. No errors are displayed when I try to deploy it. The same happens when I try to run any other program, however this time nothing happens and the device just reboots, to show the boot up screen.
The first thing I would try is reflashing with the 4.1.8.x firmware, re-target your app to 4.1, and deploy your app again. I think you’re finding the code is just out of date for 4.2, but I can’t offer any help on what you’d need to change sorry.
After changing the display configuration you need to hard reset the board by cycling the (USB)power or pressing the reset button before changes will take effect.
you don’t need to re-load the SDK. In the 4.1 folder you should find the 4.1 firmwares.
I have run the code as-is (I did fix the references) on my Cobra with 4.3" screen. Beforehand, it was only showing 320x240 on startup, I deployed the app and it rebooted and on that first boot it showed 480x272 and the hello world screen came up. Multiple reboots now and it’s always 480x272. Deployed a new console app with no mods to it and the LED flashes and the screen still shows 480x272.
I am running 4.1.8.0.
Ahh brilliant, yeah 4.1 has worked. Thanks!