cancel
Showing results for 
Search instead for 
Did you mean: 

need some project advice :)

russdx
Associate II
Posted on October 07, 2012 at 14:21

Hello :)

I have a little project using a stm32f4 which receives usb data from the pc using the cdc classes (2048bytes @ 60fps) and then draws them to a Plasma dot matrix display.

I have it all working ok :) The problem is, the dot matrix display needs to be continually refreshed to keep the image on it /create different shades of colour. When i am not sending usb data the image is fine, nice and stable. But when i start sending the usb data at 60fps it starts to flicker slightly. This is because the cpu is going off to do the usb stuff and taking cpu time away from updating the display :(

is there any way around this? is the cdc class pure interrupt driven? is there a way i can tell it when i want it to run its usb functions. (basically i control the cpu time)

I have had this problem with other microcontrollers but was hoping the speed of this one would solve the problem. only way i have managed to successfully solve the problem is use a FPGA+FTDI but this is quite expensive and was hoping i could do the whole thing just with one stm32f4

any advice would be much appreciated.

#display
13 REPLIES 13
russdx
Associate II
Posted on October 08, 2012 at 22:03

Totally agree with timing, i have made that mistake before lol

tricky part is how to only have the usb execute when i want it to :)

Thanks for all your help :)
russdx
Associate II
Posted on November 03, 2012 at 17:39

totally solved this problem :)

i was looking at it backwards :), the display update was very time critical yet it was getting run in a huge while loop with software delays.

it is now completely hardware timer interrupt driven using 3 timers.

0 flicker :)
jj2
Associate II
Posted on November 04, 2012 at 15:07

Good for you - persistence/analysis rewarded... 

Same timing techniques you've noted (and mastered) will help w/your design of more mainstream TFT and OLED displays - especially those w/out in-built ASIC Controllers...

For the size & cost of that Plasma - you may consider both VFD (Futaba) and LED (many sources).  VFD is a similarly sized, complete panel and LED would involve your creating a physical X-Y matrix of edge-butted, 5x7 or 8x8 dot matrix Leds. 

Led likely to be more power hungry but can be far brighter - more colorful - and (best of all) infinitely size-scalable! 

russdx
Associate II
Posted on November 04, 2012 at 22:13

hello :)

i have set all the hardware timers to match the displays timing diagrams so all works great :) the smallest part of the loop has actually now been removed and replaced with a single spi dma transfer that shifts out 128bits, i have to add a x16div to slow it down for the display as it was so fast lol :)

reason im using this plasma display is because my project is for a pinball machine and this is the displays they use :) (you can buy a nice 32inch tv for the price of some of these pinball displays lol)