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
Friday, April 9, 2010
Subscribe to:
Post Comments (Atom)
I have downloaded your sources, but i can't find the code for the touch screen controller, nor for the lcd.
ReplyDeleteCan you give the source codes for these modules?
Thanks in advance.
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.
ReplyDeleteOur 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.
Hallo,
ReplyDeletethe programm doesn´t work on the V3 board. What is difficult?
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.
ReplyDeleteany 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
ReplyDeleteHello Sir;
ReplyDeleteI 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
excellent information, i dont know how to thank you more.
ReplyDeleteCukai Harta
plastic manufacturer malaysia
enjin kereta