Hi ,
i'm trying to hardwire the decimal point , how can I do this using the master card or display card???
Have had a look at a forumn post on opencockpits but it didn't make any sense.
Thanks
Michael
Printable View
Hi ,
i'm trying to hardwire the decimal point , how can I do this using the master card or display card???
Have had a look at a forumn post on opencockpits but it didn't make any sense.
Thanks
Michael
Connect the DP pin (of the 7-segment digit) -with a wire- to an output of your Master card (without a resistor).
Nico
Hello,
Is there a way to dimm dot point together with 7-segment digits? While I dimm digits, dots stay bright!
Thanks.
Simon
if you can settle a fixed "dimness" simply pop in a resistor !
John
got it :D
Thanks
Michael
Hi,
John, that is exactly how I solved the dimming problem at the moment but I do not like it that much!
I have read many manuals on how to dimm OC 7 segment displays and dot point but none actually worked for DP?!
I am interested in Nico's approach. It makes sense to use PWM, I just donīt have the idea how to start programing that in SIOC? Is possible to learn more about PWM in SIOC?
Thank you,
Simon
Hi Simon,
I have not tested it yet, but basically it goes like this:
So there are three dimming levels. We could program more but then the frequency would go below 25Hz and flickering would occur.Code:Var 0 Value 0
{
&dimcontrol = 0
&dimcontrol = TIMER 1 0 4
// 4 means 40 msec
}
Var 1 name dimvalue value 3 // values between 1 and 4: 1=25%, 2=50%, 3=75%, 4=100%
Var 2 name DPvalue // 0 or 1
Var 10 name dimcontrol Link SUBRUTINE
{
// is called 25 times per second
&DP = &DPvalue
IF &DPvalue == 1
{
IF &dimvalue <= 3 // EDIT changed 4 into 3!
{
IF &dimvalue >= 1
{
&DP = DELAY 0 &dimvalue // determines the width of the pulse (PWM)
}
}
}
}
Var 100 name DP Link IOCARD_OUT Output 78
After I have tested it, to make sure it works fine, I'll add it to my collection of example SIOC scripts at my Howto SIOC page.
Nico
Hi Nico,
Thank you for this PWM example code, I will try it.
I basically learned to "sioc" on your Howto SIOC page. It was and still is a great help, itīs actually the Rosetta Stone of SIOC :D
Thanks,
Simon