Friday, April 9, 2010

Mini-Term

I've recently bought a Mini-STM32 kit for the purpose of learning ARM-based MCUs. These development kits were from China and then locally distributed by DIY Hobbyist Corner at an affordable price.
After playing with the example codes, including the uCOS/uCGUI demo, I came up with this Mini UART (serial) Terminal application.

I just utilized the source/library for OS of the uCOS_DEMO since I still don't understand how it works. Luckily I got a copy of uCGUI manual and so I manage to make modifications on the existing sample GUIs (graphical user interface). And later, I'm also able to design my own GUIs.
The USART interface is not difficult to learn since it's almost similar to what other microcontrollers is using. Therefor, it's also easy "porting" the USART code (using standard C language) from my previous MCUs to this STM32 MCU.

The application uses the touch-screen capability of the kit for the keypad interface. However, because of the small LCD area, it's impractical to design the keypad as a full featured "qwerty" keyboard. What I did was just provide alternate characters for most of the existing keys.

"Caps" key pressed and USART baudrate chage:
"QWERTY" key toggled and MainForm minimized(showing desktop background):
Alternate keys/symbols and movable dialog:

It's also possible to use a "gender changer" (DB9 female to DB9 Male) on CON1 of the kit to make it resembles as a common PC serial port.
A problem may also raises because of the possibility that the touch-screen response will vary with different units. So, I added an optional "touch-screen calibrate" at start-up. This option can be found on "miniterm.h" header (the "calibration" code is also copied from one of the demo/example codes).

Source Code (using Keil RVMDK + uVision) download: mini-Term.rar

forum link: Mini STM32 with 2.8 LCD and touchscreen

7 comments:

  1. I have downloaded your sources, but i can't find the code for the touch screen controller, nor for the lcd.
    Can you give the source codes for these modules?

    Thanks in advance.

    ReplyDelete
  2. So we bought 2 identical boards as the one you have here and for some reason, when we try using it with your loaded program (or the ones that came with the device), the lcd/touchpad appears to artifact and lag. Everytime we try to move the cursor it leaves behind black spots on the screen.

    Our guess is that the LCD screen isn't refreshing fast enough. Did your board have this problem? Also, where would we go to update the LCD to have a faster refresh rate?

    Any help/suggestions would be greatful.

    Thanks.

    ReplyDelete
  3. Hallo,
    the programm doesn´t work on the V3 board. What is difficult?

    ReplyDelete
  4. Very much thanks for the info about the touch calibration. I tried for an entire day to correct it. As you said the option is in miniterm.h file.

    ReplyDelete
  5. any idea on how to use uCGUI from scratch, for example doing "Hello world" in the uCGUI_user.pdf ? I want to try in AT89S52 and TFT LCD

    ReplyDelete
  6. Hello Sir;
    I have a mini project on GUI with STM32, I am a beginner, can you send me the complete code plz so that I can understand and modify because I work on an LCD S6D1121. thank you

    ReplyDelete