I am working with the GLK240128-25 Graphic LCD for a school project and we have an ARM7 32 bit processor. I am in charge of programming the LCD and we are still trying to debug our board to get our processor working. I am wondering if anyone has a GUI or command line program that mimics the communication between my LCD and an ARM7.
I need to start designing GUI menus and text by using the hex commands defined in the documentation but I don't believe you can do that by using MOGD#. I was thinking about writing something in either C or C# but can someone give me some documentation, insight, or help with my issue?
I am using the RS-232 Serial connection to communicate over the I2C bus lines, but this is an example of what I want to do as a simple function:
DrawButton(x1, y1, x2, y2) {
Draw a box in location x1, y1, x2, y2
Draw text within that box
}
So I'm guessing this would be sent from the processor's memory to the LCD with Hex codes like:
0x70 0x45 1, 2, 4, 5
0x70 0x42 BLAH
NOTE: I know those are not the right hex codes.
Creating a virtual ARM7 Processor
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
Are you programming the arm7 using C? If you are just hook up the LCD to your PC instead of the arm and write two functions SendChar and ReadChar on the PC side.
Then start implementing stuff as
And build up your code to drive your GUI on the pc , once the actual ARM7 is working replace the implementations of the SendChar and ReadChar functions with its ARM7 counterparts and you should be up running in a matter of minutes.
Then start implementing stuff as
Code: Select all
void SetPixel(unsigned char x, unsigned char y)
{
SendChar(254);
SendChar(112);
SendChar(x);
SendChar(y);
}
void DrawLine(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2)
{
SendChar(254);
SendChar(108);
SendChar(x1);
SendChar(y1);
SendChar(x2);
SendChar(y2);
}
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
The serial port on your PC is an rs232 port now I have heard stories of people bitbanging i2c out of it I have never seen a library for it or some actual documentation on how they did it (if they did it at all)
Since you seem to be on a deadline its probably faster to put the GLK into rs232 mode and just hook it up directly to your PC and put it back into either I2C or TTL mode (whatever you prefer) when you hook back up to the ARM.
Since you seem to be on a deadline its probably faster to put the GLK into rs232 mode and just hook it up directly to your PC and put it back into either I2C or TTL mode (whatever you prefer) when you hook back up to the ARM.
I downloaded a RS232 COM port program that allows me to send commands over the serial port, but it requires everything to be converted into HEX. I tried to google some ways to use C to communicate over the serial port but I couldn't find anything. Can anyone send me some source code, links, or give me some tips to help jump start my programming?
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
Take a look at this thread
I've never used VC++ before and when I tried to build those projects, they failed with errors I didn't really understand. I imagine that there are some missing include libraries or I need the full version of Visual C++. There isn't a simple way to do this in C, Java, or Python? Those are the languages I know the best, but since all I need to do is write a series of hex codes it really doesn't matter what language I use.