Help needed: GPO square wave

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
FernandoD
LCD!
Posts: 11
Joined: Sun Dec 23, 2001 4:00 pm

Help needed: GPO square wave

Post by FernandoD »

Hi,

I'm planning to create three "square wave" signals with different frecuencies with the GPOs. Is it possible to turn on and off three GPOs say 128 times per second without damaging the unit? The other three GPOs will be "on". I don't know if the GPOs are designed to be able to be turned on and off many times per second.

Each GPO will be connected to a sunbeam laser led, one red, one blue and other green, consuming 20 mA each. The idea is to be able to control the colour emmitted by means of varying the frecuencies of the square waves. I'm planning to write a plugin for LCDC that receives as an input an RGB color triplet (0-255, 0-255, 0-255) and translates it to a combination of frecuencies for the three GPOs that control the LEDs. I'm sure I won't get an exact color, and also I won't get 24 bit color resolution, but I think it will be a nice experiment.

128 (256/2) times per second is a nice number to work with in order to simplify things a little :) , and I think is a good starting point to work with.

Thanks and best regards / Fernando

Mat-Moo
LCD Guru
Posts: 502
Joined: Wed Jan 16, 2002 4:00 pm
Contact:

Post by Mat-Moo »

I was just thinking about what you wrote! however couple of points. LCDC is not capable of flashing the GPOs's that quickly so not even a plugin would help (sorry!). Secondly I don't think that pulsing the led on/off would create different brightnesses on the led - actually I know that as I have one plugged in here on a new MX2 screen and you can... oops not allowed to say any more - but I've never been able to dim the led as of yet just flash it on and off with no real difference to how it looks.
## # Mat # ##
LCDC - Drive it to the edge baby!
http://www.lcdc.cc
Matthew@DPS.uk.com
DPS Ltd. (Not MO!)

FernandoD
LCD!
Posts: 11
Joined: Sun Dec 23, 2001 4:00 pm

Post by FernandoD »

Hi Mat,

Thanks for your reply. Maybe you could not dim it because the on cycle was much longer than the short one and the frequency was not high enough. That's why I was asking for at least 128 on/off operations per second.

Maybe using direct writes to the screen to turn the leds on and off could make the trick. Again, I'm not looking to have 24 bit color resolution, but
I'd like to have more than 7 colors to play with. :roll:

Hopefully I'll end the "hardware" part this weekend and will update the gallery with new pics.

BTW, how is version 1.5 going?

Best regards / Fernando

linear
evil Dr. linear
evil Dr. linear
Posts: 288
Joined: Wed Aug 15, 2001 6:00 pm
Location: USA
Contact:

Post by linear »

There are several PWM ICs that could do the job for you. MIC502 is one, and I know there are several others. I'm not sure how you'd go aobut interfacing though.
BLK202A-4BR-BK + LK202-25-WB-V + LK204-25-V + VK204-25-V + LK-202-24-USB + MX212

FernandoD
LCD!
Posts: 11
Joined: Sun Dec 23, 2001 4:00 pm

Post by FernandoD »

Hi Linear,

Thanks for your help. I was expecting to do it with the GPO without adding any other components. The problem with the PWM IC you mentioned is,afaik, that it needs an "analog" signal to work. I won't have any control with the GPOs then. I could use the parallel output with some resistors in order to have different voltages, and feed them to the PWM. I'll keep thinking about it. But I'm already using the parallel interface to connect a PS2 Pad to the PC :P Gotta find some other way.

Best regards / Fernando

Post Reply