cancel
Showing results for 
Search instead for 
Did you mean: 

STM3210B - PFSTICK Applications

scarsnik40
Associate
Posted on February 17, 2009 at 13:21

STM3210B - PFSTICK Applications

2 REPLIES 2
scarsnik40
Associate
Posted on May 17, 2011 at 13:03

Hi,

I've had some programming experience in the past, mostly along the grounds of C and C++ types.

It is only recently that I've brought the STM3210B, mostly to play around with it's features, most of which, I've as yet to discover and understand. I've written a small maintenance program, of which that can be programmed by use of several push-buttons, using the evaluation board that came with the starter set, which plugs into the stick itself.

I forgot the name of it at the moment, but here's a link to show you what I'm on about:

http://www.rapidonline.com/Electronic-Components/Integrated-Circuits/ST-Microcontrollers/Hitex-starter-kit-for-STM32-microcontrollers/81343/kw/73-4516

The main part of my project is done as far as I know but, I searched through all of the libraries attached to the debugger for something along the lines of a Source or Header file to add an LCD to the system. I can't find anything remotely familiar to how to add an LCD.

There is an 80-pin feature on the evaluation board, with all the input/outputs needed for the LCD to work from, but that would be risky if not properly defined to the STM3210B - PFSTICK, would it not?

Is there another Evaluation board that I could plug this into? Library files to download? Or, even a specific way in which to apply this. I know that to set the pins directly without any form library file would most likely not do anything at all, or could it?

I'm really stuffed with this one, as there is no clue whatsoever as to how an LCD might be applied to my MCU.

Any help in this would be greatly appeciated :)

-Scarsnik40-

[ This message was edited by: scarsnik40 on 17-02-2009 16:45 ]

jj
Associate II
Posted on May 17, 2011 at 13:03

Welcome - post is a tad ''vague'' and STM32 (as you will learn) demands ''specifics.''

Guessing that by Lcd you mean a Text Lcd. (with standard 4/8 bit parallel controller) To talk with these you need either 4 + 2 or 8 + 2 output signals. Both the 4 and 8 bits should be ''clumped'' together (ie. PA0-PA7) or you will have to write additional sw to ''massage'' the bits. Two control signals: RS & E complete the micro to Lcd connection.

Suggest that you start with 8-bit parallel mode by choosing the ''least interesting/valuable'' pins to dedicate to the Lcd. (you likely do not want to ''lose'' PWM, serial communication, timers etc) You then should read both your STM32 datasheet and current manual RM0008.

You need to place your 8 bit port and 2 control signals into output mode. (you can ''read'' the Lcd but this is too advanced for now) I would suggest that you start by creating a small test/eval board which contains 8 Leds - 1 for each port bit. Transfer a single byte at a time - and confirm that your code and set-up is correct via the Leds.

If you're new to Lcds you will have to read/understand the initialization codes required. Basically you must delay 50mS or so after power up before writing to the Lcd. Your first several instructions to the Lcd also have specific delay requirements - be sure to comply.

The Lcd needs a contrast voltage - modern ones are ~1V positive. You should just be able to see the dot field prior to initialization. Once you can successfully write to the Lcd you can optimize this setting. (I use a PWM signal for ''automated adjustment'' = you should start w/ a 10K pot. between +5V and Gnd - wiper to Vo of the lcd)

Now most Lcds still require +5V for Vdd. We've run hundreds/thousands successfully from a variety of ARM uCs running @ 3V3.

FYI - ''monitoring and confirming'' proper operation on multi-port devices such as STM32 may require something beyond 8-32 smt Leds. (which we've used) My firm is completing a 32 bit ''Port Analyzer/Exciter'' which shows the ''near real time'' output of 32 pins - and enables you to name each pin/signal on a small, Graphic Lcd. We will link to our site in the next 45-60 days - as this analyzer moves from proto to production... Appreciate comments from the forum - adapters will enable our analyzer to ''simply Plug-In'' to STM's ''B & E'' Eval boards and other popular ones...