Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
Backlight pwm control
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
Backlight pwm control
does lcdsmartie support backlight brightness control using pwm in pin 17 of lpt port?
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
the display dll's are written in delphi, but can be done in vb too.
I mean that now the display dll is just a interface to the hardware, it just sends data and immediately releases control.
I don't think that PWM can be used with the current method, and it's a pretty good method to just change it to allow parallel port backlight pwm.
It's easier and looks a lot better to make a PIC or Atmel backpack!
I mean that now the display dll is just a interface to the hardware, it just sends data and immediately releases control.
I don't think that PWM can be used with the current method, and it's a pretty good method to just change it to allow parallel port backlight pwm.
It's easier and looks a lot better to make a PIC or Atmel backpack!
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
As I see it now:
- it's either removing the display driver feature - won't happen
- or finding a way to keep control over the display when smartie doesn't send data to the display driver - but how?
A complicated idea: a smartie display plugin that relays data to a small executable that manages the display directly... but be prepared for high CPU usage just for the PWM setting!
Try doing a small executable that outputs PWM to the parallel port and see for yourself. Make sure to code the ability to set PWM in 256 steps.
- it's either removing the display driver feature - won't happen
- or finding a way to keep control over the display when smartie doesn't send data to the display driver - but how?
A complicated idea: a smartie display plugin that relays data to a small executable that manages the display directly... but be prepared for high CPU usage just for the PWM setting!
Try doing a small executable that outputs PWM to the parallel port and see for yourself. Make sure to code the ability to set PWM in 256 steps.
-
- Posts: 71
- Joined: November 18th, 2007, 6:11 pm
- Location: Bariloche, Argentina
- Contact:
well, i tried to control it while lcdsmartie were enabled, it works, but it is a bit unstable, when smartie gets the control of the backlight, it goes to the smartie's state and the rest of the time my program sets the brightness pretty well, but the pwm via software is a bit unstable, timing depends of a lot of things and the program colapses while it is executing the doevents instruction(it tells to the operative system that must pay attention to the rest of the programs, if i don't use it the program just freezes the pc)
here is my code:
of course it uses a lot of resources and is not very necessary(you can do it with a potentiometer, i am complicating something easy), i think i will not continue with this, at least via software
here is my code:
Code: Select all
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
Do
Application.DoEvents()
OUT(&H248A, 3)
Sleep(TrackBar1.Value / 20)
OUT(&H248A, 11)
Sleep((255 - TrackBar1.Value) / 20)
Loop
End Sub